nixpkgs/lib/source-types.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
430 B
Nix
Raw Normal View History

{ 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 = {};
}