depot/third_party/nixpkgs/pkgs/by-name/ff/ff2mpv-rust/package.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

37 lines
842 B
Nix

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