add nix build

This commit is contained in:
Rokas Puzonas 2024-07-31 22:01:36 +03:00
parent 56de31d5c5
commit 69089a4fb5
4 changed files with 56 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
zig-cache zig-cache
zig-out zig-out
result

13
default.nix Normal file
View File

@ -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"
'';
}

27
flake.lock generated Normal file
View File

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

15
flake.nix Normal file
View File

@ -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 ./. { };
};
}