forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#122854 from dguibert/dg/reposurgeon
reposurgeon: 3.44 -> 4.26
- Loading branch information
Showing
1 changed file
with
29 additions
and
51 deletions.
There are no files selected for viewing
80 changes: 29 additions & 51 deletions
80
pkgs/applications/version-management/reposurgeon/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,38 @@ | ||
{ lib, stdenv, fetchurl, makeWrapper, python27Packages, git | ||
, docbook_xml_dtd_412, docbook_xsl, asciidoc, xmlto, pypy | ||
, breezy ? null, cvs ? null, darcs ? null, fossil ? null | ||
, mercurial ? null, monotone ? null, rcs ? null | ||
, subversion ? null, cvs_fast_export ? null }: | ||
|
||
with stdenv; with lib; | ||
let | ||
inherit (python27Packages) python; | ||
in mkDerivation rec { | ||
name = "reposurgeon-${meta.version}"; | ||
meta = { | ||
description = "A tool for editing version-control repository history"; | ||
version = "3.44"; | ||
license = licenses.bsd3; | ||
homepage = "http://www.catb.org/esr/reposurgeon/"; | ||
maintainers = with maintainers; [ dfoxfranke ]; | ||
platforms = platforms.all; | ||
}; | ||
{ lib, stdenv, fetchurl, makeWrapper, buildGoModule, git | ||
, asciidoctor, ruby | ||
}: | ||
|
||
buildGoModule rec { | ||
pname = "reposurgeon"; | ||
version = "4.26"; | ||
|
||
src = fetchurl { | ||
url = "http://www.catb.org/~esr/reposurgeon/reposurgeon-3.44.tar.xz"; | ||
sha256 = "0il6hwrsm2qgg0vp5fcjh478y2x4zyw3mx2apcwc7svfj86pf7pn"; | ||
url = "http://www.catb.org/~esr/reposurgeon/reposurgeon-${version}.tar.xz"; | ||
sha256 = "sha256-FuL5pvIM468hEm6rUBKGW6+WlYv4DPHNnpwpRGzMwlY="; | ||
}; | ||
|
||
# install fails because the files README.md, NEWS, and TODO were not included in the source distribution | ||
patches = [ ./fix-makefile.patch ]; | ||
vendorSha256 = "sha256-KpdXI2Znhe0iCp0DjSZXzUYDZIz2KBRv1/SpaRTFMAc="; | ||
|
||
subPackages = [ "." ]; | ||
|
||
runVend = true; | ||
|
||
buildInputs = | ||
[ docbook_xml_dtd_412 docbook_xsl asciidoc xmlto makeWrapper pypy ]; | ||
nativeBuildInputs = [ asciidoctor ruby ]; | ||
|
||
preBuild = '' | ||
makeFlagsArray=( | ||
XML_CATALOG_FILES="${docbook_xml_dtd_412}/xml/dtd/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml" | ||
prefix="$out" | ||
pyinclude="-I${python}/include/python2.7" | ||
pylib="-L${python}/lib -lpython2.7" | ||
) | ||
postBuild = '' | ||
patchShebangs . | ||
make all HTMLFILES= | ||
''; | ||
|
||
postInstall = | ||
let | ||
binpath = makeBinPath ( | ||
filter (x: x != null) | ||
[ out git breezy cvs darcs fossil mercurial | ||
monotone rcs src subversion cvs_fast_export ] | ||
); | ||
pythonpath = makeSearchPathOutput "lib" python.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 | ||
'' | ||
; | ||
postInstall = '' | ||
make install prefix=$out HTMLFILES= | ||
''; | ||
|
||
meta = { | ||
description = "A tool for editing version-control repository history"; | ||
license = lib.licenses.bsd3; | ||
homepage = "http://www.catb.org/esr/reposurgeon/"; | ||
maintainers = with lib.maintainers; [ dfoxfranke ]; | ||
platforms = lib.platforms.all; | ||
}; | ||
} |