about summary refs log tree commit diff
path: root/pkgs/applications/version-management/reposurgeon
diff options
context:
space:
mode:
authorDaniel Fox Franke <dfoxfranke@gmail.com>2015-08-25 20:08:33 -0400
committerDaniel Fox Franke <dfoxfranke@gmail.com>2015-08-25 22:06:07 -0400
commit686fec3ce75419f0fcc2aaefcce65ea0c1ac4867 (patch)
tree92d3c3cf42efe7a27e2007f316b453b6c8551876 /pkgs/applications/version-management/reposurgeon
parent2194295fffc068a0f035c4bf0ef1daea21912f78 (diff)
downloadnixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.tar
nixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.tar.gz
nixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.tar.bz2
nixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.tar.lz
nixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.tar.xz
nixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.tar.zst
nixlib-686fec3ce75419f0fcc2aaefcce65ea0c1ac4867.zip
reposurgeon: init at 3.28
Diffstat (limited to 'pkgs/applications/version-management/reposurgeon')
-rw-r--r--pkgs/applications/version-management/reposurgeon/default.nix66
-rw-r--r--pkgs/applications/version-management/reposurgeon/fix-preserve-type.patch12
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/reposurgeon/default.nix b/pkgs/applications/version-management/reposurgeon/default.nix
new file mode 100644
index 000000000000..5c2dde955721
--- /dev/null
+++ b/pkgs/applications/version-management/reposurgeon/default.nix
@@ -0,0 +1,66 @@
+{stdenv, fetchurl, makeWrapper, python27, python27Packages, git,
+ docbook_xml_dtd_412, docbook_xml_xslt, asciidoc, xmlto,
+ cython ? null,
+ bazaar ? null, cvs ? null, darcs ? null, fossil ? null,
+ mercurial ? null, monotone ? null, rcs ? null, src ? null,
+ subversion ? null, cvs_fast_export ? null }:
+with stdenv; with lib;
+mkDerivation rec {
+  name = "reposurgeon-${meta.version}";
+  meta = {
+    description = "A tool for editing version-control repository history";
+    version = "3.28";
+    license = licenses.bsd3;
+    homepage = "http://www.catb.org/esr/reposurgeon/";
+    maintainers = with maintainers; [ dfoxfranke ];
+    platforms = platforms.all;
+  };
+
+  src = fetchurl {
+    url = "http://www.catb.org/~esr/reposurgeon/reposurgeon-3.28.tar.gz";
+    sha256 = "3225b44109b8630310a0ea6fe63a3485d27aa46deaf80e8d07820e01a6f62626";
+  };
+
+  # See https://gitlab.com/esr/reposurgeon/issues/17
+  patches = [ ./fix-preserve-type.patch ];  
+
+  buildInputs =
+    [ docbook_xml_dtd_412 docbook_xml_xslt asciidoc xmlto makeWrapper ] ++
+    optional (cython != null) cython
+  ;
+
+  preBuild = ''
+    makeFlagsArray=(
+      XML_CATALOG_FILES="${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml ${docbook_xml_xslt}/xml/xsl/docbook/catalog.xml"
+      prefix="$out"
+      pyinclude="-I${python27}/include/python2.7"
+      pylib="-L${python27}/lib -lpython2.7"
+    )
+  '';
+
+  buildFlags = "all" + (if cython != null then " cyreposurgeon" else "");
+
+  installTargets =
+    "install" + (if cython != null then " install-cyreposurgeon" else "")
+  ;
+
+  postInstall =
+    let
+      binpath = makeSearchPath "bin" (
+        filter (x: x != null)
+        [ out git bazaar cvs darcs fossil mercurial
+          monotone rcs src subversion cvs_fast_export ]
+      );
+      pythonpath = makeSearchPath (python27.sitePackages) (
+        filter (x: x != null)
+        [ python27Packages.readline or null python27Packages.hglib or null ]
+      );
+    in ''
+      for prog in reposurgeon repodiffer repotool; do
+        wrapProgram $out/bin/$prog \
+          --prefix PATH : "${binpath}" \
+          --prefix PYTHONPATH : "${pythonpath}"
+      done
+    ''
+  ;    
+}
diff --git a/pkgs/applications/version-management/reposurgeon/fix-preserve-type.patch b/pkgs/applications/version-management/reposurgeon/fix-preserve-type.patch
new file mode 100644
index 000000000000..ef3568b7b927
--- /dev/null
+++ b/pkgs/applications/version-management/reposurgeon/fix-preserve-type.patch
@@ -0,0 +1,12 @@
+diff -Nru reposurgeon-3.28/reposurgeon reposurgeon-3.28-new/reposurgeon
+--- reposurgeon-3.28/reposurgeon	2015-07-05 15:17:13.000000000 -0400
++++ reposurgeon-3.28-new/reposurgeon	2015-08-25 18:23:11.347591137 -0400
+@@ -193,7 +193,7 @@
+         importer=b"git fast-import --quiet",
+         checkout=b"git checkout",
+         lister=b"git ls-files",
+-        preserve=(b'.git/config', b'.git/hooks'),
++        preserve=set((b'.git/config', b'.git/hooks')),
+         authormap=b".git/cvs-authors",
+         ignorename=b".gitignore",
+         dfltignores=b"",	# Has none