1 { lib, stdenv, fetchurl, fetchpatch, nano }:
3 stdenv.mkDerivation rec {
8 url = "mirror://savannah/cvs/source/feature/${version}/cvs-${version}.tar.bz2";
9 sha256 = "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq";
15 ./CVE-2017-12836.patch
17 url = "https://raw.githubusercontent.com/Homebrew/formula-patches/24118ec737c7/cvs/vasnprintf-high-sierra-fix.diff";
18 sha256 = "1ql6aaia7xkfq3vqhlw5bd2z2ywka82zk01njs1b2szn699liymg";
22 hardeningDisable = [ "fortify" "format" ];
25 # Apply the Debian patches.
26 for p in "debian/patches/"*; do
27 echo "applying \`$p' ..."
28 patch --verbose -p1 < "$p"
33 "--with-editor=${nano}/bin/nano"
35 # Required for cross-compilation.
36 "cvs_cv_func_printf_ptr=yes"
40 "AR=${stdenv.cc.targetPrefix}ar"
43 env = lib.optionalAttrs (stdenv.isDarwin && stdenv.cc.isClang) {
44 NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
47 doCheck = false; # fails 1 of 1 tests
50 homepage = "http://cvs.nongnu.org";
51 description = "Concurrent Versions System - a source control system";
52 license = licenses.gpl2Plus; # library is GPLv2, main is GPLv1
53 platforms = platforms.all;