nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 makeWrapper,
6 asciidoc,
7 docbook_xml_dtd_45,
8 docbook_xsl,
9 coreutils,
10 cvs,
11 diffutils,
12 findutils,
13 git,
14 python3,
15 rsync,
16}:
17
18stdenv.mkDerivation (finalAttrs: {
19 pname = "cvs-fast-export";
20 version = "1.63";
21
22 src = fetchurl {
23 url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${finalAttrs.version}.tar.gz";
24 sha256 = "sha256-YZF2QebWbvn/N9pLpccudZsFHzocJp/3M0Gx9p7fQ5Y=";
25 };
26
27 strictDeps = true;
28 nativeBuildInputs = [
29 makeWrapper
30 asciidoc
31 ];
32 buildInputs = [ python3 ];
33
34 postPatch = ''
35 patchShebangs .
36 '';
37
38 preBuild = ''
39 makeFlagsArray=(
40 XML_CATALOG_FILES="${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml"
41 LIBS=""
42 prefix="$out"
43 )
44 '';
45
46 env = lib.optionalAttrs stdenv.cc.isClang {
47 NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
48 };
49
50 postInstall = ''
51 wrapProgram $out/bin/cvssync --prefix PATH : ${lib.makeBinPath [ rsync ]}
52 wrapProgram $out/bin/cvsconvert --prefix PATH : $out/bin:${
53 lib.makeBinPath [
54 coreutils
55 cvs
56 diffutils
57 findutils
58 git
59 ]
60 }
61 '';
62
63 meta = {
64 description = "Export an RCS or CVS history as a fast-import stream";
65 license = lib.licenses.gpl2Plus;
66 maintainers = with lib.maintainers; [ dfoxfranke ];
67 homepage = "http://www.catb.org/esr/cvs-fast-export/";
68 platforms = lib.platforms.unix;
69 };
70})