mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

heavily based on patterns used by licenses infrastructure, so may appear overengineered for its initial level of use
25 lines
430 B
Nix
25 lines
430 B
Nix
{ lib }:
|
|
|
|
lib.mapAttrs (tname: tset: let
|
|
defaultSourceType = {
|
|
shortName = tname;
|
|
isSource = false;
|
|
};
|
|
|
|
mkSourceType = sourceTypeDeclaration: let
|
|
applyDefaults = sourceType: defaultSourceType // sourceType;
|
|
in lib.pipe sourceTypeDeclaration [
|
|
applyDefaults
|
|
];
|
|
in mkSourceType tset) {
|
|
|
|
fromSource = {
|
|
isSource = true;
|
|
};
|
|
|
|
binaryNativeCode = {};
|
|
|
|
binaryBytecode = {};
|
|
|
|
binaryFirmware = {};
|
|
}
|