From b972139a59f5647c399afcb71db9929edaec7768 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 28 Oct 2017 17:07:43 +0800 Subject: [PATCH] dpkg: 1.18.24 -> 1.19.0.4 (#30854) * dpkg: 1.18.24 -> 1.19.0.4 * dpkg: just use one substituteInPlace call --- .../tools/package-management/dpkg/default.nix | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/dpkg/default.nix b/pkgs/tools/package-management/dpkg/default.nix index 53c39003483d..63431e29facb 100644 --- a/pkgs/tools/package-management/dpkg/default.nix +++ b/pkgs/tools/package-management/dpkg/default.nix @@ -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 ];