21 sendmailPath ? "/run/wrappers/bin/sendmail",
25 inherit (python3Packages) python setuptools;
26 sensible-editor = writeShellScript "sensible-editor" ''
27 exec ''${EDITOR-${nano}/bin/nano} "$@"
30 stdenv.mkDerivation rec {
32 pname = "debian-devscripts";
35 url = "mirror://debian/pool/main/d/devscripts/devscripts_${version}.tar.xz";
36 hash = "sha256-j0fUVTS/lPKFdgeMhksiJz2+E5koB07IK2uEj55EWG0=";
41 name = "hardening-check-obey-binutils-env-vars.patch";
42 url = "https://github.com/Debian/devscripts/pull/2/commits/c6a018e0ef50a1b0cb4962a2f96dae7c6f21f1d4.patch";
43 hash = "sha256-UpS239JiAM1IYxNuJLdILq2h0xlR5t0Tzhj47xiMHww=";
48 substituteInPlace scripts/Makefile --replace /usr/share/dpkg ${dpkg}/share/dpkg
49 substituteInPlace scripts/debrebuild.pl --replace /usr/bin/perl ${perlPackages.perl}/bin/perl
70 ++ (with perlPackages; [
87 export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${dpkg}";
88 tgtpy="$out/${python.sitePackages}"
90 export PYTHONPATH="$PYTHONPATH''${PYTHONPATH:+:}$tgtpy"
91 find lib po4a scripts -type f -exec sed -r \
92 -e "s@/usr/bin/gpg(2|)@${gnupg}/bin/gpg@g" \
93 -e "s@/usr/(s|)bin/sendmail@${sendmailPath}@g" \
94 -e "s@/usr/bin/diff@${diffutils}/bin/diff@g" \
95 -e "s@/usr/bin/gpgv(2|)@${gnupg}/bin/gpgv@g" \
96 -e "s@(command -v|/usr/bin/)curl@${curl.bin}/bin/curl@g" \
97 -e "s@sensible-editor@${sensible-editor}@g" \
98 -e "s@(^|\W)/bin/bash@\1${stdenv.shell}@g" \
100 sed -e "s@/usr/share/sgml/[^ ]*/manpages/docbook.xsl@${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl@" -i scripts/Makefile
102 -e "s@/usr( |$|/)@$out\\1@g" \
103 -e "s@/etc( |$|/)@$out/etc\\1@g" \
104 -e 's/ translated_manpages//; s/--install-layout=deb//; s@--root="[^ ]*"@--prefix="'"$out"'"@' \
105 -i Makefile* */Makefile*
111 "COMPL_DIR=/share/bash-completion/completions"
112 "PERLMOD_DIR=/share/devscripts"
116 sed -re 's@(^|[ !`"])/bin/bash@\1${stdenv.shell}@g' -i "$out/bin"/*
117 for i in "$out/bin"/*; do
119 --prefix PERL5LIB : "$PERL5LIB" \
120 --prefix PERL5LIB : "$out/share/devscripts" \
121 --prefix PYTHONPATH : "$out/${python.sitePackages}" \
122 --prefix PATH : "${dpkg}/bin"
124 ln -s cvs-debi $out/bin/cvs-debc
125 ln -s debchange $out/bin/dch
126 ln -s pts-subscribe $out/bin/pts-unsubscribe
130 description = "Debian package maintenance scripts";
131 license = licenses.free; # Mix of public domain, Artistic+GPL, GPL1+, GPL2+, GPL3+, and GPL2-only... TODO
132 maintainers = with maintainers; [ raskin ];
133 platforms = platforms.unix;