zluda: 3 -> 4-unstable-2025-01-28 (#383757)

This commit is contained in:
Sandro
2025-02-27 22:21:22 +01:00
committed by GitHub
2 changed files with 7 additions and 2440 deletions
-2423
View File
File diff suppressed because it is too large Load Diff
+7 -17
View File
@@ -16,13 +16,14 @@
rustPlatform.buildRustPackage rec {
pname = "zluda";
version = "3";
version = "4-unstable-2025-01-28";
src = fetchFromGitHub {
owner = "vosen";
repo = "ZLUDA";
rev = "v${version}";
hash = "sha256-lykM18Ml1eeLMj/y6uPk34QOeh7Y59i1Y0Nr118Manw=";
# Cargo.lock introduced and major bug fixes in this commit
rev = "df5a96d935b014f88e30af4abc487882b0b54a76";
hash = "sha256-T2pCZZzZbCLI01YSF0VguKtL3EDEdIoUyH4C9ccaCi8=";
fetchSubmodules = true;
};
@@ -49,24 +50,13 @@ rustPlatform.buildRustPackage rec {
clang
];
cargoLock.lockFile = ./Cargo.lock;
useFetchCargoVendor = true;
cargoHash = "sha256-hDQWjzkx7YdkgSmNKTzCa2VhBFvn6P9QANV9hJ7UiT8=";
# xtask doesn't support passing --target, but nix hooks expect the folder structure from when it's set
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.cargoShortTarget;
# vergen panics if the .git directory isn't present
# Disable vergen and manually set env
postPatch = ''
substituteInPlace zluda/build.rs \
--replace-fail 'vergen(Config::default())' 'Some(())'
# ZLUDA repository missing Cargo.lock: vosen/ZLUDA#43
ln -s ${./Cargo.lock} Cargo.lock
'';
env.VERGEN_GIT_SHA = src.rev;
preConfigure = ''
# Comment out zluda_blaslt in Cargo.toml until hipBLASLt package is added: https://github.com/NixOS/nixpkgs/issues/197885#issuecomment-2046178008
sed -i '/zluda_blaslt/d' Cargo.toml
# disable test written for windows only: https://github.com/vosen/ZLUDA/blob/774f4bcb37c39f876caf80ae0d39420fa4bc1c8b/zluda_inject/tests/inject.rs#L55
rm zluda_inject/tests/inject.rs
'';
@@ -84,7 +74,7 @@ rustPlatform.buildRustPackage rec {
'';
meta = {
description = "ZLUDA - CUDA on Intel GPUs";
description = "ZLUDA - CUDA on non-Nvidia GPUs";
homepage = "https://github.com/vosen/ZLUDA";
changelog = "https://github.com/vosen/ZLUDA/releases/tag/${src.rev}";
license = lib.licenses.mit;