Dogfood flakeModules.partitions
This commit is contained in:
parent
0d5122e84c
commit
1957ef2c4b
7 changed files with 12 additions and 40 deletions
12
ci.nix
12
ci.nix
|
|
@ -1,12 +0,0 @@
|
||||||
# We're doing things a bit differently because Nix doesn't let us
|
|
||||||
# split out the dev dependencies and subflakes are broken, let alone "superflakes".
|
|
||||||
# See dev/README.md
|
|
||||||
let
|
|
||||||
flake = import ./dev;
|
|
||||||
inherit (flake.inputs.nixpkgs) lib;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
inherit (flake) herculesCI;
|
|
||||||
} // {
|
|
||||||
checks = lib.recurseIntoAttrs flake.checks.${builtins.currentSystem};
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
# Separate `dev` flake
|
|
||||||
|
|
||||||
Wouldn't recommend this pattern normally, but I'm trying to keep
|
|
||||||
deps low for `flake-parts` until we have split dev inputs
|
|
||||||
that don't carry over to dependent lock files.
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
let
|
|
||||||
flake = builtins.getFlake (toString ./.);
|
|
||||||
fmc-lib = (builtins.getFlake (toString ../.)).lib;
|
|
||||||
args = {
|
|
||||||
inherit self;
|
|
||||||
} // flake.inputs;
|
|
||||||
self = {
|
|
||||||
inherit (flake) inputs;
|
|
||||||
outPath = ../.; # used by pre-commit module, etc
|
|
||||||
outputs = self.config.flake;
|
|
||||||
} //
|
|
||||||
fmc-lib.mkFlake
|
|
||||||
{ inputs = args; }
|
|
||||||
./flake-module.nix;
|
|
||||||
in
|
|
||||||
self.config.flake // { inherit (flake) inputs; }
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Flakes don't give us a good way to depend on .., so we don't.
|
# Flakes don't give us a good way to depend on .., so we don't.
|
||||||
# As a consequence, this flake is a little non-standard, and
|
# As a consequence, this flake only provides dependencies, and
|
||||||
# we can't use the `nix` CLI as expected.
|
# we can't use the `nix` CLI as expected.
|
||||||
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
|
|
@ -16,5 +16,6 @@
|
||||||
{
|
{
|
||||||
# The dev tooling is in ./flake-module.nix
|
# The dev tooling is in ./flake-module.nix
|
||||||
# See comment at `inputs` above.
|
# See comment at `inputs` above.
|
||||||
|
# It is loaded into partitions.dev by the root flake.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# convenience for loading into nix repl
|
|
||||||
let self = builtins.getFlake (toString ./.);
|
|
||||||
in self // { inherit self; }
|
|
||||||
|
|
@ -53,6 +53,15 @@
|
||||||
in
|
in
|
||||||
lib.mkFlake { inherit inputs; } {
|
lib.mkFlake { inherit inputs; } {
|
||||||
systems = [ ];
|
systems = [ ];
|
||||||
|
imports = [ flakeModules.partitions ];
|
||||||
|
partitionedAttrs.checks = "dev";
|
||||||
|
partitionedAttrs.devShells = "dev";
|
||||||
|
partitionedAttrs.herculesCI = "dev";
|
||||||
|
partitions.dev.extraInputsFlake = ./dev;
|
||||||
|
partitions.dev.extraInputs.flake-parts = inputs.self;
|
||||||
|
partitions.dev.module = {
|
||||||
|
imports = [ ./dev/flake-module.nix ];
|
||||||
|
};
|
||||||
flake = {
|
flake = {
|
||||||
inherit lib templates flakeModules;
|
inherit lib templates flakeModules;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
# non-idiomatic, see tools/README.md
|
(builtins.getFlake ("git+file://" + toString ./.)).devShells.${builtins.currentSystem}.default
|
||||||
(import ./dev).devShells.${builtins.currentSystem}.default
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue