-
Notifications
You must be signed in to change notification settings - Fork 286
Minimal nix update #5912
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
Minimal nix update #5912
Changes from all commits
16bea67
90127b2
99627c4
ae22f71
3dac265
1f6d098
a013b02
7deaa24
5702e0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,20 +33,14 @@ | |
| ++ [ | ||
| pkgs.cachix | ||
| pkgs.gettext # for envsubst, used by unison-src/builtin-tests/interpreter-tests.sh | ||
| pkgs.hpack | ||
| pkgs.jq # helpful when pushing to Cachix | ||
| pkgs.pkg-config | ||
| pkgs.stack-wrapped | ||
| ]; | ||
| # workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/11042 | ||
| shellHook = '' | ||
| export LD_LIBRARY_PATH=${pkgs.zlib}/lib:$LD_LIBRARY_PATH | ||
| ''; | ||
| tools = | ||
| (args.tools or {}) | ||
| // { | ||
| cabal = {version = versions.cabal;}; | ||
| ormolu = {version = versions.ormolu;}; | ||
| cabal.version = versions.cabal; | ||
| haskell-language-server = { | ||
| version = versions.hls; | ||
| modules = [ | ||
|
|
@@ -65,7 +59,9 @@ | |
| constraints: ormolu == ${versions.ormolu} | ||
| ''; | ||
| }; | ||
| weeder = {version = versions.weeder;}; | ||
| hpack.version = versions.hpack; | ||
| ormolu.version = versions.ormolu; | ||
| weeder.version = versions.weeder; | ||
| }; | ||
| }; | ||
|
|
||
|
|
@@ -80,6 +76,10 @@ in | |
| // { | ||
| ## This check has a test that tries to write to $HOME, so we give it a fake one. | ||
| "unison-cli:test:cli-tests" = haskell-nix-flake.checks."unison-cli:test:cli-tests".overrideAttrs (old: { | ||
| ## On macOS, this derivation requires access to `security`, which is outside the sandbox, so we tell Nix that | ||
| ## it doesn’t work in the sandbox. There is a lot of discussion, but no fix, with NixOS/nixpkgs#297775 maybe | ||
| ## being the best starting point. | ||
| __noChroot = pkgs.stdenv.isDarwin; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does adding a dependency on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn’t, unfortunately. I just updated the comment to at least link to some Nixpkgs discussion. This is the same reason you have https://github.com/ceedubs/unison-nix/blob/trunk/nix/darwin-security-hack.nix (that’s also unsandboxed, but implicitly since you don’t have It might be worth bringing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I don’t think |
||
| ## The builder here doesn’t `runHook preBuild`, so we just prepend onto `buildPhase`. | ||
| buildPhase = | ||
| '' | ||
|
|
||
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 is a place where we aren't able to do a check that would limit this to darwin, isn't 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.
Yeah, NixOS/nix#4945. This spot is particularly annoying, because the defaults are different on Linux and Darwin, but there’s no way to tighten Darwin from
falseto"relaxed"without simultaneously weakening Linux fromtrueto"relaxed". But … I prefer"relaxed"as my default anyway, since it lets me control it at the derivation level, and individual environments can still be sandboxed, and thus disallow unsandboxed derivations.