Last active
April 17, 2024 09:24
-
-
Save gonzaloetjo/41b62b2a97387b8b8029ba3c2fdd5d8c to your computer and use it in GitHub Desktop.
Foundry overlay issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0=" | |
use devenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ inputs, pkgs, ... }: | |
let | |
pkgs-stable = import inputs.nixpkgs-stable { system = pkgs.system; }; | |
# pkgs-subflake = import inputs.subflake { system = pkgs.system; }; # Import the subflake | |
# pkgs-subflake = import nixpkgs { | |
# system = pkgs.system; | |
# overlays = [ inputs.subflake.overlay ]; | |
# }; | |
# pkgs-subflake = import inputs.subflake { system = pkgs.system; }; | |
in { | |
# https://devenv.sh/basics/ | |
env.GREET = "This is a foundry dev environment"; | |
# https://devenv.sh/packages/ | |
packages = [ | |
pkgs.foundry-bin | |
pkgs.git | |
pkgs.jq | |
pkgs.zip | |
pkgs.unzip | |
pkgs-stable.nodejs_18 | |
pkgs-stable.nodePackages.typescript | |
]; | |
difftastic.enable = true; | |
enterShell = '' | |
echo -e "\\033[1;34m*********************************************************\\033[0m" | |
echo -e "\\033[1;34m* *\\033[0m" | |
echo -e "\\033[1;34m* \\033[1;32mWelcome to the Nix dev environment for foundry! \\033[1;34m *\\033[0m" | |
echo -e "\\033[1;34m* *\\033[0m" | |
echo -e "\\033[1;34m* For more information, please visit: *\\033[0m" | |
echo -e "\\033[1;36m* https://github.com/shazow/foundry.nix *\\033[0m" | |
echo -e "\\033[1;36m* https://github.com/cachix/devenv *\\033[0m" | |
echo -e "\\033[1;34 m* *\\033[0m" | |
echo -e "\\033[1;34m*********************************************************\\033[0m" | |
''; | |
# https://devenv.sh/languages/ | |
# languages.nix.enable = true; | |
# languages.typescript.enable = true; | |
# https://devenv.sh/scripts/ | |
# scripts.hello.exec = /tdp/scripts/script.sh; | |
# https://devenv.sh/pre-commit-hooks/ | |
# pre-commit.hooks.shellcheck.enable = true; | |
# https://devenv.sh/processes/ | |
# processes.ping.exec = "ping example.com"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allowUnfree: true | |
inputs: | |
nixpkgs: | |
url: github:NixOS/nixpkgs/nixpkgs-unstable | |
nixpkgs-stable: | |
url: github:NixOS/nixpkgs/nixos-23.11 | |
foundry-overlay: | |
url: path:./foundry-overlay | |
overlays: | |
- default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ cd foundry-devenv | |
direnv: loading ~/devenv/foundry-devenv/.envrc | |
direnv: loading https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc (sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0=) | |
direnv: using devenv | |
direnv: .envrc changed, reloading | |
direnv: ([/nix/store/vhskx613mi6c7cc10maw83bbgay906cl-direnv-2.32.3/bin/direnv export zsh]) is taking a while to execute. Use CTRL-C to give up. | |
• Using Cachix: devenv | |
error: | |
… while calling the 'derivationStrict' builtin | |
at <nix/derivation-internal.nix>:9:12: | |
8| | |
9| strict = derivationStrict drvAttrs; | |
| ^ | |
10| | |
… while evaluating derivation 'devenv-shell' | |
whose name attribute is located at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/pkgs/stdenv/generic/make-derivation.nix:331:7 | |
… while evaluating attribute 'DEVENV_PROFILE' of derivation 'devenv-shell' | |
… while evaluating derivation 'devenv-profile' | |
whose name attribute is located at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/pkgs/stdenv/generic/make-derivation.nix:331:7 | |
… while evaluating attribute 'passAsFile' of derivation 'devenv-profile' | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/pkgs/build-support/trivial-builders/default.nix:69:9: | |
68| inherit buildCommand name; | |
69| passAsFile = [ "buildCommand" ] | |
| ^ | |
70| ++ (derivationArgs.passAsFile or [ ]); | |
… from call site | |
at «github:cachix/devenv/9b6673ed1b46cbb30cb45af500c215092073ed31»/src/modules/top-level.nix:15:13: | |
14| name = "devenv-profile"; | |
15| paths = lib.flatten (builtins.map drvOrPackageToPaths config.packages); | |
| ^ | |
16| ignoreCollisions = true; | |
… while calling 'flatten' | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/lists.nix:383:13: | |
382| */ | |
383| flatten = x: | |
| ^ | |
384| if isList x | |
… from call site | |
at «github:cachix/devenv/9b6673ed1b46cbb30cb45af500c215092073ed31»/src/modules/top-level.nix:15:59: | |
14| name = "devenv-profile"; | |
15| paths = lib.flatten (builtins.map drvOrPackageToPaths config.packages); | |
| ^ | |
16| ignoreCollisions = true; | |
… while calling anonymous lambda | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/attrsets.nix:1171:18: | |
1170| mapAttrs | |
1171| (name: value: | |
| ^ | |
1172| if isAttrs value && cond value | |
… from call site | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/attrsets.nix:1174:18: | |
1173| then recurse (path ++ [ name ]) value | |
1174| else f (path ++ [ name ]) value); | |
| ^ | |
1175| in | |
… while calling anonymous lambda | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/modules.nix:242:72: | |
241| # For definitions that have an associated option | |
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options; | |
| ^ | |
243| | |
… while evaluating the option `packages': | |
… from call site | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/modules.nix:846:59: | |
845| if isDefined then | |
846| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal | |
| ^ | |
847| else let allInvalid = filter (def: ! type.check def.value) defsFinal; | |
… while calling 'merge' | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/types.nix:552:20: | |
551| check = isList; | |
552| merge = loc: defs: | |
| ^ | |
553| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def: | |
… while calling anonymous lambda | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/types.nix:553:35: | |
552| merge = loc: defs: | |
553| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def: | |
| ^ | |
554| imap1 (m: def': | |
… from call site | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/types.nix:553:38: | |
552| merge = loc: defs: | |
553| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def: | |
| ^ | |
554| imap1 (m: def': | |
… while calling anonymous lambda | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/lists.nix:334:29: | |
333| */ | |
334| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list); | |
| ^ | |
335| | |
… from call site | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/lists.nix:334:32: | |
333| */ | |
334| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list); | |
| ^ | |
335| | |
… while calling anonymous lambda | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/types.nix:554:21: | |
553| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def: | |
554| imap1 (m: def': | |
| ^ | |
555| (mergeDefinitions | |
… while calling anonymous lambda | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/modules.nix:824:28: | |
823| # Process mkMerge and mkIf properties. | |
824| defs' = concatMap (m: | |
| ^ | |
825| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | |
… while evaluating definitions from `/nix/store/virtual0000000000000000000000006-source/devenv.nix': | |
… from call site | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/modules.nix:825:137: | |
824| defs' = concatMap (m: | |
825| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value)) | |
| ^ | |
826| ) defs; | |
… while calling 'dischargeProperties' | |
at «github:NixOS/nixpkgs/2b80ce7707aedcb79be09e412b6dd6c15c578ab2»/lib/modules.nix:896:25: | |
895| */ | |
896| dischargeProperties = def: | |
| ^ | |
897| if def._type or "" == "merge" then | |
… from call site | |
at «github:shazow/foundry.nix/ece7c960a440c6725a7a5576d1f49a5fabde3747»/flake.nix:18:23: | |
17| pkgs = import nixpkgs { inherit system; }; | |
18| foundry-bin = import ./foundry-bin { inherit pkgs; }; | |
| ^ | |
19| # TODO: Add a source-based derivation someday | |
… while calling anonymous lambda | |
at «github:shazow/foundry.nix/ece7c960a440c6725a7a5576d1f49a5fabde3747»/foundry-bin/default.nix:1:1: | |
1| {pkgs ? import <nixpkgs> {}}: let | |
| ^ | |
2| inherit (pkgs) stdenv lib; | |
… while calling anonymous lambda | |
at «nix-internal»/call-flake.nix:81:25: | |
80| inputs = builtins.mapAttrs | |
81| (inputName: inputSpec: allNodes.${resolveInput inputSpec}) | |
| ^ | |
82| (node.inputs or {}); | |
… from call site | |
at «nix-internal»/call-flake.nix:81:36: | |
80| inputs = builtins.mapAttrs | |
81| (inputName: inputSpec: allNodes.${resolveInput inputSpec}) | |
| ^ | |
82| (node.inputs or {}); | |
… while calling anonymous lambda | |
at «nix-internal»/call-flake.nix:39:13: | |
38| builtins.mapAttrs | |
39| (key: node: | |
| ^ | |
40| let | |
error: | |
error: opening file '/nix/store/0n86420hx4bydkpx8q7a4vqw46f5ihhp-source/.devenv.flake.nix': No such file or directory | |
✖ Command produced the following output: | |
Error: × Command `/nix/store/16z8qb8j04nzahvxgms9wn9qba1fjh4z-nix-devenv-2.21.0pre20240315_c5bbf14/ | |
│ bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features | |
│ flakes --option warn-dirty false --option eval-cache false --keep-going --max-jobs 10 print- | |
│ dev-env --profile /home/getse/devenv/foundry-devenv/.devenv/gc/shell --option extra-substituters | |
│ https://devenv.cachix.org --option extra-trusted-public-keys nixpkgs-python.cachix.org- | |
│ 1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU= devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/ | |
│ Hm9XgU50cw=` failed with with exit code 1 | |
direnv: loading the environment failed | |
direnv: error exit status 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs = { | |
foundry.url = "github:shazow/foundry.nix/monthly"; | |
}; | |
outputs = { self, foundry, ... }: { | |
overlays.default = self: super: { | |
foundry-bin = foundry.defaultPackage.${self.system}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment