SquircleSpace / ql2nix

Create a nix expression for loading quicklisp packages
MIT License
18 stars 3 forks source link

Should we really wait for ql2nix to be added to Nixpkgs? #7

Open teu5us opened 3 years ago

teu5us commented 3 years ago

Perhaps default.nix could provide a set with mkNixlispBundle and ql2nix itself to make possible something like:

with pkgs;
with (import (fetchFromGitHub {...}));

let
  nixlispBundle = mkNixlispBundle ... ;
in
mkShell {
  buildInputs = [ ql2nix nixlispBundle ];
}

However, mkNixlispBundle should have a default value for qlDist like { qlReleases = {}; qlSystems = {}; } or the shell will not load.

SquircleSpace commented 3 years ago

Interesting! I’d be open to something like this. Embedding the supporting nix expressions for interpreting the quicklisp manifest is a bit lame and unaesthetic. The one gotcha is that ql2nix should probably generate a nix expression that references the exact SHA it was built from. That way the interpretation of the manifest is always consistent with the code that built the manifest.

I’m also slightly philosophically opposed to hardcoding a reference to GitHub in this project. ql2nix should work just fine even if GitHub closes it’s doors… or does something so evil I want to disentangle myself from it. I think I’m probably in the minority about feeling this way though. I’m going to keep embedding the supporting nix code into my own projects, but I imagine other people might find it preferable to fetch the support files from GitHub during build time instead.

Do you want to open a PR? I’ve got too much going on right now to do anything non-essential

teu5us commented 3 years ago

I need to review my fork as there are quite many possibly silly changes. I couldn't understand how to run ql2nix, so I created a shell based on lukego's gists, and it went too far maybe.

A PR is possible, maybe even two, if I remember what I tried to fix

teu5us commented 3 years ago

Couldn't get quicklisp to work until installed it outside of nix-shell. Now I can't load dexador even though I put openssl in LD_LIBRARY_PATH in the shell. Can you load dexador or anything that uses cffi? It seems that these dependencies need to be provided to the bundler.

teu5us commented 3 years ago

Do you mind if I include several changes in the PR or should I open another issue for dependencies and environment variables required to build the bundle?