mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
Merge pull request #203891 from alyssais/virt-builder-wrap
guestfs-tools: fix virt-builder
This commit is contained in:
commit
bbaaa594ba
@ -5,8 +5,10 @@
|
|||||||
, bison
|
, bison
|
||||||
, cdrkit
|
, cdrkit
|
||||||
, cpio
|
, cpio
|
||||||
|
, curl
|
||||||
, flex
|
, flex
|
||||||
, getopt
|
, getopt
|
||||||
|
, gnupg
|
||||||
, hivex
|
, hivex
|
||||||
, jansson
|
, jansson
|
||||||
, libguestfs-with-appliance
|
, libguestfs-with-appliance
|
||||||
@ -70,6 +72,14 @@ stdenv.mkDerivation rec {
|
|||||||
xz
|
xz
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# If it uses the executable name, then there's nothing we can do
|
||||||
|
# when wrapping to stop it looking in
|
||||||
|
# $out/etc/.virt-builder-wrapped, which won't exist.
|
||||||
|
substituteInPlace common/mlstdutils/std_utils.ml \
|
||||||
|
--replace Sys.executable_name '(Array.get Sys.argv 0)'
|
||||||
|
'';
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs ocaml-dep.sh.in ocaml-link.sh.in run.in
|
patchShebangs ocaml-dep.sh.in ocaml-link.sh.in run.in
|
||||||
'';
|
'';
|
||||||
@ -85,6 +95,10 @@ stdenv.mkDerivation rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/virt-builder \
|
||||||
|
--argv0 virt-builder \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ curl gnupg ]}:$out/bin \
|
||||||
|
--suffix VIRT_BUILDER_DIRS : /etc:$out/etc
|
||||||
wrapProgram $out/bin/virt-win-reg \
|
wrapProgram $out/bin/virt-win-reg \
|
||||||
--prefix PERL5LIB : ${with perlPackages; makeFullPerlPath [ hivex libintl-perl libguestfs-with-appliance ]}
|
--prefix PERL5LIB : ${with perlPackages; makeFullPerlPath [ hivex libintl-perl libguestfs-with-appliance ]}
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user