lovely-injector: fix build
Fixed hashes to build version 0.7.1 instead of 0.6.0 Added versionCheckHook to verify that the correct version is being built
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
lib,
|
||||
versionCheckHook,
|
||||
writeShellScript,
|
||||
lua,
|
||||
}:
|
||||
let
|
||||
version = "0.7.1";
|
||||
@@ -13,14 +16,26 @@ rustPlatform.buildRustPackage {
|
||||
owner = "ethangreen-dev";
|
||||
repo = "lovely-injector";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-fzkuuu6pmvqeJa7qlX8jhtCLC4oYRLUm1hqHTRiYEX8=";
|
||||
hash = "sha256-j03/DOnLFfFYTwGGh+7BalS779jyg+p0UqtcTTyHgv4=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-Mkmj+ENdUge1V1cVAQOV2K01sYKEyhxTse0f5o6H6Xc=";
|
||||
cargoHash = "sha256-hHq26kSKcqEldxUb6bn1laTpKGFplP9/2uogsal8T5A=";
|
||||
# no tests
|
||||
doCheck = false;
|
||||
# lovely-injector depends on nightly rust features
|
||||
env.RUSTC_BOOTSTRAP = 1;
|
||||
nativeBuildInputs = [
|
||||
lua
|
||||
];
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
doInstallCheck = true;
|
||||
versionCheckProgramArg = [ "${placeholder "out"}" ];
|
||||
versionCheckProgram = writeShellScript "lovely-version-check" ''
|
||||
export LD_PRELOAD="$1/lib/liblovely.so"
|
||||
exec ${lua}/bin/lua < /dev/null
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Runtime lua injector for games built with LÖVE";
|
||||
|
||||
Reference in New Issue
Block a user