summary refs log tree commit diff
path: root/pkgs/development/libraries/libsass/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libsass/default.nix')
-rw-r--r--pkgs/development/libraries/libsass/default.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/pkgs/development/libraries/libsass/default.nix b/pkgs/development/libraries/libsass/default.nix
index f4293952b9f..92f3853b5f7 100644
--- a/pkgs/development/libraries/libsass/default.nix
+++ b/pkgs/development/libraries/libsass/default.nix
@@ -1,13 +1,15 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+{ lib, stdenv, fetchFromGitHub, autoreconfHook
+, testers
+}:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "libsass";
   version = "3.6.5"; # also check sassc for updates
 
   src = fetchFromGitHub {
     owner = "sass";
-    repo = pname;
-    rev = version;
+    repo = finalAttrs.pname;
+    rev = finalAttrs.version;
     sha256 = "1cxj6r85d5f3qxdwzxrmkx8z875hig4cr8zsi30w6vj23cyds3l2";
     # Remove unicode file names which leads to different checksums on HFS+
     # vs. other filesystems because of unicode normalisation.
@@ -17,16 +19,19 @@ stdenv.mkDerivation rec {
   };
 
   preConfigure = ''
-    export LIBSASS_VERSION=${version}
+    export LIBSASS_VERSION=${finalAttrs.version}
   '';
 
   nativeBuildInputs = [ autoreconfHook ];
 
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
   meta = with lib; {
     description = "A C/C++ implementation of a Sass compiler";
     homepage = "https://github.com/sass/libsass";
     license = licenses.mit;
     maintainers = with maintainers; [ codyopel offline ];
+    pkgConfigModules = [ "libsass" ];
     platforms = platforms.unix;
   };
-}
+})