prl-tools: unpackPhase: extract prl-tools-lin.iso from dmg; add undmg, fetchurl inputs; update sourceRoot
This commit is contained in:
parent
0b845abd22
commit
019cbdaa6a
@ -1,6 +1,7 @@
|
|||||||
{ stdenv, lib, requireFile, makeWrapper, substituteAll, p7zip
|
{ stdenv, lib, requireFile, makeWrapper, substituteAll, p7zip
|
||||||
, gawk, utillinux, xorg, glib, dbus_glib, zlib
|
, gawk, utillinux, xorg, glib, dbus_glib, zlib
|
||||||
, kernel ? null, libsOnly ? false
|
, kernel ? null, libsOnly ? false
|
||||||
|
, undmg, fetchurl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (!libsOnly) -> kernel != null;
|
assert (!libsOnly) -> kernel != null;
|
||||||
@ -46,17 +47,19 @@ stdenv.mkDerivation rec {
|
|||||||
hardeningDisable = [ "pic" ];
|
hardeningDisable = [ "pic" ];
|
||||||
|
|
||||||
# also maybe python2 to generate xorg.conf
|
# also maybe python2 to generate xorg.conf
|
||||||
nativeBuildInputs = [ p7zip ] ++ lib.optionals (!libsOnly) [ makeWrapper ];
|
nativeBuildInputs = [ p7zip undmg ] ++ lib.optionals (!libsOnly) [ makeWrapper ];
|
||||||
|
|
||||||
inherit libsOnly;
|
inherit libsOnly;
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
7z x $src
|
undmg < "${src}"
|
||||||
export sourceRoot=.
|
|
||||||
|
export sourceRoot=prl-tools-build
|
||||||
|
7z x "Parallels Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso" -o$sourceRoot
|
||||||
if test -z "$libsOnly"; then
|
if test -z "$libsOnly"; then
|
||||||
( cd kmods; tar -xaf prl_mod.tar.gz )
|
( cd $sourceRoot/kmods; tar -xaf prl_mod.tar.gz )
|
||||||
fi
|
fi
|
||||||
( cd tools; tar -xaf prltools${if x64 then ".x64" else ""}.tar.gz )
|
( cd $sourceRoot/tools; tar -xaf prltools${if x64 then ".x64" else ""}.tar.gz )
|
||||||
'';
|
'';
|
||||||
|
|
||||||
kernelVersion = if libsOnly then "" else (builtins.parseDrvName kernel.name).version;
|
kernelVersion = if libsOnly then "" else (builtins.parseDrvName kernel.name).version;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user