2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2023-10-19 13:55:26 +00:00
|
|
|
, testers
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, gtk3
|
|
|
|
, gtk4
|
|
|
|
, sassc
|
2023-10-19 13:55:26 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libsass";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "3.6.6"; # also check sassc for updates
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sass";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = finalAttrs.version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-FkLL3OAJXDptRQY6ZkYbss2pcc40f/wasIvEIyHRQFo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
2022-06-16 17:23:12 +00:00
|
|
|
postFetch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
rm -r $out/test/e2e/unicode-pwd
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
2023-10-19 13:55:26 +00:00
|
|
|
export LIBSASS_VERSION=${finalAttrs.version}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit gtk3 gtk4 sassc;
|
|
|
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
};
|
2023-10-19 13:55:26 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A C/C++ implementation of a Sass compiler";
|
|
|
|
homepage = "https://github.com/sass/libsass";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ codyopel offline ];
|
2023-10-19 13:55:26 +00:00
|
|
|
pkgConfigModules = [ "libsass" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2023-10-19 13:55:26 +00:00
|
|
|
})
|