2023-11-07 18:16:06 +01:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchgit
|
2023-12-25 17:53:08 +01:00
|
|
|
, makeWrapper
|
2023-11-07 18:16:06 +01:00
|
|
|
, mpv
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "ff2mpv-go";
|
|
|
|
version = "1.0.1";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.clsr.net/util/ff2mpv-go/";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-e/AuOA3isFTyBf97Zwtr16yo49UdYzvktV5PKB/eH/s=";
|
|
|
|
};
|
|
|
|
|
2023-12-25 17:53:08 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
2023-11-07 18:16:06 +01:00
|
|
|
|
2023-12-25 17:53:08 +01:00
|
|
|
vendorHash = null;
|
2023-11-07 18:16:06 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/lib/mozilla/native-messaging-hosts"
|
|
|
|
$out/bin/ff2mpv-go --manifest > "$out/lib/mozilla/native-messaging-hosts/ff2mpv.json"
|
|
|
|
'';
|
|
|
|
|
2023-12-25 17:53:08 +01:00
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/ff2mpv-go --suffix PATH ":" ${lib.makeBinPath [ mpv ]}
|
|
|
|
'';
|
|
|
|
|
2023-11-07 18:16:06 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Native messaging host for ff2mpv written in Go";
|
|
|
|
homepage = "https://git.clsr.net/util/ff2mpv-go/";
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ ambroisie ];
|
|
|
|
mainProgram = "ff2mpv-go";
|
|
|
|
};
|
|
|
|
}
|