1{
2 lib,
3 rustPlatform,
4 yabridge,
5 makeWrapper,
6 wine,
7}:
8
9rustPlatform.buildRustPackage {
10 pname = "yabridgectl";
11 version = yabridge.version;
12
13 src = yabridge.src;
14 sourceRoot = "${yabridge.src.name}/tools/yabridgectl";
15
16 cargoHash = "sha256-VcBQxKjjs9ESJrE4F1kxEp4ah3j9jiNPq/Kdz/qPvro=";
17
18 patches = [
19 # Patch yabridgectl to search for the chainloader through NIX_PROFILES
20 ./chainloader-from-nix-profiles.patch
21
22 # Dependencies are hardcoded in yabridge, so the check is unnecessary and likely incorrect
23 ./remove-dependency-verification.patch
24 ];
25
26 patchFlags = [ "-p3" ];
27
28 nativeBuildInputs = [ makeWrapper ];
29
30 postFixup = ''
31 wrapProgram "$out/bin/yabridgectl" \
32 --prefix PATH : ${
33 lib.makeBinPath [
34 wine # winedump
35 ]
36 }
37 '';
38
39 meta = with lib; {
40 description = "Small, optional utility to help set up and update yabridge for several directories at once";
41 homepage = "${yabridge.src.meta.homepage}/tree/${yabridge.version}/tools/yabridgectl";
42 changelog = yabridge.meta.changelog;
43 license = licenses.gpl3Plus;
44 maintainers = with maintainers; [ kira-bruneau ];
45 platforms = yabridge.meta.platforms;
46 mainProgram = "yabridgectl";
47 };
48}