jq: Add test
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
{ stdenv, fetchurl, oniguruma }:
|
||||
{ stdenv, nixosTests, fetchurl, oniguruma }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jq";
|
||||
version="1.6";
|
||||
version = "1.6";
|
||||
|
||||
src = fetchurl {
|
||||
url="https://github.com/stedolan/jq/releases/download/jq-${version}/jq-${version}.tar.gz";
|
||||
sha256="0wmapfskhzfwranf6515nzmm84r7kwljgfs7dg6bjgxakbicis2x";
|
||||
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 =
|
||||
[
|
||||
configureFlags = [
|
||||
"--bindir=\${bin}/bin"
|
||||
"--sbindir=\${bin}/bin"
|
||||
"--datadir=\${doc}/share"
|
||||
"--mandir=\${man}/share/man"
|
||||
]
|
||||
# jq is linked to libjq:
|
||||
]
|
||||
# jq is linked to libjq:
|
||||
++ stdenv.lib.optional (!stdenv.isDarwin) "LDFLAGS=-Wl,-rpath,\\\${libdir}";
|
||||
|
||||
doInstallCheck = true;
|
||||
@@ -30,8 +30,10 @@ stdenv.mkDerivation rec {
|
||||
$bin/bin/jq --help >/dev/null
|
||||
'';
|
||||
|
||||
passthru.tests = { inherit (nixosTests) jq; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = ''A lightweight and flexible command-line JSON processor'';
|
||||
description = "A lightweight and flexible command-line JSON processor";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ raskin globin ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
|
||||
Reference in New Issue
Block a user