-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
66 lines (62 loc) · 1.8 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
61
62
63
64
65
66
{
description = "A virtual machine and standard library for Monte";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
rpypkgs = {
url = "git://git.pf.osdn.net/gitroot/c/co/corbin/rpypkgs.git";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = { self, nixpkgs, flake-utils, rpypkgs }:
let
noPythonCheck = p: p.overridePythonAttrs (old: {
doCheck = false;
});
overlay = final: prev: {
libsodium = prev.libsodium.overrideDerivation (oldAttrs: {
stripAllList = "lib";
});
pypy = prev.pypy.override {
packageOverrides = (s: su: {
mock = noPythonCheck su.mock;
pytest = noPythonCheck su.pytest;
});
};
};
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowBroken = true;
permittedInsecurePackages = [
"python-2.7.18.6"
];
};
overlays = [ overlay ];
};
typhon = import ./nix-support/typhon.nix { inherit pkgs rpypkgs; };
qbe = pkgs.stdenv.mkDerivation {
name = "qbe-unstable";
src = pkgs.fetchgit {
url = "git://c9x.me/qbe.git";
sha256 = "0r2af5036bbqwd3all6q0mlwrjcww4xgi1yr8l5xgddmx6711ygw";
};
makeFlags = [ "PREFIX=$(out)" ];
doCheck = true;
};
in {
overlays.default = overlay;
packages = typhon // {
default = typhon.monte;
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [ cachix nix-tree ];
};
}
);
}