add zig overlay

Unfortunately, this is not working because of an issue with graphical
dependencies.
This commit is contained in:
Fabien Freling 2023-10-13 15:48:51 +02:00
parent 847a11d293
commit 3216292d08
2 changed files with 119 additions and 21 deletions

View file

@ -1,15 +1,31 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1693611461, "lastModified": 1696343447,
"narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=", "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca", "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -18,28 +34,45 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1695806987, "lastModified": 1696983906,
"narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=", "narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57", "rev": "bd1cde45c77891214131cbbea5b1203e485a9d51",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "nixos",
"type": "indirect" "ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
"lastModified": 1693471703, "lastModified": 1696019113,
"narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=", "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85", "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -50,10 +83,64 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1697009197,
"narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1689088367,
"narHash": "sha256-Y2tl2TlKCWEHrOeM9ivjCLlRAKH3qoPUE/emhZECU14=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5c9ddb86679c400d6b7360797b8a22167c2053f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"zig-overlay": "zig-overlay"
}
},
"zig-overlay": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1697198920,
"narHash": "sha256-dtaoksNoOMC3H+FDF3cK+bP+jYvJokYBAFvzCALLDYk=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "2d779a7657e346323ab048b218994dbdc42655d7",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
} }
} }
}, },

View file

@ -2,8 +2,9 @@
description = "FabApp"; description = "FabApp";
inputs = { inputs = {
# take unstable if not specified nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
# nixpkgs.url = "github:nixos/nixpkgs/release-23.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
zig-overlay.url = "github:mitchellh/zig-overlay";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
}; };
@ -17,11 +18,18 @@
# https://flake.parts/module-arguments.html#persystem-module-parameters # https://flake.parts/module-arguments.html#persystem-module-parameters
perSystem = { pkgs, system, ... }: { perSystem = { pkgs, system, ... }: {
_module.args.pkgs = import nixpkgs { # We need unstable for Zig
_module.args.pkgs = import inputs.nixpkgs-unstable {
inherit system; inherit system;
# config.allowUnfree = true; # https://flake.parts/overlays
overlays = [
inputs.zig-overlay.overlays.default
];
config = { };
}; };
formatter = pkgs.nixfmt;
devShells.default = with pkgs; devShells.default = with pkgs;
mkShell { mkShell {
buildInputs = [ buildInputs = [
@ -29,20 +37,23 @@
# Zig / webAssembly impl. # Zig / webAssembly impl.
zig zig
# zigpkgs."master" # Issue with X11/GL libraries
zls zls
emscripten emscripten
# Tools
nixfmt
# Linux graphical deps # Linux graphical deps
xorg.libX11 xorg.libX11
libGL libGL
# xorg.libXcursor
# xorg.libXi
# xorg.libXext
# xorg.libXrandr
# xorg.libXinerama
# libGLU
]; ];
}; };
formatter = pkgs.nixfmt;
}; };
}; };
} }