Skip to content
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

add flake.nix #1061

Merged
merged 1 commit into from
Jun 15, 2022
Merged

add flake.nix #1061

merged 1 commit into from
Jun 15, 2022

Conversation

DavHau
Copy link
Contributor

@DavHau DavHau commented Mar 10, 2022

No description provided.

@soulomoon
Copy link
Collaborator

soulomoon commented Mar 14, 2022

There are a lot of options we can pass to nix-build.
e.g. network is not accessible in nix build and we should pass argument to stop the tests.

Under flake, how do we do the following nix-build --arg value?

@DavHau
Copy link
Contributor Author

DavHau commented Mar 25, 2022

Part of the idea behind flakes is to express all possible outputs as an attribute set. If there are different variations for your package, this should be expressed as several attributes. This restriction achieves benefits like evaluation caching etc.

There are probably only a limited number of combinations of your parameters that are relevant. Each of these should be exported via packages.{some-name}.

e.g. network is not accessible in nix build and we should pass argument to stop the tests.

If network is not accessible during nix build, then why have an argument for that in the first place? These tests should probably always be disabled for the nix build.

@sorki
Copy link
Member

sorki commented Apr 22, 2022

IMHO this looks good. Networking and tests is a separate concern.

Seems like there is a https://github.com/DeterminateSystems/update-flake-lock thingie that we could use with another action that tests flake based build.

@DavHau
Copy link
Contributor Author

DavHau commented Apr 22, 2022

Seems like there is a https://github.com/DeterminateSystems/update-flake-lock thingie that we could use with another action that tests flake based build.

I do not see the necessity for such tool, except there is a good reason why you would want to constantly update your dependencies like nixpkgs.
I guess for most projects updating dependencies should be an intentional controlled action. This can be done manually by a developer by running nix flake update and then committing to the repo.

@soulomoon soulomoon mentioned this pull request Jun 15, 2022
3 tasks
@soulomoon
Copy link
Collaborator

soulomoon commented Jun 15, 2022

Cool, we should move the build system step by step to nix flake. let us merge this first.
The remaining process would be record in #1071

@soulomoon soulomoon merged commit f582014 into haskell-nix:master Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants