treewide: use dpkg setup hook (#359417)

This commit is contained in:
Philip Taron 2024-11-27 16:11:23 -08:00 committed by GitHub
commit 76fe013a4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
55 changed files with 31 additions and 232 deletions

View File

@ -15,11 +15,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook3 ];
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
dontBuild = true;
dontWrapGApps = true; # we only want $gappsWrapperArgs here

View File

@ -33,11 +33,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook3 ];
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
dontBuild = true;
dontWrapGApps = true; # we only want $gappsWrapperArgs here

View File

@ -32,17 +32,13 @@ stdenv.mkDerivation rec {
version = "5.2.5";
src = fetchurl {
name = "bitwig-studio-${version}.deb";
url = "https://www.bitwig.com/dl/Bitwig%20Studio/${version}/installer_linux/";
hash = "sha256-x6Uw6o+a3nArMm1Ev5ytGtLDGQ3r872WqlC022zT8Hk=";
};
nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook3 ];
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
dontBuild = true;
dontWrapGApps = true; # we only want $gappsWrapperArgs here

View File

@ -33,8 +33,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper dpkg desktop-file-utils asar ];
unpackPhase = "dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner";
installPhase = let
libPath = lib.makeLibraryPath [
libsecret

View File

@ -18,15 +18,10 @@ in mkDerivation {
sha256 = "10027a3ab18efd04ca75aa699ff550eca3bdfe6f7084460d3c00001bffb50070";
};
unpackPhase = ''
dpkg -x $src oda_unpacked
sourceRoot=$PWD/oda_unpacked
'';
installPhase = ''
mkdir -p $out/bin $out/lib
cp -vr $sourceRoot/usr/bin/ODAFileConverter_${version} $out/libexec
cp -vr $sourceRoot/usr/share $out/share
cp -vr usr/bin/ODAFileConverter_${version} $out/libexec
cp -vr usr/share $out/share
'';
dontWrapQtApps = true;

View File

@ -33,14 +33,6 @@ stdenvNoCC.mkDerivation {
sha256 = "sha256-9F56u+jYj2CClhbnGlLi65FxS1Vq00coxwu7mjVTY1w=";
};
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
nativeBuildInputs = [ dpkg autoPatchelfHook makeWrapper ];
buildInputs = [

View File

@ -46,7 +46,6 @@ let
})
];
unpackCmd = "dpkg-deb -x $src ./${program}-${version}";
dontBuild = true;
postPatch = ''

View File

@ -20,11 +20,7 @@ in mkDerivation rec {
nativeBuildInputs = [ dpkg ];
# avoid https://github.com/NixOS/patchelf/issues/99
dontStrip = true;
unpackPhase = ''
mkdir pkg
dpkg-deb -x $src pkg
sourceRoot=pkg
'';
installPhase = ''
mkdir -p $out/bin
cp usr/bin/rescuetime $out/bin

View File

@ -24,8 +24,6 @@ let
makeWrapper
];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p $out/bin
mv usr/share $out/share

View File

@ -71,8 +71,6 @@ in stdenv.mkDerivation (rec {
];
runtimeDependencies = [ libglvnd (lib.getLib stdenv.cc.cc) (lib.getLib udev) libnotify libappindicator-gtk3 ];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p $out/bin
cp -r opt $out

View File

@ -99,8 +99,6 @@ stdenv.mkDerivation {
dontBuild = true;
dontConfigure = true;
unpackPhase = "dpkg-deb -x $src .";
runtimeDependencies = [ (lib.getLib systemd) libGL libnotify libappindicator wayland ];
installPhase = ''

View File

@ -6,6 +6,7 @@ stdenv.mkDerivation rec {
version = "3.5.9";
src = fetchurl {
name = "morgen-${version}.deb";
url = "https://dl.todesktop.com/210203cqcj00tw1/versions/${version}/linux/deb";
hash = "sha256-ZKlj/QuQnrqQepsJY6KCROC2fXK/4Py5tmI/FVnRi9w=";
};
@ -19,10 +20,6 @@ stdenv.mkDerivation rec {
buildInputs = [ alsa-lib gtk3 libxshmfence mesa nss ];
unpackCmd = ''
dpkg-deb -x ${src} ./morgen-${pname}
'';
installPhase = ''
runHook preInstall

View File

@ -50,10 +50,6 @@ stdenv.mkDerivation rec {
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall

View File

@ -14,12 +14,6 @@ stdenv.mkDerivation rec {
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
installPhase = ''
runHook preInstall
substituteInPlace usr/bin/bdf2psf --replace /usr/bin/perl "${perl}/bin/perl"

View File

@ -64,8 +64,6 @@ stdenv.mkDerivation rec {
udev
];
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";
dontBuild = true;
dontStrip = true;
dontWrapGApps = true;

View File

@ -189,12 +189,6 @@ stdenv.mkDerivation {
adwaita-icon-theme
];
unpackPhase =
if stdenv.hostPlatform.isLinux then
"dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner"
else
"unzip $src";
installPhase =
lib.optionalString stdenv.hostPlatform.isLinux ''
runHook preInstall

View File

@ -38,8 +38,6 @@ stdenv.mkDerivation rec {
hash = "sha256-N5VCBZLFrfw29QjjzlSvQ12urvyaf7ez/RJ08UwqHdk=";
};
unpackPhase = "dpkg-deb -x $src .";
patches = [
# The brother lpdwrapper uses a temporary file to convey the printer settings.
# The original settings file will be copied with "400" permissions and the "brprintconflsr3"

View File

@ -16,9 +16,6 @@ stdenv.mkDerivation (finalAttrs: {
curlOpts = "--user-agent Mozilla/5.0"; # HTTP 410 otherwise
};
sourceRoot = ".";
unpackCmd = "dpkg-deb -x $curSrc .";
nativeBuildInputs = [
autoPatchelfHook
dpkg

View File

@ -11,11 +11,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
nativeBuildInputs = [ dpkg qt5.wrapQtAppsHook autoPatchelfHook ];
unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';
dontBuild = true;
buildInputs = [

View File

@ -20,8 +20,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper dpkg ];
unpackPhase = "dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner";
installPhase = ''
runHook preInstall

View File

@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
glib-networking
];
unpackCmd = "dpkg-deb -x $curSrc source";
installPhase = ''
mv usr $out
mv $out/bin/holochain-launcher-${prerelease} $out/bin/holochain-launcher

View File

@ -24,12 +24,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ dpkg ];
unpackPhase = ''
mkdir pkg
dpkg-deb -x $src pkg
sourceRoot=pkg
'';
installPhase = ''
mkdir -p "$out/bin"
mv opt "$out/"

View File

@ -131,12 +131,6 @@ stdenv.mkDerivation (finalAttrs: {
libsForQt5.quazip
];
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
installPhase = ''
runHook preInstall

View File

@ -19,14 +19,6 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ dpkg ];
unpackPhase = ''
runHook preUnpack
dpkg-deb --fsys-tarfile "$src" | tar -x --no-same-permissions --no-same-owner
runHook postUnpack
'';
installPhase = ''
runHook preInstall

View File

@ -46,14 +46,6 @@ let
libthai
] ++ (with libsForQt5; [ qt5.qtvirtualkeyboard ]);
unpackPhase = ''
runHook preUnpack
dpkg-deb --fsys-tarfile "$src" | tar -x --no-same-permissions --no-same-owner
runHook postUnpack
'';
installPhase = ''
runHook preInstall

View File

@ -20,10 +20,10 @@ stdenv.mkDerivation rec {
hash = "sha256-UPkUwZV3NIeVfL3yYvqOhm4X5xW+40GOlZGy8WGhYmk=";
};
sourceRoot = ".";
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src .";
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
dpkg
makeWrapper
];
buildInputs = [ jdk ];

View File

@ -15,8 +15,6 @@ stdenv.mkDerivation {
dontBuild = true;
unpackCmd = "dpkg-deb -x $src debcontents";
installPhase = ''
runHook preInstall
substituteInPlace usr/share/${pname}/${pname}.sh \

View File

@ -112,14 +112,11 @@ else
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook3
dpkg
];
buildInputs = libraries;
unpackPhase = ''
${dpkg}/bin/dpkg-deb --fsys-tarfile $src | tar --extract
'';
installPhase = ''
runHook preInstall

View File

@ -40,7 +40,6 @@ stdenv.mkDerivation rec {
sha256 = "sha256-gHn1xqBc7M9wkek1Ja1gry8TKIuUxQP8T45x3z2S4uc=";
};
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper dpkg ];
buildInputs = [
glib
@ -50,7 +49,6 @@ stdenv.mkDerivation rec {
sdcv
SDL2
];
unpackCmd = "dpkg-deb -x ${src} .";
dontConfigure = true;
dontBuild = true;

View File

@ -65,10 +65,10 @@ let
else
throw "${pname}-${version} is not supported on ${stdenv.hostPlatform.system}";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ dpkg ];
unpackPhase = "dpkg-deb -x ${src} ./";
nativeBuildInputs = [
dpkg
makeWrapper
];
installPhase = ''
mkdir -p $out/bin

View File

@ -27,11 +27,6 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-roD/bKv1N2sru/tZ6Zl1J2AyY1mgj2ssB2a42kwBNHM=";
};
unpackCmd = ''
mkdir -p root
dpkg-deb -x $src root
'';
buildInputs = [
zlib
libgcc

View File

@ -9,11 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1k6b1hn8lc4rj9n036imsl7s9lqj6ny3acdhnbnamsdkkndmxrw7";
};
buildInputs = [ dpkg ];
unpackCmd = ''
dpkg-deb -x "$src" source
'';
nativeBuildInputs = [ dpkg ];
installPhase = ''
sed -i "s|/lib/molly-guard|${systemd}/sbin|g" lib/molly-guard/molly-guard

View File

@ -120,10 +120,6 @@ let
dontWrapQtApps = true;
unpackPhase = ''
dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner
'';
installPhase = ''
runHook preInstall

View File

@ -58,8 +58,6 @@ stdenv.mkDerivation rec {
hash = "sha256-PBbozIdA+cfEzGIyL1P+25FZtrnd7ldctOtZYomKd/8=";
};
unpackPhase = "dpkg-deb -x $src .";
nativeBuildInputs = [
dpkg
autoPatchelfHook

View File

@ -29,8 +29,7 @@ let
src = fetchurl { inherit (sources.libpicoipp) url sha256; };
nativeBuildInputs = [ dpkg autoPatchelfHook ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
sourceRoot = ".";
unpackCmd = "dpkg-deb -x $src .";
installPhase = ''
runHook preInstall
mkdir -p $out/lib
@ -57,8 +56,6 @@ let
src = fetchurl { inherit url sha256; };
# picoscope does a signature check, so we can't patchelf these
nativeBuildInputs = [ dpkg ];
sourceRoot = ".";
unpackCmd = "dpkg-deb -x $src .";
installPhase = ''
runHook preInstall
mkdir -p $out/lib
@ -82,8 +79,6 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ dpkg makeWrapper ];
buildInputs = [ gtk-sharp-3_0 mono glib libusb1 zlib ];
unpackCmd = "dpkg-deb -x $src .";
sourceRoot = ".";
scopeLibs = lib.attrVals (map (x: "lib${x}") scopes) scopePkgs;
MONO_PATH = "${gtk-sharp-3_0}/lib/mono/gtk-sharp-3.0:" + (lib.makeLibraryPath
([

View File

@ -26,10 +26,6 @@ stdenv.mkDerivation rec {
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall

View File

@ -93,8 +93,6 @@ stdenv.mkDerivation rec {
runtimeLibs = lib.makeLibraryPath [ libudev0-shim glibc curl openssl libnghttp2 ];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
runHook preInstall

View File

@ -87,10 +87,6 @@ stdenv.mkDerivation rec {
runtimeLibs = lib.makeLibraryPath [ libudev0-shim glibc curl openssl libnghttp2 ];
unpackPhase = ''
dpkg-deb -x $src .
'';
installPhase = ''
mkdir -p $out/share/polar-bookshelf $out/bin $out/lib
mv opt/Polar\ Bookshelf/* $out/share/polar-bookshelf

View File

@ -41,7 +41,6 @@ stdenv.mkDerivation {
[ makeShellWrapper ]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
dpkg
gtk3
libglvnd
libxkbcommon
@ -62,6 +61,7 @@ stdenv.mkDerivation {
nativeBuildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
autoPatchelfHook
dpkg
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
_7zz
@ -72,8 +72,6 @@ stdenv.mkDerivation {
(lib.getLib systemd)
];
postUnpack = lib.optionalString stdenv.hostPlatform.isLinux ''dpkg-deb --fsys-tarfile "$src" | tar -x --no-same-owner'';
installPhase =
if stdenv.hostPlatform.isDarwin then
''

View File

@ -115,14 +115,6 @@ else
gst_all_1.gstreamer
];
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
installPhase = ''
runHook preInstall

View File

@ -14,10 +14,6 @@ stdenv.mkDerivation rec {
autoPatchelfHook
];
unpackCmd = ''
dpkg-deb -x ${src} ./sslmate-agent-${pname}
'';
installPhase = ''
runHook preInstall

View File

@ -35,12 +35,6 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ wrapGAppsHook3 dpkg ];
buildInputs = [ glib hicolor-icon-theme ];
unpackPhase = ''
mkdir pkg
dpkg-deb -x $src pkg
sourceRoot=pkg
'';
installPhase = ''
mkdir -p $out/bin
mv opt $out

View File

@ -30,15 +30,11 @@ stdenv.mkDerivation rec {
inherit sha256;
};
nativeBuildInputs = [ makeWrapper asar ];
nativeBuildInputs = [ makeWrapper asar dpkg ];
dontConfigure = true;
dontBuild = true;
unpackPhase = ''
${dpkg}/bin/dpkg-deb -x $src .
'';
installPhase = ''
runHook preInstall

View File

@ -21,10 +21,6 @@ stdenv.mkDerivation rec {
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall

View File

@ -92,8 +92,6 @@ stdenv.mkDerivation (finalAttrs: {
runtimeDependencies =
[ (lib.getLib systemd) libnotify libdbusmenu xdg-utils ];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
runHook preInstall

View File

@ -18,12 +18,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ dpkg ];
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src ./
runHook postUnpack
'';
installPhase = ''
runHook preInstall

View File

@ -32,10 +32,6 @@ stdenv.mkDerivation rec {
dontWrapGApps = true;
unpackPhase = ''
dpkg-deb -x ${src} ./
'';
installPhase = ''
runHook preInstall

View File

@ -109,14 +109,6 @@ let
systemd
];
unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';
installPhase = ''
runHook preInstall

View File

@ -56,19 +56,10 @@ let
(lib.getLib libpng)
];
unpackPhase = ''
runHook preUnpack
mkdir pkg
dpkg-deb -x $src pkg
runHook postUnpack
'';
installPhase = ''
runHook preInstall
cp -r pkg/usr/local $out
cp -r usr/local $out
runHook postInstall
'';

View File

@ -17,8 +17,10 @@ stdenv.mkDerivation rec {
url = "https://wonderdraft.net/";
hash = "sha256-3eYnEH6P94z9axFsrkJA4QMcHyg/gNRczqL3h5Sc2Tg=";
};
sourceRoot = ".";
unpackCmd = "${dpkg}/bin/dpkg-deb -x $curSrc .";
nativeBuildInputs = [
dpkg
];
dontConfigure = true;
dontBuild = true;

View File

@ -100,6 +100,7 @@ else stdenv.mkDerivation {
autoPatchelfHook
wrapGAppsHook3
makeWrapper
dpkg
];
buildInputs = libraries;
@ -108,10 +109,6 @@ else stdenv.mkDerivation {
(lib.getLib systemd)
];
unpackPhase = ''
${dpkg}/bin/dpkg-deb -x $src .
'';
installPhase = ''
runHook preInstall

View File

@ -8,9 +8,9 @@ stdenv.mkDerivation rec {
sha256 = "LsZItRkFvpYaj5DwEv4C6tRpmypHadzSVv8/Wto2/68=";
};
dontBuild = true;
nativeBuildInputs = [ dpkg ];
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";
dontBuild = true;
installPhase = ''
runHook preInstall

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation {
dontBuild = true;
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";
nativeBuildInputs = [ dpkg ];
installPhase = ''
runHook preInstall

View File

@ -13,9 +13,10 @@ stdenv.mkDerivation {
dontBuild = true;
unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
dpkg
makeWrapper
];
installPhase = ''
runHook preInstall

View File

@ -28,10 +28,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ dpkg ];
unpackPhase = ''
dpkg-deb -R $src .
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/lib"