From 78bf03cea35debdeabe0f8d6ccd9ec8319cd1714 Mon Sep 17 00:00:00 2001 From: "Yang, Bo" Date: Wed, 11 Sep 2024 23:00:39 -0700 Subject: [PATCH 1/2] Remove default value of `extraInputsFlake` --- extras/partitions.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/extras/partitions.nix b/extras/partitions.nix index c55bdfa..c980b4a 100644 --- a/extras/partitions.nix +++ b/extras/partitions.nix @@ -12,7 +12,6 @@ let options = { extraInputsFlake = mkOption { type = types.raw; - default = { }; description = '' Location of a flake whose inputs to add to the inputs module argument in the partition. Note that flake `follows` are resolved without any awareness of inputs that are not in the flake. From 5766ecf987a46a651e7176a861bc2d24a9d26873 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 12 Sep 2024 16:56:41 +0200 Subject: [PATCH 2/2] Test unset extraInputsFlake --- dev/tests/eval-tests.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dev/tests/eval-tests.nix b/dev/tests/eval-tests.nix index 5a47d8e..5990332 100644 --- a/dev/tests/eval-tests.nix +++ b/dev/tests/eval-tests.nix @@ -158,6 +158,17 @@ rec { flake.foo = true; }); + partitionWithoutExtraInputsFlake = mkFlake + { + inputs.self = { }; + } + ({ config, ... }: { + imports = [ flake-parts.flakeModules.partitions ]; + systems = [ "x86_64-linux" ]; + partitions.dev.module = { inputs, ... }: builtins.seq inputs { }; + partitionedAttrs.devShells = "dev"; + }); + runTests = ok: assert empty == { @@ -242,6 +253,8 @@ rec { assert specialArgFlake.foo; + assert builtins.isAttrs partitionWithoutExtraInputsFlake.devShells.x86_64-linux; + ok; result = runTests "ok";