Skip to content

Commit

Permalink
treewide: use dpkg setup hook (#359417)
Browse files Browse the repository at this point in the history
  • Loading branch information
philiptaron authored Nov 28, 2024
2 parents 12dbe9f + e51a9df commit 76fe013
Show file tree
Hide file tree
Showing 55 changed files with 31 additions and 232 deletions.
5 changes: 0 additions & 5 deletions pkgs/applications/audio/bitwig-studio/bitwig-studio3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 0 additions & 5 deletions pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions pkgs/applications/audio/bitwig-studio/bitwig-studio5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/editors/standardnotes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 2 additions & 7 deletions pkgs/applications/graphics/odafileconverter/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions pkgs/applications/misc/parsec/bin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ stdenvNoCC.mkDerivation {
sha256 = "sha256-9F56u+jYj2CClhbnGlLi65FxS1Vq00coxwu7mjVTY1w=";
};

unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';

nativeBuildInputs = [ dpkg autoPatchelfHook makeWrapper ];

buildInputs = [
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/pdfstudio/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ let
})
];

unpackCmd = "dpkg-deb -x $src ./${program}-${version}";
dontBuild = true;

postPatch = ''
Expand Down
6 changes: 1 addition & 5 deletions pkgs/applications/misc/rescuetime/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/networking/breitbandmessung/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ let
makeWrapper
];

unpackPhase = "dpkg-deb -x $src .";

installPhase = ''
mkdir -p $out/bin
mv usr/share $out/share
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkgs/applications/networking/mullvad-vpn/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ stdenv.mkDerivation {
dontBuild = true;
dontConfigure = true;

unpackPhase = "dpkg-deb -x $src .";

runtimeDependencies = [ (lib.getLib systemd) libGL libnotify libappindicator wayland ];

installPhase = ''
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/office/morgen/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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=";
};
Expand All @@ -19,10 +20,6 @@ stdenv.mkDerivation rec {

buildInputs = [ alsa-lib gtk3 libxshmfence mesa nss ];

unpackCmd = ''
dpkg-deb -x ${src} ./morgen-${pname}
'';

installPhase = ''
runHook preInstall
Expand Down
4 changes: 0 additions & 4 deletions pkgs/by-name/al/alfaview/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ stdenv.mkDerivation rec {
dontBuild = true;
dontConfigure = true;

unpackPhase = ''
dpkg-deb -x ${src} ./
'';

installPhase = ''
runHook preInstall
Expand Down
6 changes: 0 additions & 6 deletions pkgs/by-name/bd/bdf2psf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions pkgs/by-name/bl/bluemail/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ stdenv.mkDerivation rec {
udev
];

unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";

dontBuild = true;
dontStrip = true;
dontWrapGApps = true;
Expand Down
6 changes: 0 additions & 6 deletions pkgs/by-name/br/brave/make-brave.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkgs/by-name/cu/cups-brother-hll2375dw/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions pkgs/by-name/ff/fflinuxprint/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions pkgs/by-name/ga/gamepad-tool/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {

nativeBuildInputs = [ dpkg qt5.wrapQtAppsHook autoPatchelfHook ];

unpackCmd = ''
mkdir -p root
dpkg-deb -x $curSrc root
'';

dontBuild = true;

buildInputs = [
Expand Down
2 changes: 0 additions & 2 deletions pkgs/by-name/he/headset/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkgs/by-name/ho/holochain-launcher/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions pkgs/by-name/hy/hyper/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
6 changes: 0 additions & 6 deletions pkgs/by-name/id/ideamaker/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ stdenv.mkDerivation (finalAttrs: {
libsForQt5.quazip
];

unpackPhase = ''
runHook preUnpack
dpkg-deb -x $src .
runHook postUnpack
'';

installPhase = ''
runHook preInstall
Expand Down
8 changes: 0 additions & 8 deletions pkgs/by-name/in/insync-emblem-icons/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions pkgs/by-name/in/insync/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions pkgs/by-name/ip/ipscan/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];

Expand Down
2 changes: 0 additions & 2 deletions pkgs/by-name/ji/jigasi/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ stdenv.mkDerivation {

dontBuild = true;

unpackCmd = "dpkg-deb -x $src debcontents";

installPhase = ''
runHook preInstall
substituteInPlace usr/share/${pname}/${pname}.sh \
Expand Down
5 changes: 1 addition & 4 deletions pkgs/by-name/ke/keeweb/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,11 @@ else
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook3
dpkg
];

buildInputs = libraries;

unpackPhase = ''
${dpkg}/bin/dpkg-deb --fsys-tarfile $src | tar --extract
'';

installPhase = ''
runHook preInstall
Expand Down
2 changes: 0 additions & 2 deletions pkgs/by-name/ko/koreader/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ stdenv.mkDerivation rec {
sha256 = "sha256-gHn1xqBc7M9wkek1Ja1gry8TKIuUxQP8T45x3z2S4uc=";
};

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

dontConfigure = true;
dontBuild = true;
Expand Down
8 changes: 4 additions & 4 deletions pkgs/by-name/li/lightworks/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions pkgs/by-name/lu/lunacy/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-roD/bKv1N2sru/tZ6Zl1J2AyY1mgj2ssB2a42kwBNHM=";
};

unpackCmd = ''
mkdir -p root
dpkg-deb -x $src root
'';

buildInputs = [
zlib
libgcc
Expand Down
6 changes: 1 addition & 5 deletions pkgs/by-name/mo/molly-guard/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 76fe013

Please sign in to comment.