2021-04-20 21:08:20 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, yabridge
|
|
|
|
, makeWrapper
|
|
|
|
, wine
|
|
|
|
}:
|
2021-01-09 07:15:57 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "yabridgectl";
|
|
|
|
version = yabridge.version;
|
|
|
|
|
|
|
|
src = yabridge.src;
|
|
|
|
sourceRoot = "source/tools/yabridgectl";
|
2022-07-11 16:43:35 +01:00
|
|
|
cargoSha256 = "sha256-09GsrQAI08Qih/TpbEAh4hn7IfvwyFdEoyzsSjcjGXY=";
|
2021-01-09 07:15:57 +00:00
|
|
|
|
|
|
|
patches = [
|
2022-07-06 14:56:07 +01: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 07:15:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = [ "-p3" ];
|
|
|
|
|
2021-04-20 21:08:20 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram "$out/bin/yabridgectl" \
|
2022-07-06 14:56:07 +01:00
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
|
|
|
wine # winedump
|
|
|
|
]}
|
2021-04-20 21:08:20 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-09 07:15:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A small, optional utility to help set up and update yabridge for several directories at once";
|
2022-07-06 14:56:07 +01:00
|
|
|
homepage = "${src.meta.homepage}/tree/${version}/tools/yabridgectl";
|
2021-01-09 07:15:57 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-05-22 15:47:40 +01:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2021-06-06 23:10:27 +01:00
|
|
|
platforms = yabridge.meta.platforms;
|
2021-01-09 07:15:57 +00:00
|
|
|
};
|
|
|
|
}
|