2023-12-16 15:20:05 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, autoreconfHook
|
2023-10-16 03:00:53 +00:00
|
|
|
, testers
|
2023-12-16 15:20:05 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, gtk3
|
|
|
|
, gtk4
|
|
|
|
, sassc
|
2023-10-16 03:00:53 +00:00
|
|
|
}:
|
2015-02-14 22:33:36 +00:00
|
|
|
|
2023-10-16 03:00:53 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-05-22 02:29:28 +00:00
|
|
|
pname = "libsass";
|
2021-11-12 17:22:33 +00:00
|
|
|
version = "3.6.5"; # also check sassc for updates
|
2015-02-14 22:33:36 +00:00
|
|
|
|
2019-05-22 02:29:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sass";
|
2023-10-16 03:00:53 +00:00
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = finalAttrs.version;
|
2021-05-20 04:20:00 +00:00
|
|
|
sha256 = "1cxj6r85d5f3qxdwzxrmkx8z875hig4cr8zsi30w6vj23cyds3l2";
|
2019-05-22 02:29:28 +00:00
|
|
|
# Remove unicode file names which leads to different checksums on HFS+
|
|
|
|
# vs. other filesystems because of unicode normalisation.
|
2022-05-17 19:10:33 +00:00
|
|
|
postFetch = ''
|
2019-05-22 02:29:28 +00:00
|
|
|
rm -r $out/test/e2e/unicode-pwd
|
|
|
|
'';
|
2015-02-14 22:33:36 +00:00
|
|
|
};
|
|
|
|
|
2023-12-16 12:28:29 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2022-26592.CVE-2022-43357.CVE-2022-43358.patch";
|
|
|
|
url = "https://github.com/sass/libsass/pull/3184/commits/5bb0ea0c4b2ebebe542933f788ffacba459a717a.patch";
|
|
|
|
hash = "sha256-DR6pKFWL70uJt//drzq34LeTzT8rUqgUTpgfUHpD2s4=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-07-20 15:43:03 +00:00
|
|
|
preConfigure = ''
|
2023-10-16 03:00:53 +00:00
|
|
|
export LIBSASS_VERSION=${finalAttrs.version}
|
2015-02-14 22:33:36 +00:00
|
|
|
'';
|
|
|
|
|
2015-05-07 13:50:50 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2015-02-14 22:33:36 +00:00
|
|
|
|
2023-12-16 15:20:05 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit gtk3 gtk4 sassc;
|
|
|
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
};
|
2023-10-16 03:00:53 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-02-14 22:33:36 +00:00
|
|
|
description = "A C/C++ implementation of a Sass compiler";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/sass/libsass";
|
2015-05-07 13:50:50 +00:00
|
|
|
license = licenses.mit;
|
2015-06-01 05:27:46 +00:00
|
|
|
maintainers = with maintainers; [ codyopel offline ];
|
2023-10-16 03:00:53 +00:00
|
|
|
pkgConfigModules = [ "libsass" ];
|
2015-05-07 13:50:50 +00:00
|
|
|
platforms = platforms.unix;
|
2015-02-14 22:33:36 +00:00
|
|
|
};
|
2023-10-16 03:00:53 +00:00
|
|
|
})
|