mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 00:48:12 +08:00
Reduce Nix flake maintanace by eliminating need for cargoHash bumps (#3292)
* prepare nix for hashless cargo builds, update rust-gpu to non-orphaned commit * match commit hashes to repos, update packages to make nix flake build properly * add nix build dir to gitignore * Add npm TODO to flake.nix * Update Cargo.lock * Update TODO comment
This commit is contained in:
+13
-7
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
toolchainPkg = pkgs.rust-bin.nightly."2025-06-23".default.override {
|
||||
extensions = [ "rust-src" "rust-analyzer" "clippy" "cargo" "rustc-dev" "llvm-tools" ];
|
||||
extensions =
|
||||
[ "rust-src" "rust-analyzer" "clippy" "cargo" "rustc-dev" "llvm-tools" ];
|
||||
};
|
||||
toolchainRustPlatform = pkgs.makeRustPlatform {
|
||||
cargo = toolchainPkg;
|
||||
@@ -12,13 +13,18 @@ let
|
||||
pname = "rustc_codegen_spirv";
|
||||
version = "0-unstable-2025-08-04";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "Rust-GPU";
|
||||
repo = "rust-gpu";
|
||||
owner = "Firestar99";
|
||||
repo = "rust-gpu-new";
|
||||
rev = "c12f216121820580731440ee79ebc7403d6ea04f";
|
||||
hash = "sha256-rG1cZvOV0vYb1dETOzzbJ0asYdE039UZImobXZfKIno=";
|
||||
};
|
||||
cargoHash = "sha256-AEigcEc5wiBd3zLqWN/2HSbkfOVFneAqNvg9HsouZf4=";
|
||||
cargoBuildFlags = [ "-p" "rustc_codegen_spirv" "--features=use-compiled-tools" "--no-default-features" ];
|
||||
cargoBuildFlags = [
|
||||
"-p"
|
||||
"rustc_codegen_spirv"
|
||||
"--features=use-compiled-tools"
|
||||
"--no-default-features"
|
||||
];
|
||||
doCheck = false;
|
||||
});
|
||||
cargoWrapper = pkgs.writeShellScriptBin "cargo" ''
|
||||
@@ -34,8 +40,8 @@ let
|
||||
|
||||
exec ${toolchainPkg}/bin/cargo ${"\${filtered_args[@]}"}
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
RUST_GPU_PATH_OVERRIDE = "${cargoWrapper}/bin:${toolchainPkg}/bin";
|
||||
RUSTC_CODEGEN_SPIRV_PATH = "${rustc_codegen_spirv}/lib/librustc_codegen_spirv.so";
|
||||
RUSTC_CODEGEN_SPIRV_PATH =
|
||||
"${rustc_codegen_spirv}/lib/librustc_codegen_spirv.so";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user