forked from storyicon/powerproto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
34 lines (28 loc) · 902 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
{
description = "Powerproto";
inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
outputs = { self, nixpkgs, systems }:
let
version = "0.4.2";
forEachSystem = nixpkgs.lib.genAttrs (import systems);
nixpkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
in {
# Provide some binary packages for selected system types.
packages = forEachSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
powerproto = pkgs.buildGoModule {
pname = "powerproto";
inherit version;
src = ./.;
CGO_ENABLED = 0;
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
vendorSha256 = "sha256-MwL6eA5u7dusWDIgbfyyvNqoP4ZhpSWaQuLsUI+YU9k=";
doCheck = false;
};
}
);
defaultPackage = forEachSystem (system: self.packages.${system}.powerproto);
};
}