summaryrefslogtreecommitdiff
path: root/lib/source-types.nix
diff options
context:
space:
mode:
authorRobert Scott <github@humanleg.org.uk>2022-05-20 22:28:38 +0100
committerAlexander Foremny <aforemny@posteo.de>2022-05-30 16:27:34 +0800
commitae0df5d38afdb0be90973ddd42b1c9b1059464fd (patch)
tree97d2bd211a046bc0433b7d2978ff86296b47990f /lib/source-types.nix
parentmeta.sourceProvenance: inline hasSourceProvenance (diff)
downloadnixpkgs-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.nix12
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;