Skip to content

Commit

Permalink
feat: added nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-ulonska committed Dec 31, 2022
1 parent 2c3af24 commit 66661e7
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ fabric.properties
/tcpDialer.go
/hochwasser
/hochwasser.exe

result
43 changes: 43 additions & 0 deletions flake.lock

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

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

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in
rec {
devShell = pkgs.mkShell {
buildInputs = [
pkgs.go
];
};
defaultPackage = pkgs.buildGoModule {
pname = "Hochwasser";
name = "Hochwasser";
src = ./.;
vendorSha256 = "sha256-wc52mzV8cs4X1pQHIDcwh2oZiPLLUJwGN/nU9HJvZpQ=";
};
apps.default = { type = "app"; program = "${defaultPackage}/bin/Hochwasser"; };
});
}

0 comments on commit 66661e7

Please sign in to comment.