-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
62 lines (62 loc) · 1.91 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
{
inputs = {
nix-go = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:matthewdargan/nix-go";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
parts.url = "github:hercules-ci/flake-parts";
pre-commit-hooks = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:cachix/pre-commit-hooks.nix";
};
};
outputs = inputs:
inputs.parts.lib.mkFlake {inherit inputs;} {
imports = [inputs.pre-commit-hooks.flakeModule];
perSystem = {
config,
inputs',
lib,
pkgs,
...
}: {
devShells.default = pkgs.mkShell {
packages = [inputs'.nix-go.packages.go inputs'.nix-go.packages.golangci-lint];
shellHook = "${config.pre-commit.installationScript}";
};
packages.epify = inputs'.nix-go.legacyPackages.buildGoModule {
meta = with lib; {
description = "Categorize shows and movies using the Jellyfin naming scheme";
homepage = "https://github.com/matthewdargan/epify";
license = licenses.bsd3;
maintainers = with maintainers; [matthewdargan];
};
pname = "epify";
src = ./.;
vendorHash = "sha256-xzbAmWhfOiFYnMAVGgqDQzPLqK5/Gg6oCeSuJ9I4OCE=";
version = "0.4.3";
};
pre-commit = {
check.enable = false;
settings = {
hooks = {
alejandra.enable = true;
deadnix.enable = true;
golangci-lint = {
enable = true;
package = inputs'.nix-go.packages.golangci-lint;
};
gotest = {
enable = true;
package = inputs'.nix-go.packages.go;
};
statix.enable = true;
};
src = ./.;
};
};
};
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
};
}