2021-04-20 20:08:20 +00: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";
|
2021-04-17 15:46:53 +00:00
|
|
|
cargoHash = "sha256-TcjFaDo5IUs6Z3tgb+6jqyyrB2BLcif6Ycw++5FzuDY=";
|
2021-01-09 07:15:57 +00:00
|
|
|
|
|
|
|
patches = [
|
2021-02-26 16:03:54 +00:00
|
|
|
# By default, yabridgectl locates libyabridge.so by using
|
2021-03-10 14:14:11 +00:00
|
|
|
# hard coded distro specific lib paths. This patch replaces those
|
|
|
|
# hard coded paths with lib paths from NIX_PROFILES.
|
2021-01-09 07:15:57 +00:00
|
|
|
./libyabridge-from-nix-profiles.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = [ "-p3" ];
|
|
|
|
|
2021-04-20 20:08:20 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram "$out/bin/yabridgectl" \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ wine ]}
|
|
|
|
'';
|
|
|
|
|
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";
|
|
|
|
homepage = "https://github.com/robbert-vdh/yabridge/tree/master/tools/yabridgectl";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ metadark ];
|
|
|
|
};
|
|
|
|
}
|