diff options
| author | Robert Scott <github@humanleg.org.uk> | 2022-05-20 22:28:38 +0100 |
|---|---|---|
| committer | Alexander Foremny <aforemny@posteo.de> | 2022-05-30 16:27:34 +0800 |
| commit | ae0df5d38afdb0be90973ddd42b1c9b1059464fd (patch) | |
| tree | 97d2bd211a046bc0433b7d2978ff86296b47990f /lib/source-types.nix | |
| parent | meta.sourceProvenance: inline hasSourceProvenance (diff) | |
| download | nixpkgs-ae0df5d38afdb0be90973ddd42b1c9b1059464fd.tar.gz | |
lib.sourceTypes: simplify implementation
Co-authored-by: Alexander Foremny <aforemny@posteo.de>
Diffstat (limited to 'lib/source-types.nix')
| -rw-r--r-- | lib/source-types.nix | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/source-types.nix b/lib/source-types.nix index 8a4ab540b9da..c4f263dcf464 100644 --- a/lib/source-types.nix +++ b/lib/source-types.nix @@ -1,17 +1,11 @@ { lib }: -lib.mapAttrs (tname: tset: let - defaultSourceType = { +let + defaultSourceType = tname: { shortName = tname; isSource = false; }; - - mkSourceType = sourceTypeDeclaration: let - applyDefaults = sourceType: defaultSourceType // sourceType; - in lib.pipe sourceTypeDeclaration [ - applyDefaults - ]; -in mkSourceType tset) { +in lib.mapAttrs (tname: tset: defaultSourceType tname // tset) { fromSource = { isSource = true; |
