summary refs log tree commit diff
path: root/pkgs/tools/misc/debian-devscripts
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2012-10-07 18:02:46 +0400
committerMichael Raskin <7c6f434c@mail.ru>2012-10-07 18:02:46 +0400
commit749cc2bf1e1a25d4b53d1f50450da130a4bfaee5 (patch)
tree9ad7c945520d286513912117a2dee126c7b48ad4 /pkgs/tools/misc/debian-devscripts
parent25b4957e4aaaf1a341b683fc85f3ab6b89dd4d8c (diff)
downloadnixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.tar
nixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.tar.gz
nixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.tar.bz2
nixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.tar.lz
nixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.tar.xz
nixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.tar.zst
nixpkgs-749cc2bf1e1a25d4b53d1f50450da130a4bfaee5.zip
Adding Debian devscripts. Mostly for uscan.
I plan to later use uscan for simplifying package updates in some
NixPkgs packages. I have no code for that now.

I added Perl packages File::DesktopEntry and File::BaseDir in a slightly
hascky way because one part of the installation system replaced PREFIX=
with --prefix= and the other complained that it doesn't know what to do
with --prefix=. I checked that a script using File::DesktopEntry works,
and I don't know enough Perl to rewrite buildPerlPackage and hope that
my change is an improvement.

I removed trnaslated manpages because it uses po4a which has some more
Debian-specific dependencies of its own.
Diffstat (limited to 'pkgs/tools/misc/debian-devscripts')
-rw-r--r--pkgs/tools/misc/debian-devscripts/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/tools/misc/debian-devscripts/default.nix b/pkgs/tools/misc/debian-devscripts/default.nix
new file mode 100644
index 00000000000..693cf7c78bf
--- /dev/null
+++ b/pkgs/tools/misc/debian-devscripts/default.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchurl, perl, CryptSSLeay, LWP, unzip, xz, dpkg, TimeDate, DBFile
+  , FileDesktopEntry, libxslt, docbook_xsl, python, setuptools, makeWrapper
+}:
+stdenv.mkDerivation rec {
+  version = "2.12.4";
+  name = "debian-devscripts-${version}";
+  src = fetchurl {
+    url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.gz";
+    sha256 = "34bcbec78bd4fe34d9f1326b9d1477ff2410e20e2dca6b7bfbf2bf92dbb83904";
+  };
+  buildInputs = [ perl CryptSSLeay LWP unzip xz dpkg TimeDate DBFile 
+    FileDesktopEntry libxslt python setuptools makeWrapper ];
+  preConfigure = ''
+    export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${dpkg}";
+    sed -e "s@/usr/share/sgml/[^ ]*/manpages/docbook.xsl@${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl@" -i scripts/Makefile
+    sed -e 's/ translated_manpages//; s/--install-layout=deb//; s@--root="[^ ]*"@--prefix="'"$out"'"@' -i Makefile */Makefile
+    tgtpy="$out/lib/${python.libPrefix}/site-packages"
+    mkdir -p "$tgtpy"
+    export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$tgtpy"
+    sed -re "s@/usr( |$|/)@$out\\1@" -i Makefile* */Makefile*
+    sed -re "s@/etc( |$|/)@$out/etc\\1@" -i Makefile* */Makefile*
+  '';
+  postInstall = ''
+    for i in "$out/bin"/*; do
+      wrapProgram "$i" \
+        --prefix PERL5LIB : "$PERL5LIB" \
+        --prefix PERL5LIB : "$out/share/devscripts"
+    done
+  '';
+  meta = {
+    description = ''Debian package maintenance scripts'';
+    license = "GPL (variuous)"; # Mix of public domain, Artistic+GPL, GPL1+, GPL2+, GPL3+, and GPL2-only...
+  };
+}