2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2019-12-15 23:15:35 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, autoreconfHook
|
|
|
|
, zlib
|
|
|
|
}:
|
2017-03-25 03:37:56 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "advancecomp";
|
2018-02-24 23:16:49 +01:00
|
|
|
version = "2.1";
|
2017-03-25 03:37:56 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amadvance";
|
|
|
|
repo = "advancecomp";
|
|
|
|
rev = "v${version}";
|
2018-02-24 23:16:49 +01:00
|
|
|
sha256 = "1pd6czamamrd0ppk5a3a65hcgdlqwja98aandhqiajhnibwldv8x";
|
2014-09-17 09:27:13 +02:00
|
|
|
};
|
2017-03-25 03:37:56 +01:00
|
|
|
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2019-12-15 23:15:35 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2019-9210.patch";
|
|
|
|
url = "https://github.com/amadvance/advancecomp/commit/fcf71a89265c78fc26243574dda3a872574a5c02.patch";
|
|
|
|
sha256 = "0cdv9g87c1y8zwhqkd9ba2zjw4slcvg7yzcqv43idvnwb5fl29n7";
|
|
|
|
excludes = [ "doc/history.d" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-13 10:19:44 +02:00
|
|
|
# autover.sh relies on 'git describe', which obviously doesn't work as we're not cloning
|
|
|
|
# the full git repo. so we have to put the version number in `.version`, otherwise
|
|
|
|
# the binaries get built reporting "none" as their version number.
|
|
|
|
postPatch = ''
|
|
|
|
echo "${version}" >.version
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-01-24 10:19:10 +01:00
|
|
|
description = "A set of tools to optimize deflate-compressed files";
|
2017-04-07 20:33:56 +02:00
|
|
|
license = licenses.gpl3 ;
|
2017-03-25 03:37:56 +01:00
|
|
|
maintainers = [ maintainers.raskin ];
|
2019-07-28 08:25:17 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/amadvance/advancecomp";
|
2017-03-25 03:37:56 +01:00
|
|
|
|
2014-09-17 09:27:13 +02:00
|
|
|
};
|
|
|
|
}
|