mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
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 = {
|
||||
# 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.
|
||||
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
|
@ -16,5 +16,6 @@
|
|||
{
|
||||
# The dev tooling is in ./flake-module.nix
|
||||
# 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
|
||||
lib.mkFlake { inherit inputs; } {
|
||||
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 = {
|
||||
inherit lib templates flakeModules;
|
||||
};
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
# non-idiomatic, see tools/README.md
|
||||
(import ./dev).devShells.${builtins.currentSystem}.default
|
||||
(builtins.getFlake ("git+file://" + toString ./.)).devShells.${builtins.currentSystem}.default
|
||||
|
|
Loading…
Reference in a new issue