about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-05-31 00:12:58 +0000
committerGitHub <noreply@github.com>2022-05-31 00:12:58 +0000
commit5250c9bcbc7c8a4512be49d57ae8d4ad07e52664 (patch)
tree2c8ae850225538e2008a72530ee3cea189273d03 /lib
parent7badab08b5789bd6c357704b43d1e4612abafd2d (diff)
parentef44c71d983d65dcb01eabdb459caaa522b7d962 (diff)
Merge master into haskell-updates
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix1
-rw-r--r--lib/source-types.nix19
2 files changed, 20 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index e919509e724a5..791eba8a9301f 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -36,6 +36,7 @@ let
 
     # constants
     licenses = callLibs ./licenses.nix;
+    sourceTypes = callLibs ./source-types.nix;
     systems = callLibs ./systems;
 
     # serialization
diff --git a/lib/source-types.nix b/lib/source-types.nix
new file mode 100644
index 0000000000000..c4f263dcf4643
--- /dev/null
+++ b/lib/source-types.nix
@@ -0,0 +1,19 @@
+{ lib }:
+
+let
+  defaultSourceType = tname: {
+    shortName = tname;
+    isSource = false;
+  };
+in lib.mapAttrs (tname: tset: defaultSourceType tname // tset) {
+
+  fromSource = {
+    isSource = true;
+  };
+
+  binaryNativeCode = {};
+
+  binaryBytecode = {};
+
+  binaryFirmware = {};
+}