Generate flake.nix from module options. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
dendritic nix inputs

allow empty follows (#38)

authored by oeiuwq.com and committed by

GitHub 57b2a658 2ea33b2e

+14 -1
+3 -1
dev/modules/_lib/default.nix
··· 40 40 inputsFollow = lib.mapAttrs ( 41 41 _: input: 42 42 mergeNonEmptyAttrs input { 43 - follows = { }; 43 + follows = { 44 + testEmpty = v: v == null; # allow empty follows string 45 + }; 44 46 inputs = nonEmptyInputs input; 45 47 } 46 48 );
+11
dev/modules/unit-tests/inputsExpr.nix
··· 57 57 }; 58 58 }; 59 59 60 + tests.inputsExpr."test on input with follows to empty" = { 61 + expr = inputsExpr { 62 + foo.url = "foo"; 63 + foo.inputs.bar.follows = ""; 64 + }; 65 + expected = { 66 + foo.url = "foo"; 67 + foo.inputs.bar.follows = ""; 68 + }; 69 + }; 70 + 60 71 in 61 72 { 62 73 flake = { inherit tests; };