mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-27 22:44:56 +00:00

$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \ -e 's!with lib.maintainers; \[ *\];![ ];!' \ -e 's!with maintainers; \[ *\];![ ];!'
36 lines
865 B
Nix
36 lines
865 B
Nix
{ lib, stdenv, fetchFromGitHub, python3, mpv }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "ff2mpv";
|
|
version = "5.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "woodruffw";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-Xx18EX/MxLrnwZGwMFZJxJURUpjU2P01CQue5XbZ3fw=";
|
|
};
|
|
|
|
buildInputs = [ python3 mpv ];
|
|
|
|
postPatch = ''
|
|
patchShebangs .
|
|
substituteInPlace ff2mpv.json \
|
|
--replace '/home/william/scripts/ff2mpv' "$out/bin/ff2mpv.py"
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/lib/mozilla/native-messaging-hosts
|
|
cp ff2mpv.py $out/bin
|
|
cp ff2mpv.json $out/lib/mozilla/native-messaging-hosts
|
|
'';
|
|
|
|
meta = {
|
|
description = "Native Messaging Host for ff2mpv firefox addon";
|
|
homepage = "https://github.com/woodruffw/ff2mpv";
|
|
license = lib.licenses.mit;
|
|
maintainers = [ ];
|
|
mainProgram = "ff2mpv.py";
|
|
};
|
|
}
|