Skip to content

Commit

Permalink
Add nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
DJAndries committed Oct 18, 2024
1 parent 12da224 commit 255fa70
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
description = "Nitriding daemon";

inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
};

outputs = { self, nixpkgs }:
let
system = "x86_64-linux";

pkgs = import nixpkgs { inherit system; };

in {
packages.x86_64-linux.default = pkgs.buildGoModule {
pname = "nitriding-daemon";
version = "1.4.2";
src = builtins.filterSource
(path: type:
let relPath = pkgs.lib.removePrefix (toString ./. + "/") path;
in pkgs.lib.hasSuffix ".go" relPath ||
pkgs.lib.hasSuffix ".mod" relPath ||
pkgs.lib.hasSuffix ".sum" relPath)
./.;
vendorHash = "sha256-KKgDI8W2Xbpfr3lRuSYH4fdOjPFfQZdapg7m09pXm80=";
CGO_ENABLED = 0;
ldflags = ["-s" "-w"];
checkFlags = ["-skip"];
};
};
}

0 comments on commit 255fa70

Please sign in to comment.