-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
98 lines (81 loc) · 2.69 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
86
87
88
89
90
91
92
93
94
95
96
97
98
{
description = "DateiLager development environment";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, flake-utils, nixpkgs }:
(flake-utils.lib.eachSystem [
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
"aarch64-linux"
]
(system: nixpkgs.lib.fix (flake:
let
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib // {
maintainers = pkgs.lib.maintainers // {
angelini = {
name = "Alex Angelini";
email = "[email protected]";
github = "angelini";
githubId = 515110;
};
scott-rc = {
name = "Scott Côté";
email = "[email protected]";
github = "scott-rc";
githubId = 21965521;
};
};
};
callPackage = pkgs.newScope (flake.packages // { inherit lib callPackage; });
in
{
packages = {
## DateiLager development scripts
clean = callPackage ./development/nix/scripts/clean.nix { };
dev = callPackage ./development/nix/scripts/dev.nix {
services = callPackage ./development/nix/services { };
};
## Pinned packages from nixpkgs
go = pkgs.go_1_22;
nodejs = pkgs.nodejs-18_x;
postgresql = pkgs.postgresql_14;
golangci-lint = pkgs.golangci-lint;
glibcLocales = pkgs.glibcLocales;
## DateiLager outputs
dateilager = callPackage ./. {
buildGoModule = pkgs.buildGoModule.override {
go = flake.packages.go;
};
};
};
defaultPackage = flake.packages.dateilager;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
flake.packages.go
flake.packages.nodejs
flake.packages.postgresql
flake.packages.dev
flake.packages.clean
flake.packages.golangci-lint
flake.packages.glibcLocales
git
protobuf
protoc-gen-go
protoc-gen-go-grpc
go-migrate
mkcert
];
shellHook = ''
# prepend the built binaries to the $PATH
export PATH="./bin":$PATH
# silence ginko deprecations -- they come from the csi test suite that we don't control
export ACK_GINKGO_DEPRECATIONS=1.16.5
'';
};
}
)));
}