summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2023-03-04 21:42:40 -0500
committerGitHub <noreply@github.com>2023-03-04 21:42:40 -0500
commit90b7007f46909b5dfbf3b5ac635682dad4e68ccb (patch)
treeeb2359b42520c2695d379ff76eed7863c9877946 /pkgs/development
parentbefd27b5795eb0b10302fd82c5bb961e427da9bb (diff)
parent9856006976e2276d474a1aff80725240125d7241 (diff)
downloadnixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.tar
nixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.tar.gz
nixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.tar.bz2
nixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.tar.lz
nixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.tar.xz
nixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.tar.zst
nixpkgs-90b7007f46909b5dfbf3b5ac635682dad4e68ccb.zip
Merge pull request #219611 from rdhale92/libsodium-pkg-config
libsodium: Add `meta.pkgConfigModules` and test
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/libsodium/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libsodium/default.nix b/pkgs/development/libraries/libsodium/default.nix
index bc8a2ced7cd..14e730d69e5 100644
--- a/pkgs/development/libraries/libsodium/default.nix
+++ b/pkgs/development/libraries/libsodium/default.nix
@@ -1,11 +1,13 @@
-{ lib, stdenv, fetchurl, autoreconfHook }:
+{ lib, stdenv, fetchurl, autoreconfHook
+, testers
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "libsodium";
   version = "1.0.18";
 
   src = fetchurl {
-    url = "https://download.libsodium.org/libsodium/releases/${pname}-${version}.tar.gz";
+    url = "https://download.libsodium.org/libsodium/releases/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
     sha256 = "1h9ncvj23qbbni958knzsli8dvybcswcjbx0qjjgi922nf848l3g";
   };
 
@@ -26,11 +28,14 @@ stdenv.mkDerivation rec {
 
   doCheck = true;
 
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
   meta = with lib; {
     description = "A modern and easy-to-use crypto library";
     homepage = "http://doc.libsodium.org/";
     license = licenses.isc;
     maintainers = with maintainers; [ raskin ];
+    pkgConfigModules = [ "libsodium" ];
     platforms = platforms.all;
   };
-}
+})