Installing a snap package

I want to install a package that’s distributed for Linux only as as snap. Is that possible?

I don’t know if it is possible but I’m interested in the answer as well.

We do not have snapd packaged so until someone does that, it is not possible to install the package. See also Snap support · Issue #30336 · NixOS/nixpkgs · GitHub.

Alternatively, you might try to reverse https://github.com/NixOS/nixpkgs/blob/dd65c8b2a7c936f2456c4d2c7a2dc6789bc3f177/pkgs/build-support/snap/make-snap.nix, i.e. try to mount the squashfs image manually.

2 Likes

Also have a look at Spotify packaging, it’s based on the snap because that’s the only Spotify version with a stable download link.

2 Likes

See perhaps from 18:30 in this podcast

which uses
snapd
and
https://flakehub.com/flake/jnsgruk/crafts-flake
https://flakehub.com/flake/io12/nix-snapd

2 Likes