-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (54 loc) · 1.54 KB
/
flake.nix
File metadata and controls
58 lines (54 loc) · 1.54 KB
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
in {
formatter = pkgs.writeShellScriptBin "fmt" ''
${pkgs.alejandra}/bin/alejandra .
'';
devShells.default = pkgs.mkShell {
# This old version of restic doesn't return the right status code when a
# repository is not found. We want to support it too because it's still
# in use in ubuntu 24.04.
RESTIC_0_16 = pkgs.restic.overrideAttrs (final: previous: rec {
version = "0.16.5";
src = pkgs.fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
hash = "sha256-WwySXQU8eoyQRcI+zF+pIIKLEFheTnqkPTw0IZeUrhA=";
};
vendorHash = "sha256-VZTX0LPZkqN4+OaaIkwepbGwPtud8Cu7Uq7t1bAUC8M=";
});
hardeningDisable = [
"fortify" # required to use delve debugger
];
packages = [
# Nix & flake
pkgs.nil
pkgs.alejandra
# Go
pkgs.go
pkgs.cobra-cli
pkgs.go-mockery
# Misc tooling
pkgs.golangci-lint
pkgs.goreleaser
pkgs.svu
pkgs.gotestsum
pkgs.just
pkgs.rsync
pkgs.restic
pkgs.bash # used in e2e tests
];
};
});
}