-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
60 lines (51 loc) · 1.3 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# Copyright 2024, UNSW
# SPDX-License-Identifier: BSD-2-Clause
#
{
description = "A flake for building sDDF";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/24.05";
utils.url = "github:numtide/flake-utils";
zig-overlay.url = "github:mitchellh/zig-overlay";
};
outputs = { self, nixpkgs, zig-overlay, ... }@inputs: inputs.utils.lib.eachSystem [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
(system:
let
pkgs = import nixpkgs {
inherit system;
};
zig = zig-overlay.packages.${system}.master;
pysdfgen = pkgs.callPackage ./package.nix { zig = zig; pythonPackages = pkgs.python312Packages; };
in
{
devShells.default = pkgs.mkShell rec {
name = "dev";
nativeBuildInputs = with pkgs; [
dtc
zig
python312
sphinx
];
};
devShells.ci = pkgs.mkShell rec {
name = "ci";
pythonWithSdfgen = pkgs.python312.withPackages (ps: [
pysdfgen
ps.sphinx-rtd-theme
]);
nativeBuildInputs = with pkgs; [
dtc
zig
pythonWithSdfgen
sphinx
];
};
packages.pysdfgen = pysdfgen;
});
}