-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
64 lines (57 loc) · 1.58 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
{
description = "baboon build environment";
# this version contains essential graalvm fixes, but we will have to pin to a better tag once available
inputs.nixpkgs.url = "github:NixOS/nixpkgs/8c9fd3e564728e90829ee7dbac6edc972971cd0f";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.sbt.url = "github:zaninime/sbt-derivation";
inputs.sbt.inputs.nixpkgs.follows = "nixpkgs";
outputs =
{ self
, nixpkgs
, flake-utils
, sbt
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = rec {
baboon = sbt.lib.mkSbtDerivation {
pkgs = pkgs;
version = "0.0.97";
pname = "baboon";
src = ./.;
depsSha256 = "sha256-aHR00f3o1CgW7ciqUmzF2AWhSRQvh2vz94EUTWQvTBA=";
nativeBuildInputs = with pkgs; [
graalvm-ce
];
depsWarmupCommand = ''
sbt update
'';
buildPhase = ''
./build.sh build
'';
installPhase = ''
mkdir -p $out/bin
cp target/graalvm-native-image/baboon $out/bin/baboon
'';
};
default = baboon;
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
ncurses
gitMinimal
graalvm-ce
pkgs.sbt
dotnet-sdk_8
coreutils
shellspec
nix
];
};
}
);
}