about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/cvs-fast-export/default.nix
blob: d6727d327ce5cb23fe27cb693fbe75c168ab2a7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib, stdenv, fetchurl, makeWrapper, asciidoc, docbook_xml_dtd_45, docbook_xsl
, coreutils, cvs, diffutils, findutils, git, python3, rsync
}:

stdenv.mkDerivation rec {
  pname = "cvs-fast-export";
  version = "1.61";

  src = fetchurl {
    url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz";
    sha256 = "sha256-4iH8VKxVliVZKwZ40rGMb3fH1nxTBdMT5IcBzdp1mjw=";
  };

  strictDeps = true;
  nativeBuildInputs = [ makeWrapper asciidoc ];
  buildInputs = [ python3 ];

  postPatch = ''
    patchShebangs .
  '';

  preBuild = ''
    makeFlagsArray=(
      XML_CATALOG_FILES="${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml"
      LIBS=""
      prefix="$out"
    )
  '';

  postInstall = ''
    wrapProgram $out/bin/cvssync --prefix PATH : ${lib.makeBinPath [ rsync ]}
    wrapProgram $out/bin/cvsconvert --prefix PATH : $out/bin:${lib.makeBinPath [
      coreutils cvs diffutils findutils git
    ]}
  '';

  meta = with lib; {
    description = "Export an RCS or CVS history as a fast-import stream";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ dfoxfranke ];
    homepage = "http://www.catb.org/esr/cvs-fast-export/";
    platforms = platforms.unix;
  };
}