Closed lucc closed 2 years ago
I can now build the different packages with nix build .#purebred
, nix build .#buck
etc.
I had a quick look over the patch. It looks good with my current limited understanding of flakes.
The aim of this PR is to switch to flakes.
Open questions:
* Should `default.nix` be keept for interoerability with people who are not using flakes?
I'd say keep it for now. When I started learning nix, I've added the existing nix things using the reference over at https://github.com/cdepillabout/termonad . The
default.nix
still basically uses the flake.lock to fetch the sources tarball.* Are you fine with inputs (dependencies) like https://github.com/numtide/flake-utils?
Fine with me.
* Flakes do (to my knowledge) not support arguments set from the command line. The current default.nix uses that. Should we create an extra derivation for every combination of arguments (compiler & icu) or are some of these arguments not needed any longer? (The nixpkgs argument is a flake input and can be overwritten from the command line.)
I think I'd keep it for now. I haven't changed much the compiler version, but definitely with or without icu builds. I think we can use both flakes and the existing files.
Plan
I marked this as a draft for now and I will push more commits and come back with questions. Hopefully that will lead to some code that can be merged. This is my first work with flakes (and second with nix) outside of my own system config, so please bear with me. You know.. happy if you want to merge this patch and tune it over additional patches.
I think what would be good is if that changes several things we've documented in the README.md
or HACKING
, that those docs need to be adjusted. Otherwise I think it's good to go.
Thanks for the answers, I will come back to this some time during next week.
I have done some more work here.
nix develop
and nix develop .#shell-with-icu
purebred-with-packages
again (there also is a package purebred-with-packages-icu
)I have not added any code to generated different packages or environments for different ghc versions. Do you want some?
Thank you! Awesome work. I'll see if I find some time this weekend.
I have not added any code to generated different packages or environments for different ghc versions. Do you want some?
No. Lets add it when we really need it.
The aim of this PR is to switch to flakes.
Open questions:
default.nix
be keept for interoerability with people who are not using flakes?Plan
I marked this as a draft for now and I will push more commits and come back with questions. Hopefully that will lead to some code that can be merged. This is my first work with flakes (and second with nix) outside of my own system config, so please bear with me.