dpkg: 1.18.24 -> 1.19.0.4 (#30854)

* dpkg: 1.18.24 -> 1.19.0.4

* dpkg: just use one substituteInPlace call
This commit is contained in:
adisbladis 2017-10-28 17:07:43 +08:00 committed by Jörg Thalheim
parent 8d338d8238
commit b972139a59

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl, zlib, bzip2, xz, makeWrapper }:
{ stdenv, fetchurl, perl, zlib, bzip2, xz, makeWrapper, coreutils }:
stdenv.mkDerivation rec {
name = "dpkg-${version}";
version = "1.18.24";
version = "1.19.0.4";
src = fetchurl {
url = "mirror://debian/pool/main/d/dpkg/dpkg_${version}.tar.xz";
sha256 = "1d6p22vk1b9v16q96mwaz9w2xr4ly28yamkh49md9gq67qfhhlyq";
sha256 = "02lrwrkl2g1jwj71088rwswx07a1zq1jkq7193lbvy8jj2qnp9lq";
};
configureFlags = [
@ -31,6 +31,24 @@ stdenv.mkDerivation rec {
done
'';
patchPhase = ''
patchShebangs .
# Dpkg commands sometimes calls out to shell commands
substituteInPlace lib/dpkg/dpkg.h \
--replace '"dpkg-deb"' \"$out/bin/dpkg-deb\" \
--replace '"dpkg-split"' \"$out/bin/dpkg-split\" \
--replace '"dpkg-query"' \"$out/bin/dpkg-query\" \
--replace '"dpkg-divert"' \"$out/bin/dpkg-divert\" \
--replace '"dpkg-statoverride"' \"$out/bin/dpkg-statoverride\" \
--replace '"dpkg-trigger"' \"$out/bin/dpkg-trigger\" \
--replace '"dpkg"' \"$out/bin/dpkg\" \
--replace '"debsig-verify"' \"$out/bin/debsig-verify\" \
--replace '"rm"' \"${coreutils}/bin/rm\" \
--replace '"cat"' \"${coreutils}/bin/cat\" \
--replace '"diff"' \"${coreutils}/bin/diff\"
'';
buildInputs = [ perl zlib bzip2 xz ];
nativeBuildInputs = [ makeWrapper ];