-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
29 lines (23 loc) · 827 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
description = "A simple graph library used in DSC40B @ UCSD.";
inputs.nixpkgs.url = github:NixOS/nixpkgs/20.03;
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
in
{
publish = forAllSystems (system:
with import nixpkgs { system = "${system}"; };
python3Packages.buildPythonPackage {
name = "dsc40graph";
src = ./.;
propagatedBuildInputs = with python3Packages; [];
nativeBuildInputs = with python3Packages; [ pytest black ipython ];
}
);
defaultPackage = forAllSystems (system:
self.publish.${system}
);
};
}