summary refs log tree commit diff
path: root/pkgs/development/libraries/yajl/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/yajl/default.nix')
-rw-r--r--pkgs/development/libraries/yajl/default.nix27
1 files changed, 20 insertions, 7 deletions
diff --git a/pkgs/development/libraries/yajl/default.nix b/pkgs/development/libraries/yajl/default.nix
index 022284b0b13..dad884c2484 100644
--- a/pkgs/development/libraries/yajl/default.nix
+++ b/pkgs/development/libraries/yajl/default.nix
@@ -1,18 +1,30 @@
-{ lib, stdenv, fetchFromGitHub, cmake }:
+{ lib, stdenv, fetchFromGitHub, cmake, which, testers }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "yajl";
-  version = "2.1.0";
+  version = "unstable-2022-04-20";
 
   src = fetchFromGitHub {
-    owner = "lloyd";
+    owner = "containers";
     repo = "yajl";
-    rev = "refs/tags/${version}";
-    sha256 = "00yj06drb6izcxfxfqlhimlrb089kka0w0x8k27pyzyiq7qzcvml";
+    rev = "49923ccb2143e36850bcdeb781e2bcdf5ce22f15";
+    hash = "sha256-9bMPA5FpyBp8fvG/kkT/MnhYtdqg3QzOnmDFXKwJVW0=";
   };
 
+  patches = [
+    # https://github.com/containers/yajl/pull/1
+    ./cmake-shared-static-fix.patch
+  ];
+
   nativeBuildInputs = [ cmake ];
 
+  doCheck = true;
+  nativeCheckInputs = [ which ];
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  };
+
   meta = {
     description = "Yet Another JSON Library";
     longDescription = ''
@@ -21,7 +33,8 @@ stdenv.mkDerivation rec {
     '';
     homepage = "http://lloyd.github.com/yajl/";
     license = lib.licenses.isc;
+    pkgConfigModules = [ "yajl" ];
     platforms = with lib.platforms; linux ++ darwin;
     maintainers = with lib.maintainers; [ maggesi ];
   };
-}
+})