mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-08-17 11:10:57 +03:00
lib.sourceTypes: simplify implementation
Co-authored-by: Alexander Foremny <aforemny@posteo.de>
This commit is contained in:
parent
5bb9bf4774
commit
ae0df5d38a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user