forked from johannesloetzsch/swlkup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
60 lines (54 loc) · 2.02 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
{
description = "Reproducible toolchain for building and testing Supervisor Lookup";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
mvn2nix-pkgs.url = "github:fzakaria/mvn2nix";
};
outputs =
{
self,
nixpkgs,
mvn2nix-pkgs,
}:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [
(import ./frontend/nix/deps/cypress/cypress-overlay.nix)
(self: super: {
# We run jdk 17 in prod and compiling clojure on jdk21 creates stuff that
# can't run on 17: https://aphyr.com/posts/369-classnotfoundexception-java-util-sequencedcollection
jdk = self.jdk17;
})
];
};
mvn2nix = mvn2nix-pkgs.legacyPackages.${system}.mvn2nix;
buildMavenRepositoryFromLockFile =
mvn2nix-pkgs.legacyPackages.${system}.buildMavenRepositoryFromLockFile;
in
{
packages.${system} = {
inherit nixpkgs pkgs mvn2nix;
default = self.packages.${system}.fullstack;
## Tools
backendUpdatedDeps = import ./backend/nix/tools/updated-deps.nix { inherit pkgs mvn2nix; };
frontendCodegen = import ./frontend/nix/tools/codegen.nix { inherit pkgs; };
frontendUpdatedDeps = import ./frontend/nix/tools/updated-deps.nix { inherit pkgs; };
cypress = import ./frontend/nix/deps/cypress/override.nix { inherit pkgs; };
release = import ./.circleci/nix/tools/release.nix { inherit pkgs; };
## Builds
backend = import ./backend/nix/swlkup-backend.nix {
inherit pkgs buildMavenRepositoryFromLockFile;
};
frontend = import ./frontend/nix/swlkup-frontend.nix { inherit pkgs; };
fullstack = import ./backend/nix/swlkup-backend.nix {
inherit pkgs buildMavenRepositoryFromLockFile;
patchPublic = self.packages.${system}.frontend.staticHTML;
};
};
devShells.${system} = {
default = import ./shell.nix { inherit pkgs; };
};
};
}