nixpkgs/pkgs/applications/version-management/cvs/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

42 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, nano }:
stdenv.mkDerivation {
name = "cvs-1.12.13";
src = fetchurl {
url = "mirror://savannah/cvs/source/feature/1.12.13/cvs-1.12.13.tar.bz2";
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
'';
buildInputs = [ nano ];
doCheck = false; # fails 1 of 1 tests
meta = with lib; {
homepage = "http://cvs.nongnu.org";
description = "Concurrent Versions System - a source control system";
license = licenses.gpl2; # library is GPLv2, main is GPLv1
platforms = platforms.all;
};
}