Merge pull request #266098 from ambroisie/add-ff2mpv-go

ff2mpv-go: init at 1.0.1
This commit is contained in:
Peder Bergebakken Sundt 2023-12-10 03:38:43 +01:00 committed by GitHub
commit 5534b7997f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";
};
}