diff options
Diffstat (limited to 'pkgs/by-name/ff/ff2mpv-rust/package.nix')
-rw-r--r-- | pkgs/by-name/ff/ff2mpv-rust/package.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/by-name/ff/ff2mpv-rust/package.nix b/pkgs/by-name/ff/ff2mpv-rust/package.nix new file mode 100644 index 0000000000000..bbc7f303f1d39 --- /dev/null +++ b/pkgs/by-name/ff/ff2mpv-rust/package.nix @@ -0,0 +1,37 @@ +{ lib +, rustPlatform +, fetchFromGitHub +}: + +rustPlatform.buildRustPackage rec { + pname = "ff2mpv-rust"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "ryze312"; + repo = "ff2mpv-rust"; + rev = version; + hash = "sha256-sofv5uRLNbMT+w+ZDGjtKqBjYJk+UDzUDQrOiWvl5Hs="; + }; + + cargoLock = { + lockFile = ./Cargo.lock; + }; + + postPatch = '' + ln -s ${./Cargo.lock} Cargo.lock + ''; + + postInstall = '' + mkdir -p $out/lib/mozilla/native-messaging-hosts/ + $out/bin/ff2mpv-rust manifest > $out/lib/mozilla/native-messaging-hosts/ff2mpv.json + ''; + + meta = with lib; { + description = "Native messaging host for ff2mpv written in Rust"; + homepage = "https://github.com/ryze312/ff2mpv-rust"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ arthsmn ]; + mainProgram = "ff2mpv-rust"; + }; +} |