2021-04-20 22:08:20 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, yabridge
|
|
|
|
, makeWrapper
|
|
|
|
, wine
|
|
|
|
}:
|
2021-01-09 08:15:57 +01:00
|
|
|
|
2022-08-03 03:46:47 +02:00
|
|
|
rustPlatform.buildRustPackage {
|
2021-01-09 08:15:57 +01:00
|
|
|
pname = "yabridgectl";
|
|
|
|
version = yabridge.version;
|
|
|
|
|
|
|
|
src = yabridge.src;
|
2023-07-25 15:27:31 +02:00
|
|
|
sourceRoot = "${yabridge.src.name}/tools/yabridgectl";
|
2023-03-26 00:16:46 +01:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"reflink-0.1.3" = "sha256-1o5d/mepjbDLuoZ2/49Bi6sFgVX4WdCuhGJkk8ulhcI=";
|
|
|
|
};
|
|
|
|
};
|
2021-01-09 08:15:57 +01:00
|
|
|
|
|
|
|
patches = [
|
2022-07-06 15:56:07 +02:00
|
|
|
# Patch yabridgectl to search for the chainloader through NIX_PROFILES
|
|
|
|
./chainloader-from-nix-profiles.patch
|
|
|
|
|
|
|
|
# Dependencies are hardcoded in yabridge, so the check is unnecessary and likely incorrect
|
|
|
|
./remove-dependency-verification.patch
|
2021-01-09 08:15:57 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = [ "-p3" ];
|
|
|
|
|
2021-04-20 22:08:20 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram "$out/bin/yabridgectl" \
|
2022-07-06 15:56:07 +02:00
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
|
|
|
wine # winedump
|
|
|
|
]}
|
2021-04-20 22:08:20 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-09 08:15:57 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A small, optional utility to help set up and update yabridge for several directories at once";
|
2022-08-03 03:46:47 +02:00
|
|
|
homepage = "${yabridge.src.meta.homepage}/tree/${yabridge.version}/tools/yabridgectl";
|
2021-01-09 08:15:57 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2021-05-22 16:47:40 +02:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2021-06-07 00:10:27 +02:00
|
|
|
platforms = yabridge.meta.platforms;
|
2021-01-09 08:15:57 +01:00
|
|
|
};
|
|
|
|
}
|