nix-config/pkgs/ff2mpv-go/default.nix
Bruno BELANYI cd02cbff45
All checks were successful
continuous-integration/drone/push Build is passing
pkgs: use 'lib' as first input
This is the idiomatic style in nixpkgs.
2021-06-16 20:13:25 +02:00

31 lines
795 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}";
sha256 = "sha256-e/AuOA3isFTyBf97Zwtr16yo49UdYzvktV5PKB/eH/s=";
};
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
postPatch = ''
sed -i -e 's,"mpv","${mpv}/bin/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;
};
}