Update build, add nix flake

master
Louis Pearson 2022-08-01 11:44:28 -06:00
parent 77c92ff0aa
commit 05bc57f74e
3 changed files with 118 additions and 1 deletions

View File

@ -47,7 +47,7 @@ test "stack version check" {
pub fn build(b: *std.build.Builder) !void { pub fn build(b: *std.build.Builder) !void {
const assets = std.build.Pkg{ const assets = std.build.Pkg{
.name = "assets", .name = "assets",
.path = .{ .path = "assets/assets.zig" }, .source = .{ .path = "assets/assets.zig" },
}; };
const zig_version = @import("builtin").zig_version; const zig_version = @import("builtin").zig_version;

92
flake.lock Normal file
View File

@ -0,0 +1,92 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1659254610,
"narHash": "sha256-ee5W5MLWZ3kdx5hwOUs6trOJit+GeTDfG+Lg3rANKoc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "67f49b2a3854e8b5e3f9df4422225daa0985f451",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1631288242,
"narHash": "sha256-sXm4KiKs7qSIf5oTAmrlsEvBW193sFj+tKYVirBaXz0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0e24c87754430cb6ad2f8c8c8021b29834a8845e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"zig": "zig"
}
},
"zig": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1659315496,
"narHash": "sha256-d2UFb31bF2hJrJ4Rp0JCDK1hCuw0Em08OR1cbLbmkNA=",
"owner": "arqv",
"repo": "zig-overlay",
"rev": "b991fe45280c45695c81b0cc6824e3c532a2ec56",
"type": "github"
},
"original": {
"owner": "arqv",
"repo": "zig-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix Normal file
View File

@ -0,0 +1,25 @@
{
description = "A very basic flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
zig.url = "github:arqv/zig-overlay";
};
outputs = { self, nixpkgs, zig, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# nix develop
devShells.default = pkgs.mkShell {
buildInputs = [
zig.packages.${system}.master.latest
pkgs.butler
];
};
});
}