xemu: refactor installPhase
- Use install command instead of mkdir + cp - Use nix functional code instead of shell for loop
This commit is contained in:
parent
9bff8435da
commit
320cb59815
1 changed files with 8 additions and 8 deletions
|
@ -113,14 +113,14 @@ stdenv.mkDerivation (self: {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out/{bin,share}
|
install -Dm755 -T qemu-system-i386 $out/bin/xemu
|
||||||
cp qemu-system-i386 $out/bin/xemu
|
'' +
|
||||||
|
# Generate code to install the icons
|
||||||
for RES in 16x16 24x24 32x32 48x48 128x128 256x256 512x512
|
(lib.concatMapStringsSep ";\n"
|
||||||
do
|
(res:
|
||||||
mkdir -p $out/share/icons/hicolor/$RES/apps/
|
"install -Dm644 -T ../ui/icons/xemu_${res}.png $out/share/icons/hicolor/${res}/apps/xemu.png")
|
||||||
cp ../ui/icons/xemu_$RES.png $out/share/icons/hicolor/$RES/apps/xemu.png
|
[ "16x16" "24x24" "32x32" "48x48" "128x128" "256x256" "512x512" ]) +
|
||||||
done
|
''
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue