Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 54 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 testers, 7 8 # for passthru.tests 9 gtk3, 10 gtk4, 11 sassc, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "libsass"; 16 version = "3.6.6"; # also check sassc for updates 17 18 src = fetchFromGitHub { 19 owner = "sass"; 20 repo = "libsass"; 21 rev = finalAttrs.version; 22 hash = "sha256-FkLL3OAJXDptRQY6ZkYbss2pcc40f/wasIvEIyHRQFo="; 23 # Remove unicode file names which leads to different checksums on HFS+ 24 # vs. other filesystems because of unicode normalisation. 25 postFetch = '' 26 rm -r $out/test/e2e/unicode-pwd 27 ''; 28 }; 29 30 preConfigure = '' 31 export LIBSASS_VERSION=${finalAttrs.version} 32 ''; 33 34 nativeBuildInputs = [ autoreconfHook ]; 35 36 enableParallelBuilding = true; 37 38 passthru.tests = { 39 inherit gtk3 gtk4 sassc; 40 pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 41 }; 42 43 meta = with lib; { 44 description = "C/C++ implementation of a Sass compiler"; 45 homepage = "https://github.com/sass/libsass"; 46 license = licenses.mit; 47 maintainers = with maintainers; [ 48 codyopel 49 offline 50 ]; 51 pkgConfigModules = [ "libsass" ]; 52 platforms = platforms.unix; 53 }; 54})