-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (32 loc) · 989 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
{
description = "Serve your deb files as an APT repo";
inputs.utils.url = "github:numtide/flake-utils";
inputs.devshell.url = "github:numtide/devshell";
inputs.nixpkgs.url = "github:nixos/nixpkgs";
outputs = {
self,
nixpkgs,
utils,
devshell,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [devshell.overlays.default];
};
in rec {
packages.default = pkgs.buildGoModule {
name = "debanator";
src = self;
vendorSha256 = "sha256-M8/8fi0JBkUDjhLpur54bv2HzaOEhAIuqZO+oSvkIBk=";
# doesn't work
#ldflags = ''
# -X github.com/wlcx/debanator.Commit=${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 goreleaser];};
formatter = pkgs.alejandra;
});
}