flake: format

This commit is contained in:
Sam W 2022-04-17 01:36:23 +01:00
parent 68d6b98230
commit 041ad2f5a3
1 changed files with 16 additions and 17 deletions

View File

@ -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;
} });
);
} }