-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace nix-shell
with Nix Flake
#737
Conversation
This `flake.nix` provides the same resources as the deleted Nix files with less code to maintain. This commit does not fix/update the docs generation via Nix; this remains TODO.
a1aebc8
to
97ce5d4
Compare
@@ -0,0 +1 @@ | |||
use flake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking the .envrc
in version control is debated; personally I am in favor of it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would prefer not to commit to this, since a lot more people have direnv than Nix, and Nix isn't required to easily develop on this repo.
- name: "Check `nix develop` shell can run command" | ||
run: nix develop --command "echo" | ||
- run: nix build | ||
- run: nix flake check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the flake.nix
and its outputs are not broken
@@ -4,8 +4,6 @@ | |||
with nixpkgs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is made dead code by this PR. I want to follow-up on this later.
I don't use Nix so I will leave the review of this PR to someone else |
@kmicklas please review. I will fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting the CI to work with this!
Personally I am a flakes conscientious objector so unfortunately I cannot really review if the flake setup looks good. However from general Nix usage this all looks very nice.
@@ -0,0 +1 @@ | |||
use flake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I would prefer not to commit to this, since a lot more people have direnv than Nix, and Nix isn't required to easily develop on this repo.
|
||
hlsCheck.enable = false; | ||
|
||
tools = hp: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is hp
haskellPackages
? If so I would prefer it to be more explicit for readability here.
Co-authored-by: Ken Micklas <[email protected]>
This
flake.nix
provides the same resources as the deleted Nix files with less code to maintain, plus other tools helpfully provided by https://github.com/srid/haskell-flake.This commit does not fix/update the docs generation via Nix; this remains TODO.
The
flake.nix
will build bundles for each Beam library, just as the old Nix configuration did:nix build
ornix build .#beam-...
will build these.Beam has no
executables
so there is nothing to demonstrate bynix run .#...
I need more time to understand the docs generation, which apparently requires a Beam executable. This may have been the
beam-migrate
executable, which no longer exists. Please review this; I will try to return the the docs as a follow-up item.