2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, nano }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cvs";
|
|
|
|
version = "1.12.13";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://savannah/cvs/source/feature/${version}/cvs-${version}.tar.bz2";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./getcwd-chroot.patch
|
|
|
|
./CVE-2012-0804.patch
|
|
|
|
./CVE-2017-12836.patch
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/24118ec737c7/cvs/vasnprintf-high-sierra-fix.diff";
|
|
|
|
sha256 = "1ql6aaia7xkfq3vqhlw5bd2z2ywka82zk01njs1b2szn699liymg";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
hardeningDisable = [ "fortify" "format" ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
# Apply the Debian patches.
|
|
|
|
for p in "debian/patches/"*; do
|
|
|
|
echo "applying \`$p' ..."
|
|
|
|
patch --verbose -p1 < "$p"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-editor=${nano}/bin/nano"
|
|
|
|
|
|
|
|
# Required for cross-compilation.
|
|
|
|
"cvs_cv_func_printf_ptr=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"AR=${stdenv.cc.targetPrefix}ar"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = false; # fails 1 of 1 tests
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://cvs.nongnu.org";
|
|
|
|
description = "Concurrent Versions System - a source control system";
|
2021-04-13 19:44:15 +00:00
|
|
|
license = licenses.gpl2Plus; # library is GPLv2, main is GPLv1
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|