Now Passing

This commit is contained in:
2023-05-23 13:15:36 -04:00
parent dcea1444c3
commit 175d46bdd9
14 changed files with 132 additions and 398 deletions

32
flake.nix Normal file
View File

@@ -0,0 +1,32 @@
{
description = "Compute Canada Flake Packages (Overlay)";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: {
overlays = {
default = final: prev: import ./pkgs/all-packages.nix final prev;
};
} // (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowAliases = false;
overlays = [ self.overlays.default ];
};
inherit (pkgs) lib;
overlayAttributes = lib.pipe (import ./. pkgs pkgs) [
builtins.attrNames
(lib.partition (n: lib.isDerivation pkgs.${n}))
];
attributesToAttrset = attributes: lib.pipe attributes [
(map (n: lib.nameValuePair n pkgs.${n}))
lib.listToAttrs
];
in {
lib = attributesToAttrset overlayAttributes.wrong;
packages = attributesToAttrset overlayAttributes.right;
}
));
}