mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
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.
This commit is contained in:
parent
25b4957e4a
commit
749cc2bf1e
34
pkgs/tools/misc/debian-devscripts/default.nix
Normal file
34
pkgs/tools/misc/debian-devscripts/default.nix
Normal file
@ -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...
|
||||
};
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
{stdenv, fetchurl, perl, zlib, bzip2}:
|
||||
{stdenv, fetchurl, perl, zlib, bzip2, xz}:
|
||||
|
||||
let version = "1.14.29"; in
|
||||
let version = "1.16.8"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "dpkg-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/d/dpkg/dpkg_${version}.tar.gz";
|
||||
sha256 = "0cynms4vziy957r4zskybbid87sz99vrfy8d999vlhxgc74c2zpa";
|
||||
url = "mirror://debian/pool/main/d/dpkg/dpkg_${version}.tar.xz";
|
||||
sha256 = "4a1f4611390d93f1f198d910d3a4e4913b3cf81702b31f585a1872ca98df0eaa";
|
||||
};
|
||||
|
||||
configureFlags = "--without-dselect --with-admindir=/var/lib/dpkg";
|
||||
configureFlags = "--disable-dselect --with-admindir=/var/lib/dpkg ";
|
||||
|
||||
preConfigure = ''
|
||||
# Can't use substitute pending resolution of NIXPKGS-89.
|
||||
@ -24,11 +24,12 @@ stdenv.mkDerivation {
|
||||
chmod +x $TMPDIR/dpkg
|
||||
PATH=$TMPDIR:$PATH
|
||||
|
||||
substituteInPlace src/Makefile.in --replace "install-data-local:" "disabled:"
|
||||
substituteInPlace dpkg-split/Makefile.in --replace "install-data-local:" "disabled:"
|
||||
for i in $(find . -name Makefile.in); do
|
||||
substituteInPlace $i --replace "install-data-local:" "disabled:" ;
|
||||
done
|
||||
'';
|
||||
|
||||
buildInputs = [ perl zlib bzip2 ];
|
||||
buildInputs = [ perl zlib bzip2 xz ];
|
||||
|
||||
meta = {
|
||||
description = "The Debian package manager";
|
||||
|
@ -587,6 +587,10 @@ let
|
||||
|
||||
dcraw = callPackage ../tools/graphics/dcraw { };
|
||||
|
||||
debian_devscripts = callPackage ../tools/misc/debian-devscripts {
|
||||
inherit (perlPackages) CryptSSLeay LWP TimeDate DBFile FileDesktopEntry;
|
||||
};
|
||||
|
||||
debootstrap = callPackage ../tools/misc/debootstrap { };
|
||||
|
||||
detox = callPackage ../tools/misc/detox { };
|
||||
|
@ -1578,6 +1578,19 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
FileBaseDir = buildPerlPackage rec {
|
||||
version = "0.03";
|
||||
name = "File-BaseDir-${version}";
|
||||
configurePhase = ''
|
||||
preConfigure || true
|
||||
perl Build.PL PREFIX="$out" prefix="$out"
|
||||
'';
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/modules/by-module/File/${name}.tar.gz";
|
||||
sha256 = "0029cba7a3b5d8aa5f7d03cb1b7ba2bcf2829382f7f26aa3bee06fce8611a886";
|
||||
};
|
||||
};
|
||||
|
||||
FileCopyRecursive = buildPerlPackage rec {
|
||||
name = "File-Copy-Recursive-0.38";
|
||||
src = fetchurl {
|
||||
@ -1586,6 +1599,20 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
FileDesktopEntry = buildPerlPackage rec {
|
||||
version = "0.04";
|
||||
name = "File-DesktopEntry-${version}";
|
||||
configurePhase = ''
|
||||
preConfigure || true
|
||||
perl Build.PL PREFIX="$out" prefix="$out"
|
||||
'';
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/modules/by-module/File/${name}.tar.gz";
|
||||
sha256 = "d7f80d8bd303651a43dc1810c73740d38a0d2b158fb33cd3b6ca4d3a566da7cb";
|
||||
};
|
||||
propagatedBuildInputs = [ FileBaseDir ];
|
||||
};
|
||||
|
||||
FileFindRule = buildPerlPackage rec {
|
||||
name = "File-Find-Rule-0.32";
|
||||
src = fetchurl {
|
||||
|
Loading…
Reference in New Issue
Block a user