diff --git a/.gitignore b/.gitignore index 4c82b07..658b6ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ zig-cache zig-out +result diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..727a44a --- /dev/null +++ b/default.nix @@ -0,0 +1,13 @@ +{ stdenv, zig_0_12, lib, ... }: +stdenv.mkDerivation { + name = "artificer"; + src = lib.cleanSource ./.; + + nativeBuildInputs = [ + zig_0_12.hook + ]; + + preConfigure = '' + zigBuildFlags="-Dtarget=x86_64-linux --release=fast" + ''; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..f5f3ef5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1722221733, + "narHash": "sha256-sga9SrrPb+pQJxG1ttJfMPheZvDOxApFfwXCFO0H9xw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "12bf09802d77264e441f48e25459c10c93eada2e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..4ba4eb2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Artifacts MMO automation client"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + }; + + outputs = { self, nixpkgs }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + packages.x86_64-linux.default = pkgs.callPackage ./. { }; + }; +}