soulseekqt: don’t linger in a read-only directory after installing
It appears that the strip phase assumes that CWD is writable now (when using mktemp) and will otherwise fail with: mktemp: failed to create file via template 'striperr.XXXXXX': No such file or directory We now avoid this error by sticking to the build-directory and referencing files from the AppImage by path. References: #248569
This commit is contained in:
parent
2501addf2d
commit
922e463e3d
1 changed files with 4 additions and 8 deletions
|
@ -28,24 +28,20 @@ mkDerivation rec {
|
|||
buildInputs = [ qtmultimedia stdenv.cc.cc ];
|
||||
|
||||
installPhase = ''
|
||||
# directory in /nix/store so readonly
|
||||
cd $appextracted
|
||||
|
||||
binary="$(readlink AppRun)"
|
||||
binary="$(realpath ${appextracted}/AppRun)"
|
||||
install -Dm755 $binary -t $out/bin
|
||||
|
||||
# fixup and install desktop file
|
||||
desktop-file-install --dir $out/share/applications \
|
||||
--set-key Exec --set-value $binary \
|
||||
--set-key Comment --set-value "${meta.description}" \
|
||||
--set-key Categories --set-value Network default.desktop
|
||||
--set-key Categories --set-value Network ${appextracted}/default.desktop
|
||||
mv $out/share/applications/default.desktop $out/share/applications/SoulseekQt.desktop
|
||||
|
||||
#TODO: write generic code to read icon path from $binary.desktop
|
||||
icon="$(readlink .DirIcon)"
|
||||
icon="$(realpath ${appextracted}/.DirIcon)"
|
||||
for size in 16 32 48 64 72 96 128 192 256 512 1024; do
|
||||
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
|
||||
convert -resize "$size"x"$size" $icon $out/share/icons/hicolor/"$size"x"$size"/apps/$icon
|
||||
convert -resize "$size"x"$size" $icon $out/share/icons/hicolor/"$size"x"$size"/apps/$(basename $icon)
|
||||
done
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue