Last active
April 11, 2022 15:32
-
-
Save mkenigs/7c07c53bfab2825fa9f9b03adcd59b79 to your computer and use it in GitHub Desktop.
flakes
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
flakeA=/tmp/flakeA | |
flakeB=/tmp/flakeB | |
flakeC=/tmp/flakeC | |
flakeD=/tmp/flakeD | |
flakeD2=/tmp/flakeD2 | |
mkdir -p $flakeA $flakeB $flakeC $flakeD $flakeD2 | |
cat > $flakeA/flake.nix <<EOF | |
{ | |
inputs.b.url = git+file://$flakeB; | |
outputs = { self, b }: { | |
foo = 1 + b.foo; | |
}; | |
} | |
EOF | |
cat > $flakeB/flake.nix <<EOF | |
{ | |
inputs.c.url = git+file://$flakeC; | |
inputs.c.inputs.d.url = git+file://$flakeD2; | |
outputs = { self, c }: { | |
foo = 1 + c.foo; | |
}; | |
} | |
EOF | |
cat > $flakeC/flake.nix <<EOF | |
{ | |
inputs.d.url = git+file://$flakeD; | |
outputs = { self, d }: { | |
foo = 1 + d.foo; | |
}; | |
} | |
EOF | |
cat > $flakeD/flake.nix <<EOF | |
{ | |
outputs = { self }: { | |
foo = 1; | |
}; | |
} | |
EOF | |
cat > $flakeD2/flake.nix <<EOF | |
{ | |
outputs = { self }: { | |
foo = 2; | |
}; | |
} | |
EOF | |
$NIX --experimental-features "flakes nix-command" eval $flakeA#foo | |
# would expect foo is 5 but is 4 currently on master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment