-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
65 lines (58 loc) · 1.79 KB
/
flake.nix
File metadata and controls
65 lines (58 loc) · 1.79 KB
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
testScript = pkgs.writeShellScriptBin "test" ''
${pkgs.gradle}/bin/gradle test
'';
specScript = pkgs.writeShellScriptBin "spec" ''
${pkgs.quint}/bin/quint run ./spec/raft.qnt --max-steps=50 --mbt --invariants foobar
'';
# kotlinLspPatch = pkgs.writeShellScriptBin "kotlin-language-server" ''
# JAVA_OPTS="-Xms1g -Xmx2g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+UseStringDeduplication" \
# exec ${pkgs.kotlin-language-server}/bin/kotlin-language-server
# '';
in
{
apps.test = {
type = "app";
buildInputs = with pkgs;[
pkgs.gradle
pkgs.openjdk21
pkgs.kotlin
];
program = "${testScript}/bin/test";
};
apps.spec = {
type = "app";
buildInputs = with pkgs;[
pkgs.quint
pkgs.nodejs
];
program = "${specScript}/bin/spec";
};
devShells.default = pkgs.mkShell {
buildInputs = [
# Quint Spec Deps
pkgs.quint
pkgs.nodejs
# Dev Deps
pkgs.gradle
pkgs.openjdk21
pkgs.kotlin
pkgs.ktlint
# kotlinLspPatch
];
shellHook = ''
export GRADLE_USER_HOME="$PWD/.gradle"
export PATH="$PATH:$(pwd)/node_modules/.bin"
npm install @informalsystems/quint-language-server -D
'';
};
});
}