-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
45 lines (42 loc) · 1.33 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
clj-nix.url = "github:jlesquembre/clj-nix";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
perSystem = { self', pkgs, lib, system, ... }:
let version = "1.2";
in rec {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nixfmt-classic
postgresql
clojure-lsp
clojure
jdk
];
};
packages.default = inputs.clj-nix.lib.mkCljApp {
pkgs = pkgs;
modules = [{
projectSrc = ./.;
version = version;
name = "studerl/breakfastbot";
main-ns = "breakfastbot.core";
java-opts = [ "-Dconf=prod-config.edn" ];
customJdk.enable = true;
}];
};
packages.docker = pkgs.dockerTools.buildLayeredImage {
name = "studerl/breakfastbot";
tag = version;
config.Cmd = [ "${packages.default}/bin/breakfastbot" ];
contents = with pkgs.dockerTools; [ caCertificates ];
};
};
};
}