Bruno BELANYI
405965dc72
Since upstream has decided to deprecate the implied value when using `lib.getExe` (see [1]), we should set it explicitly. [1]: https://github.com/NixOS/nixpkgs/pull/246386
32 lines
776 B
Nix
32 lines
776 B
Nix
{ lib, buildGoModule, fetchgit, 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=";
|
|
};
|
|
|
|
vendorHash = null;
|
|
|
|
postPatch = ''
|
|
sed -i -e 's,"mpv","${lib.getExe mpv}",' ff2mpv.go
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p "$out/lib/mozilla/native-messaging-hosts"
|
|
$out/bin/ff2mpv-go --manifest > "$out/lib/mozilla/native-messaging-hosts/ff2mpv.json"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = ''
|
|
Native messaging host for ff2mpv written in Go.
|
|
'';
|
|
homepage = "https://git.clsr.net/util/ff2mpv-go/";
|
|
license = licenses.publicDomain;
|
|
mainProgram = "ff2mpv-go";
|
|
};
|
|
}
|