-
Notifications
You must be signed in to change notification settings - Fork 36
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
explicitly define project root in treefmt #103
Conversation
@srid running |
with ❯ nix run nixpkgs#nixci
🍏 .
🐚 nix --extra-experimental-features 'nix-command flakes' eval '.#nixci.default' --json️
🍎 default.dev
🐚 nix --extra-experimental-features 'nix-command flakes' flake lock --no-update-lock-file '.?dir=./dev'️
warning: Git tree '/home/shivaraj/juspay/services-flake' is dirty
🐚 nix --extra-experimental-features 'nix-command flakes' build '/nix/store/p8vfkmfh43yy8lmz1r65dr9yq3ql7cd7-source#default' -L --no-link --print-out-paths --override-input flake '.?dir=./dev' --refresh -j auto️
warning: Git tree '/home/shivaraj/juspay/services-flake' is dirty
/nix/store/r2g40v56xwfbfqlfdp81p4i6plxnfpdv-nix-shell
/nix/store/3lz7sywmw7rcc7vnc2v7cfx3jfflvsjf-treefmt-check
... with ❯ nix run github:srid/nixci
🍏 .
🐚 nix --extra-experimental-features 'nix-command flakes' eval '.#nixci.default' --json️
🐚 nix --extra-experimental-features 'nix-command flakes' show-config --json️
🍎 default.dev
🐚 nix --extra-experimental-features 'nix-command flakes' flake lock --no-update-lock-file path:././dev️
🐚 nix --extra-experimental-features 'nix-command flakes' build '/nix/store/p8vfkmfh43yy8lmz1r65dr9yq3ql7cd7-source#default' -L --no-link --print-out-paths --override-input flake path:././dev --refresh -j auto️
error (ignored): error: reached end of FramedSource
error:
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'devour-output'
whose name attribute is located at /nix/store/qjqzr7905xxv3rv70z7mkpp06lalnzzb-source/pkgs/stdenv/generic/make-derivation.nix:300:7
… while evaluating attribute 'text' of derivation 'devour-output'
at /nix/store/qjqzr7905xxv3rv70z7mkpp06lalnzzb-source/pkgs/build-support/trivial-builders/default.nix:148:16:
147| runCommand name
148| { inherit text executable checkPhase allowSubstitutes preferLocalBuild;
| ^
149| passAsFile = [ "text" ];
(stack trace truncated; use '--show-trace' to show the full trace)
error: opening file '/nix/store/00p454skn3x07s3k6zwrixmyzhn1hyqb-Cabal-3.10.2.1-doc.lock': Permission denied
Error: devour-flake failed to run (exited: 1) |
I think it is do with this:
vs
|
I saw the same error before, but didn't think it was due to the latest |
We switched from |
dev/flake.nix
Outdated
@@ -14,7 +14,8 @@ | |||
]; | |||
perSystem = { pkgs, lib, config, ... }: { | |||
treefmt = { | |||
projectRootFile = "flake.nix"; | |||
projectRoot = ../.; |
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 this legal in pure evaluation? AFAIU, a flake (or sub-flake) cannot refer to contents outside its containing directory.
Try running nix with sandbox enabled; I think it is disabled by default on macOS.
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.
Looks good! Thanks for the contrib |
specifying
projectRoot
intreefmt
fixes #45