-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
50 lines (50 loc) · 1.5 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
{
description = "mir-semantics - ";
inputs = {
k-framework.url = "github:runtimeverification/k/v7.1.166";
nixpkgs.follows = "k-framework/nixpkgs";
flake-utils.follows = "k-framework/flake-utils";
rv-utils.follows = "k-framework/rv-utils";
poetry2nix.follows = "k-framework/poetry2nix";
};
outputs = { self, nixpkgs, flake-utils, k-framework, ... }@inputs:
let
allOverlays = [
k-framework.overlays.pyk
(final: prev: let
poetry2nix =
inputs.poetry2nix.lib.mkPoetry2Nix { pkgs = prev; };
in {
mir-semantics = poetry2nix.mkPoetryApplication {
python = prev.python310;
projectDir = ./kmir;
overrides = poetry2nix.overrides.withDefaults
(finalPython: prevPython: {
kframework = prev.pyk-python310;
});
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) mir-semantics;
default = mir-semantics;
};
}) // {
overlay = nixpkgs.lib.composeManyExtensions allOverlays;
};
}