1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-16 09:53:17 +00:00
nixpkgs/pkgs/development/tools/jq/default.nix
Vladimír Čunát 2e6bf42a22
Merge branch 'master' into staging-next
There ver very many conflicts, basically all due to
name -> pname+version.  Fortunately, almost everything was auto-resolved
by kdiff3, and for now I just fixed up a couple evaluation problems,
as verified by the tarball job.  There might be some fallback to these
conflicts, but I believe it should be minimal.

Hydra nixpkgs: ?compare=1538299
2019-08-24 08:55:37 +02:00

43 lines
1.1 KiB
Nix

{ stdenv, fetchurl, oniguruma }:
stdenv.mkDerivation rec {
pname = "jq";
version="1.6";
src = fetchurl {
url="https://github.com/stedolan/jq/releases/download/jq-${version}/jq-${version}.tar.gz";
sha256="0wmapfskhzfwranf6515nzmm84r7kwljgfs7dg6bjgxakbicis2x";
};
outputs = [ "bin" "doc" "man" "dev" "lib" "out" ];
buildInputs = [ oniguruma ];
configureFlags =
[
"--bindir=\${bin}/bin"
"--sbindir=\${bin}/bin"
"--datadir=\${doc}/share"
"--mandir=\${man}/share/man"
]
# jq is linked to libjq:
++ stdenv.lib.optional (!stdenv.isDarwin) "LDFLAGS=-Wl,-rpath,\\\${libdir}";
doInstallCheck = true;
installCheckTarget = "check";
postInstallCheck = ''
$bin/bin/jq --help >/dev/null
'';
meta = with stdenv.lib; {
description = ''A lightweight and flexible command-line JSON processor'';
license = licenses.mit;
maintainers = with maintainers; [ raskin globin ];
platforms = with platforms; linux ++ darwin;
downloadPage = "http://stedolan.github.io/jq/download/";
updateWalker = true;
inherit version;
};
}