nix-config/pkgs/ff2mpv-go/default.nix

32 lines
776 B
Nix
Raw Permalink Normal View History

{ lib, buildGoModule, fetchgit, mpv }:
2021-05-11 18:46:43 +02:00
buildGoModule rec {
pname = "ff2mpv-go";
version = "1.0.1";
src = fetchgit {
url = "https://git.clsr.net/util/ff2mpv-go/";
rev = "v${version}";
2023-04-01 17:33:26 +02:00
hash = "sha256-e/AuOA3isFTyBf97Zwtr16yo49UdYzvktV5PKB/eH/s=";
2021-05-11 18:46:43 +02:00
};
2023-03-07 13:34:07 +01:00
vendorHash = null;
2021-05-11 18:46:43 +02:00
postPatch = ''
sed -i -e 's,"mpv","${lib.getExe mpv}",' ff2mpv.go
2021-05-11 18:46:43 +02:00
'';
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";
2021-05-11 18:46:43 +02:00
};
}