chore: lib.nix remove projectsJson from flake outputs

This commit is contained in:
DavHau 2022-12-07 15:57:53 +07:00
parent e48421c830
commit cb641555c8
3 changed files with 20 additions and 27 deletions

View File

@ -60,6 +60,7 @@ to create a `flake.nix`:
systemsFromFile = ./nix_systems;
config.projectRoot = ./.;
source = ./.;
projects = ./projects.toml;
};
}
```
@ -87,12 +88,11 @@ git+file:///tmp/my_project
│ └───x86_64-linux
│ ├───cowsay: development environment 'nix-shell'
│ └───default: development environment 'nix-shell'
├───packages
│ └───x86_64-linux
│ ├───cowsay: package 'cowsay-1.5.0'
│ ├───default: package 'cowsay-1.5.0'
│ └───resolveImpure: package 'resolve'
└───projectsJson: unknown
└───packages
└───x86_64-linux
├───cowsay: package 'cowsay-1.5.0'
├───default: package 'cowsay-1.5.0'
└───resolveImpure: package 'resolve'
```
We can see that:
@ -207,12 +207,11 @@ git+file:///tmp/my_project
│ └───x86_64-linux
│ ├───cowsay: development environment 'nix-shell'
│ └───default: development environment 'nix-shell'
├───packages
│ └───x86_64-linux
│ ├───cowsay: package 'cowsay-1.5.0'
│ ├───default: package 'cowsay-1.5.0'
│ └───resolveImpure: package 'resolve'
└───projectsJson: unknown
└───packages
└───x86_64-linux
├───cowsay: package 'cowsay-1.5.0'
├───default: package 'cowsay-1.5.0'
└───resolveImpure: package 'resolve'
```
When we enter the `cowsay` development shell, we will get `node` in our
`PATH`, together with all the binaries from our dependencies packages.

View File

@ -42,11 +42,10 @@ warning: Git tree '/tmp/my_project' is dirty
warning: creating lock file '/tmp/my_project/flake.lock'
warning: Git tree '/tmp/my_project' is dirty
git+file:///tmp/my_project
├───packages
│ └───x86_64-linux
│ ├───main: package 'main'
│ └───resolveImpure: package 'resolve'
└───projectsJson: unknown
└───packages
└───x86_64-linux
├───main: package 'main'
└───resolveImpure: package 'resolve'
```
What we can observe here:
@ -57,11 +56,10 @@ Our flake.nix imported external libraries. The versions of these libraries have
1.
```
git+file:///tmp/my_project
├───packages
│ └───x86_64-linux
│ ├───main: package 'main'
│ └───resolveImpure: package 'resolve'
└───projectsJson: unknown
└───packages
└───x86_64-linux
├───main: package 'main'
└───resolveImpure: package 'resolve'
```
Similar like a .json file defines a structure of data, our flake.nix defines a structure of `nix attributes` which are things that we can build or run with nix.
We can see that it contains packages for my current platform `x86_64-linux`.

View File

@ -195,12 +195,8 @@
(allOutputs: output: lib.recursiveUpdate allOutputs output)
{}
flakifiedOutputsList;
flakeOutputs =
{projectsJson = l.toJSON finalProjects;}
// flakeOutputsBuilders;
in
flakeOutputs;
flakeOutputsBuilders;
makeFlakeOutputsForIndexes = {
systems ? [],