From a91d3a04d84d6462775c4b63f7e26060542e5891 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 7 Nov 2023 17:16:06 +0000 Subject: [PATCH] ff2mpv-go: init at 1.0.1 --- pkgs/by-name/ff/ff2mpv-go/package.nix | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pkgs/by-name/ff/ff2mpv-go/package.nix diff --git a/pkgs/by-name/ff/ff2mpv-go/package.nix b/pkgs/by-name/ff/ff2mpv-go/package.nix new file mode 100644 index 000000000000..71e0f98a478d --- /dev/null +++ b/pkgs/by-name/ff/ff2mpv-go/package.nix @@ -0,0 +1,34 @@ +{ 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 = '' + substituteInPlace ff2mpv.go --replace '"mpv"' '"${lib.getExe mpv}"' + ''; + + 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; + maintainers = with maintainers; [ ambroisie ]; + mainProgram = "ff2mpv-go"; + }; +}