-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
39 lines (34 loc) · 969 Bytes
/
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
{
description = "A static site generator for kicad projects";
inputs.utils.url = "github:numtide/flake-utils";
inputs.devshell = {
url = "github:numtide/devshell";
inputs.utils.follows = "utils";
};
outputs = {
self,
nixpkgs,
utils,
devshell,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [devshell.overlay];
};
in rec {
packages.default = pkgs.buildGoModule {
name = "kicad-site-generator";
src = self;
vendorSha256 = "d1mQwSPnZDAMvBAUEdi+Sogr49LLzZ3TXZoztZU6sjo=";
# Inject the git version
ldflags = ''
-X main.version=${if self ? rev then self.rev else "dirty"}
'';
};
apps.default = utils.lib.mkApp {drv = packages.default;};
devShells.default =
pkgs.devshell.mkShell {packages = with pkgs; [go gopls];};
formatter = pkgs.alejandra;
});
}