Hi
I have created an appimage bundle for ‘curl’ by
nix bundle --bundler github:ralismark/nix-appimage nixpkgs#curl
this produces a symlink /curl-7.85.0-x86_64.AppImage to the nix store at
location /nix/store/xk2z1z2p3vaqwx1m9n6hcvqzp7cdd5n6-curl-7.85.0-x86_64.AppImage
I then manually copy it out of the store to create a standalone appimage by
cp /nix/store/xk2z1z2p3vaqwx1m9n6hcvqzp7cdd5n6-curl-7.85.0-x86_64.AppImage to … and rename it to curl.AppImage.
I no longer need the curl bundle in the nix store.
How do I remove it?
Thanks
If you remove that symlink, the storePath will be cleaned up during the next garbage collection.
Thanks kindly,
It deletes and garbage collects exactly as you described. I tested it but there is a side effect.
Here is what I did:
Deleted nix and installed nix from scratch
Created a firefox appimage with nix bundle --bundler github:ralismark/nix-appimage nixpkgs#firefox
this created a symbolic link /opt/nixappimage/firefox-106.0.3-x86_64.AppImage
the symbolic link contained a pointer to the nix store
removed the link in the nix store with rm /nix/store/path…
garbage collected the store , space was reclaimed
Now I wanted to create the firefox appimage again:
deleted the symbolic link /opt/nixappimage/firefox-106.0.3-x86_64.AppImage
reran nix bundle --bundler github:ralismark/nix-appimage nixpkgs#firefox
this failed immediately, it failed silently after created the symbolic link again /opt/nixappimage/firefox-106.0.3-x86_64.AppImage
BUT the link still points to the deleted firefox entry in the store.
It looks like it did not try to compile firefox at all ?
I can no longer create a firefox appimage.
Thanks
Murray
Not sure if this portion is accurate:
removed the link in the nix store with rm /nix/store/path…
Do you mean you directly removed this from the store? This usually requires additional permisssion. Direct modification of store contents is going to lead to bad results (ie: imagine directly modifying .git contents by hand). I expected this to say you removed the symlink to the store path, and then ran gc.
Thanks again.
Yes, just remove the symlink and then garbage collect. Much easier.
Second run works this time.
copied the firefox AppImage over to Manjaro and it just works. .
Seems to have no need for any external dynamic modules including glibc.
Pretty impressive.
One oddity when I launch the appimge:
/opt/nixappimage/firefox.AppImage gives:
/opt/nixappimage/firefox.AppImage: stat /konsole: No such file or directory
then continues ok.
I ran the appimage creation process in Kde Konsole.
Happens with all created appimages. But they all run.
Thanks again for your help. Appreciated.