forked from lix-project/lix
Fix 'nix flake init'
This commit is contained in:
parent
7d38060a0d
commit
14a89aa8cd
|
@ -1,15 +1,11 @@
|
|||
{
|
||||
name = "hello";
|
||||
|
||||
description = "A flake for building Hello World";
|
||||
|
||||
epoch = 201906;
|
||||
edition = 201909;
|
||||
|
||||
requires = [ "nixpkgs" ];
|
||||
outputs = { self, nixpkgs }: {
|
||||
|
||||
provides = deps: rec {
|
||||
|
||||
packages.hello = deps.nixpkgs.provides.packages.hello;
|
||||
packages.x86_64-linux.hello = nixpkgs.packages.x86_64-linux.hello;
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -36,6 +36,9 @@ cat > $flake1Dir/flake.nix <<EOF
|
|||
outputs = inputs: rec {
|
||||
packages.$system.foo = import ./simple.nix;
|
||||
defaultPackage.$system = packages.$system.foo;
|
||||
|
||||
# To test "nix flake init".
|
||||
packages.x86_64-linux.hello = import ./simple.nix;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
@ -339,8 +342,10 @@ nix flake pin --flake-registry $registry flake1
|
|||
nix flake remove --flake-registry $registry flake1
|
||||
(( $(nix flake list --flake-registry $registry | wc -l) == 5 ))
|
||||
|
||||
# Test 'nix flake init'.
|
||||
(cd $flake7Dir && nix flake init)
|
||||
nix flake --flake-registry $registry check $flake3Dir
|
||||
git -C $flake7Dir add flake.nix
|
||||
nix flake --flake-registry $registry check $flake7Dir
|
||||
|
||||
rm -rf $TEST_ROOT/flake1-v2
|
||||
nix flake clone --flake-registry $registry flake1 $TEST_ROOT/flake1-v2
|
||||
|
|
Loading…
Reference in a new issue