flake: format
This commit is contained in:
parent
68d6b98230
commit
041ad2f5a3
33
flake.nix
33
flake.nix
|
@ -1,21 +1,20 @@
|
||||||
{
|
{
|
||||||
description = "Samw's APC PDU MQTT bridge";
|
description = "Samw's APC PDU MQTT bridge";
|
||||||
|
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let pkgs = import nixpkgs { inherit system; }; in
|
let pkgs = import nixpkgs { inherit system; };
|
||||||
rec {
|
in rec {
|
||||||
packages.apc2mqtt = pkgs.buildGoModule {
|
packages.apc2mqtt = pkgs.buildGoModule {
|
||||||
name = "apc2mqtt";
|
name = "apc2mqtt";
|
||||||
src = self;
|
src = self;
|
||||||
vendorSha256 = "sha256-GlRcuUNrsNnONigXut2xFx0kX+5k80Djn07c3UutCLU=";
|
vendorSha256 = "sha256-GlRcuUNrsNnONigXut2xFx0kX+5k80Djn07c3UutCLU=";
|
||||||
ldflags = ''
|
ldflags = ''
|
||||||
-X main.version=${if self ? rev then self.rev else "dirty"}
|
-X main.version=${if self ? rev then self.rev else "dirty"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
defaultPackage = packages.apc2mqtt;
|
defaultPackage = packages.apc2mqtt;
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue