summary refs log tree commit diff
path: root/pkgs/development/tools/jq/default.nix
blob: 8194ffc22a81d90635f1fdc9d5d1b864dcad0133 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{stdenv, fetchurl}:
let
  s = # Generated upstream information
  rec {
    baseName="jq";
    version="1.4";
    name="${baseName}-${version}";
    hash="17dk17h7qj6xpnsbc09qwsqkm6r7jhqbfkjvwq246yxmpsx4334r";
    url="http://stedolan.github.io/jq/download/source/jq-1.4.tar.gz";
    sha256="17dk17h7qj6xpnsbc09qwsqkm6r7jhqbfkjvwq246yxmpsx4334r";
  };
  buildInputs = [
  ];
in
stdenv.mkDerivation {
  inherit (s) name version;
  inherit buildInputs;
  src = fetchurl {
    inherit (s) url sha256;
  };

  # jq is linked to libjq:
  configureFlags = [
    "LDFLAGS=-Wl,-rpath,\\\${libdir}"
  ];
  meta = {
    inherit (s) version;
    description = ''A lightweight and flexible command-line JSON processor'';
    license = stdenv.lib.licenses.mit ;
    maintainers = [stdenv.lib.maintainers.raskin];
    platforms = stdenv.lib.platforms.linux;
  };
}