-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflake.nix
85 lines (74 loc) · 2.22 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
75
76
77
78
79
80
81
82
83
84
85
{
description = "baboon build environment";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/24.05";
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 {
idealingua-v1 = sbt.lib.mkSbtDerivation {
pkgs = pkgs;
version = "1.3.22";
pname = "idealingua-v1";
src = ./.;
depsSha256 = "sha256-zfBdWVlSj0aSWxUmHcA0igLuBLYzxmCebR7/7jorX1o=";
nativeBuildInputs = with pkgs; [
coursier
libarchive
ammonite_2_13
];
depsWarmupCommand = ''
#export COURSIER_ARCHIVE_CACHE="$${COURSIER_CACHE}/arc"
amm --home $$TMP --tmp-output-directory --no-home-predef ./sbtgen.sc
sbt "++2.13 clean" "++2.13 compile"
'';
buildPhase = ''
#export COURSIER_ARCHIVE_CACHE="$${COURSIER_CACHE}/arc"
amm --home $$TMP --tmp-output-directory --no-home-predef ./sbtgen.sc
sbt "++2.13 clean" "++2.13 Universal/packageBin"
'';
installPhase = ''
mkdir -p $out
bsdtar -xf ./idealingua-v1/idealingua-v1-compiler/target/universal/idealingua-v1-compiler-*.zip --strip-components 1 -C $out/
'';
};
default = idealingua-v1;
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
ncurses
graalvm-ce
coursier
ammonite_2_13
pkgs.buildPackages.sbt
dotnet-sdk_6
mono
msbuild
dotnetPackages.NUnitConsole
dotnetPackages.Nuget
protobuf
nodejs
nodePackages.npm
typescript
yarn
coreutils
shellspec
jq
nix
gitMinimal
];
};
}
);
}