-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
74 lines (67 loc) · 2.01 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
67
68
69
70
71
72
73
74
# reference: https://github.com/mister-walter/homebrew-acl2s/blob/main/Formula/acl2s.rb
{
inputs = {
nixpkgs.url = github:nixos/nixpkgs/release-22.05;
flake-utils.url = github:numtide/flake-utils;
# Used for shell.nix
flake-compat = {
url = github:edolstra/flake-compat;
flake = false;
};
# necessary for the build
acl2s-scripts = {
url = "https://gitlab.com/acl2s/external-tool-support/scripts.git";
flake = false;
};
acl2-source = {
url = github:acl2/acl2;
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, acl2s-scripts, acl2-source, ... } @ inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
certifyBooks = true;
package = import ./default.nix { inherit system pkgs certifyBooks acl2-source acl2s-scripts; };
in rec {
name = "acl2s-overlay";
description = "An acl2s build for Nix";
defaultPackage = package;
packages.acl2s = defaultPackage;
apps = rec {
default = apps.acl2s;
acl2s = flake-utils.lib.mkApp { drv = packages.default; };
};
overlays.default = final: prev: {
acl2s = defaultPackage;
};
devShells.default = pkgs.mkShell {
inherit name description;
buildInputs = with pkgs; [
sbcl
openssl
z3
z3.lib
gcc
pkg-config
zlib
clang
];
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath (with pkgs; [
sbcl
openssl
z3
z3.lib
gcc
pkg-config
zlib
clang
])}:$LD_LIBRARY_PATH";
};
# For compatibility with older versions of the `nix` binary
devShell = self.devShells.${system}.default;
}
);
}