bluej: use dpkg instead of manual preUnpackHook

This commit is contained in:
Charlotte Van Petegem 2023-09-21 09:56:14 +02:00
parent 11e7a4161f
commit b60565ed4d
No known key found for this signature in database
GPG Key ID: 019E764B7184435A

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, openjdk, glib, wrapGAppsHook, zstd }:
{ lib, stdenv, fetchurl, openjdk, glib, dpkg, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "bluej";
@ -12,21 +12,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-sOT86opMa9ytxJlfURIsD06HiP+j+oz3lQ0DqmLV1wE=";
};
nativeBuildInputs = [ zstd wrapGAppsHook ];
nativeBuildInputs = [ dpkg wrapGAppsHook ];
buildInputs = [ glib ];
sourceRoot = ".";
preUnpack = ''
unpackCmdHooks+=(_tryDebData)
_tryDebData() {
if ! [[ "$1" =~ \.deb$ ]]; then return 1; fi
ar xf $src
if ! [[ -e data.tar.zst ]]; then return 1; fi
unpackFile data.tar.zst
}
'';
dontWrapGApps = true;
installPhase = ''