update dependencies and lock with nix

This commit is contained in:
2025-08-27 13:17:53 +02:00
parent 4f41150b4c
commit 4cf8cfcfc4
4 changed files with 577 additions and 368 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

829
Cargo.lock generated

File diff suppressed because it is too large Load Diff

61
flake.lock generated Normal file
View File

@@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1756125398,
"narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

54
flake.nix Normal file
View File

@@ -0,0 +1,54 @@
{
description = "Rust dev shell for building project with fontconfig and OpenGL support on nixos";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
nativeBuildInputs = with pkgs; [
git
pkg-config
fontconfig
freetype
rustc
cmake
gnumake
gcc
cargo
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libX11
xorg.libxcb
libxkbcommon
libGL
libGLU
mesa
wayland
libglibutil
];
fontconfigPcPath = "${pkgs.fontconfig.dev}/lib/pkgconfig";
in {
devShells.default = pkgs.mkShell {
name = "rust-fontconfig-shell";
packages = nativeBuildInputs;
shellHook = ''
export PKG_CONFIG_PATH=${fontconfigPcPath}:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath nativeBuildInputs}:$LD_LIBRARY_PATH
echo "PKG_CONFIG_PATH set to: ${fontconfigPcPath}"
echo "LD_LIBRARY_PATH set for runtime OpenGL/GUI deps"
'';
};
});
}