-
Notifications
You must be signed in to change notification settings - Fork 257
/
Copy pathflake.nix
79 lines (68 loc) · 1.73 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
{
description = "gh-dash";
inputs = {
nur.url = "github:nix-community/NUR";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
caarlos0-nur.url = "github:caarlos0/nur";
};
outputs =
{
self,
nixpkgs,
flake-utils,
nur,
caarlos0-nur,
}:
{
overlays.default = final: prev: {
gh-dash = self.packages.${prev.system}.default;
};
}
// flake-utils.lib.eachDefaultSystem (
system:
let
# overlays allow extending and changing nixpkgs with custom packages
overlays = [
(final: prev: {
nur = import nur {
nurpkgs = prev;
pkgs = prev;
# add caarlos0 and charmbracelet modules to nixpkgs
repoOverrides = {
caarlos0 = import caarlos0-nur { pkgs = prev; };
};
};
})
];
pkgs = nixpkgs.legacyPackages.${system};
gh-dash = pkgs.buildGoModule {
pname = "gh-dash";
version = "v4.12.0";
src = ./.;
vendorHash = "sha256-7s+Lp8CHo1+h2TmbTOcAGZORK+/1wytk4nv9fgD2Mhw=";
};
in
{
pkgs.overlays = overlays;
packages = {
default = gh-dash;
inherit gh-dash;
};
devShells.default = pkgs.mkShell {
name = "gh-dash";
inherit (gh-dash) nativeBuildInputs buildInputs;
packages = with pkgs; [
fd
goimports-reviser
golangci-lint
golangci-lint-langserver
gopls
nerdfix
svu
(callPackage ./docs { })
];
};
}
);
}