-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
41 lines (41 loc) · 1.12 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
{
description = "kriscv - K tooling for the RISC-V architecture";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix.url = "github:nix-community/poetry2nix";
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
let
allOverlays = [
poetry2nix.overlay
(final: prev: {
kriscv = prev.poetry2nix.mkPoetryApplication {
python = prev.python310;
projectDir = ./.;
groups = [];
# We remove `dev` from `checkGroups`, so that poetry2nix does not try to resolve dev dependencies.
checkGroups = [];
};
})
];
in flake-utils.lib.eachSystem [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
] (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = allOverlays;
};
in {
packages = rec {
inherit (pkgs) kriscv;
default = kriscv;
};
}) // {
overlay = nixpkgs.lib.composeManyExtensions allOverlays;
};
}