···
glibc ? !stdenv.hostPlatform.isDarwin,
20
-
stdenv.mkDerivation rec {
21
+
stdenv.mkDerivation (finalAttrs: {
url = "https://git.launchpad.net/ubuntu/+source/dpkg";
26
-
rev = "applied/${version}";
27
-
hash = "sha256-UiXZfwvgsgyXR6olNzKelt/3Fgtp7KU8UbTRRkDl8wY=";
27
+
tag = "applied/${finalAttrs.version}";
29
+
# Fix filename conflict on case-insensitive filesystems
32
+
git checkout HEAD -- scripts/t/Dpkg_BuildTree.t
33
+
mv scripts/t/Dpkg_BuildTree.t scripts/t/Dpkg_BuildTreeC.t
34
+
substituteInPlace scripts/Makefile.am --replace-fail t/Dpkg_BuildTree.t t/Dpkg_BuildTreeC.t
35
+
substituteInPlace scripts/Makefile.in --replace-fail t/Dpkg_BuildTree.t t/Dpkg_BuildTreeC.t
36
+
git checkout HEAD -- scripts/t/dpkg_buildtree.t
40
+
hash = "sha256-LK6nOPewjRyKyHdwJgmLILoZ6sEfJzRtC7pIeWz01lA=";
···
for i in $(find . -name Makefile.in); do
51
-
substituteInPlace $i --replace "install-data-local:" "disabled:" ;
64
+
substituteInPlace $i --replace-quiet "install-data-local:" "disabled:" ;
# Skip check broken when cross-compiling.
···
# Dpkg commands sometimes calls out to shell commands
substituteInPlace lib/dpkg/dpkg.h \
64
-
--replace '"dpkg-deb"' \"$out/bin/dpkg-deb\" \
65
-
--replace '"dpkg-split"' \"$out/bin/dpkg-split\" \
66
-
--replace '"dpkg-query"' \"$out/bin/dpkg-query\" \
67
-
--replace '"dpkg-divert"' \"$out/bin/dpkg-divert\" \
68
-
--replace '"dpkg-statoverride"' \"$out/bin/dpkg-statoverride\" \
69
-
--replace '"dpkg-trigger"' \"$out/bin/dpkg-trigger\" \
70
-
--replace '"dpkg"' \"$out/bin/dpkg\" \
71
-
--replace '"debsig-verify"' \"$out/bin/debsig-verify\" \
72
-
--replace '"rm"' \"${coreutils}/bin/rm\" \
73
-
--replace '"cat"' \"${coreutils}/bin/cat\" \
74
-
--replace '"diff"' \"${diffutils}/bin/diff\"
77
+
--replace-fail '"dpkg-deb"' \"$out/bin/dpkg-deb\" \
78
+
--replace-fail '"dpkg-split"' \"$out/bin/dpkg-split\" \
79
+
--replace-fail '"dpkg-query"' \"$out/bin/dpkg-query\" \
80
+
--replace-fail '"dpkg-divert"' \"$out/bin/dpkg-divert\" \
81
+
--replace-fail '"dpkg-statoverride"' \"$out/bin/dpkg-statoverride\" \
82
+
--replace-fail '"dpkg-trigger"' \"$out/bin/dpkg-trigger\" \
83
+
--replace-fail '"dpkg"' \"$out/bin/dpkg\" \
84
+
--replace-fail '"debsig-verify"' \"$out/bin/debsig-verify\" \
85
+
--replace-fail '"rm"' \"${coreutils}/bin/rm\" \
86
+
--replace-fail '"cat"' \"${coreutils}/bin/cat\" \
87
+
--replace-fail '"diff"' \"${diffutils}/bin/diff\"
89
+
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
90
+
# realpath("/var/lib/dpkg", NULL) gives EPERM on sandboxed darwin instead of the expected ENOENT,
91
+
# which makes some tests fail.
92
+
sed -i '/opts normalize/a AT_SKIP_IF([true])' src/at/chdir.at
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
substituteInPlace src/main/help.c \
78
-
--replace '"ldconfig"' \"${glibc.bin}/bin/ldconfig\"
96
+
--replace-fail '"ldconfig"' \"${glibc.bin}/bin/ldconfig\"
···
if head -n 1 $i | grep -q perl; then
99
-
substituteInPlace $i --replace \
117
+
substituteInPlace $i --replace-fail \
"${perl}/bin/perl" "${perl}/bin/perl -I $out/${perl.libPrefix}"
···
cp -r scripts/t/origins $out/etc/dpkg
126
+
doInstallCheck = true;
127
+
nativeInstallCheckInputs = [ versionCheckHook ];
128
+
versionCheckProgramArg = "--version";
setupHook = ./setup-hook.sh;
···
homepage = "https://wiki.debian.org/Teams/Dpkg";
license = licenses.gpl2Plus;
platforms = platforms.unix;
115
-
broken = stdenv.hostPlatform.isDarwin;
maintainers = with maintainers; [ siriobalmelli ];
138
+
mainProgram = "dpkg";