1
0
Fork 0
forked from wry/wry

nix: init basic nix flake with dev shell

This commit is contained in:
kossLAN 2026-04-04 21:14:45 -04:00
parent 4e6e891d9b
commit 15757b248f
No known key found for this signature in database
2 changed files with 79 additions and 0 deletions

26
flake.lock generated Normal file
View file

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1775350496,
"narHash": "sha256-uuw97G2Qm6C7rdrkq4zBzwLo0oA35flYijyMy65w/8c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9341c707a0f78d80c73e1b403d98d728eda607ac",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

53
flake.nix Normal file
View file

@ -0,0 +1,53 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs =
{
self,
nixpkgs,
}:
let
forEachSystem =
fn:
nixpkgs.lib.genAttrs nixpkgs.lib.platforms.linux (
system: fn system (nixpkgs.legacyPackages.${system})
);
in
{
devShells = forEachSystem (
system: pkgs: {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo
rustc
pkgconf
];
buildInputs = with pkgs; [
libGL
xkeyboard_config
libgbm
pango
udev
libinput
shaderc
libglvnd
vulkan-loader
];
SHADERC_LIB_DIR = "${pkgs.lib.getLib pkgs.shaderc}/lib";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (
with pkgs;
[
libglvnd
vulkan-loader
]
);
};
}
);
};
}