nix-community / nix-bundle

Bundle Nix derivations to run anywhere! [maintainer=@matthewbauer, @Artturin]
MIT License
658 stars 47 forks source link

example of nix2appimage.sh does not work because of icon format #66

Open symphorien opened 4 years ago

symphorien commented 4 years ago

Example of the readme:

$  ./nix2appimage.sh vlc        
these derivations will be built:
  /nix/store/s62ip4ga26m6ik4caa0m1gfhk9fsqvjp-AppRun.drv
  /nix/store/185c2bf8ksbnkw0f3j8nqm1aw0jip0a6-vlc.AppDir.drv
  /nix/store/wwaj40280gad8cjs2r3nn3pzshxpm9k6-appimage.drv
building '/nix/store/s62ip4ga26m6ik4caa0m1gfhk9fsqvjp-AppRun.drv'...
building
/nix/store/y7w6j74ipqnybprfdb66k7hhjcdxzmvc-AppRun.c: In function ‘main’:
/nix/store/y7w6j74ipqnybprfdb66k7hhjcdxzmvc-AppRun.c:134:45: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 253 [-Wformat-truncation=]
  134 |     snprintf(desktop_file, LINE_SIZE-1, "%s/%s", appdir, namelist[0]->d_name);
      |                                             ^~
/nix/store/y7w6j74ipqnybprfdb66k7hhjcdxzmvc-AppRun.c:134:5: note: ‘snprintf’ output 2 or more bytes (assuming 257) into a destination of size 254
  134 |     snprintf(desktop_file, LINE_SIZE-1, "%s/%s", appdir, namelist[0]->d_name);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/yacn11z90sqa1yxwpb5cl1sncac9sahc-AppRun
shrinking /nix/store/yacn11z90sqa1yxwpb5cl1sncac9sahc-AppRun/bin/AppRun
patchelf: cannot find section '.dynamic'. The input file is most likely statically linked
strip is /nix/store/7gagq119aqpfc54sj3s313ng0279mv9s-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/yacn11z90sqa1yxwpb5cl1sncac9sahc-AppRun/bin
patching script interpreter paths in /nix/store/yacn11z90sqa1yxwpb5cl1sncac9sahc-AppRun
checking for references to /build/ in /nix/store/yacn11z90sqa1yxwpb5cl1sncac9sahc-AppRun...
patchelf: cannot find section '.dynamic'. The input file is most likely statically linked
building '/nix/store/185c2bf8ksbnkw0f3j8nqm1aw0jip0a6-vlc.AppDir.drv'...
building '/nix/store/wwaj40280gad8cjs2r3nn3pzshxpm9k6-appimage.drv'...
WARNING: appstreamcli is missing, please install it if you want to use AppStream metadata
WARNING: gpg2 or gpg is missing, please install it if you want to create digital signatures
/nix/store/a6qmsiybsn4ghj41nymhsqbddd3blxbq-vlc.AppDir/vlc.AppDir/vlc.desktop: warning: key "Keywords" in group "Desktop Entry" is a reserved key for KDE
Using architecture x86_64
/nix/store/a6qmsiybsn4ghj41nymhsqbddd3blxbq-vlc.AppDir/vlc.AppDir should be packaged as VLC_media_player-x86_64.AppImage
vlc{.png,.svg,.svgz,.xpm} defined in desktop file but not found
For example, you could put a 256x256 pixel png into
/nix/store/a6qmsiybsn4ghj41nymhsqbddd3blxbq-vlc.AppDir/vlc.AppDir/usr/share/icons/hicolor/256x256/apps/vlc.png
builder for '/nix/store/wwaj40280gad8cjs2r3nn3pzshxpm9k6-appimage.drv' failed with exit code 1
error: build of '/nix/store/wwaj40280gad8cjs2r3nn3pzshxpm9k6-appimage.drv' failed
./nix2appimage.sh failed. Exiting.

but the icon actually exists

$  ls /nix/store/a6qmsiybsn4ghj41nymhsqbddd3blxbq-vlc.AppDir/vlc.AppDir/usr/share/icons/hicolor/256x256/apps/
vlc.png

current master of nix-bundle Nix-info:

Radvendii commented 3 years ago

Were you able to get this working with a different icon format?

symphorien commented 3 years ago

I didn't try to fix it, it was just an observation "en passant"