justinwoo / spago2nix

Generate a derivation of (old) Spago dependencies, and use them to install them into the directory structure used by Spago.
MIT License
42 stars 22 forks source link

pure derivation? #43

Closed jamesdbrock closed 1 year ago

jamesdbrock commented 3 years ago

What would you say to a PR which allows spago2nix to work as a one-step content-addressed pure Nix derivation?

We have an implentation of that, by @considerate, and we're using it in one place. I'm now contemplating using it in more than one place, so it seems like this is a good time to try to push it upstream here.

This would be the the form of a package overlay .nix file which exports a function generate-spago-packages = { src, sha256, name }: .... The user must supply the sha256 for the output.

justinwoo commented 3 years ago

i'll have to see what it looks like

jamesdbrock commented 3 years ago

That sounds like enthusiastic encouragement to me!

However I realized that to make generate-spago-packages work, @considerate had to patch nix-prefetch-git, so I'm not sure if we can publish a version of generate-spago-packages which can reasonably be expected to work with different versions of <nixpkgs>. And we would want it to work with different versions of <nixpkgs>. So I'm not yet sure if we can publish this.

jamesdbrock commented 1 year ago

Done in #53