diff --git a/.gitignore b/.gitignore index 5f8a2b9..642e4ec 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,5 @@ fabric.properties /tcpDialer.go /hochwasser /hochwasser.exe + +result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5154297 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1672428209, + "narHash": "sha256-eejhqkDz2cb2vc5VeaWphJz8UXNuoNoM8/Op8eWv2tQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..cdb7607 --- /dev/null +++ b/flake.nix @@ -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"; }; + }); +}