diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-05-12 21:47:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-12 21:47:00 +0200 |
commit | fe5bfe5593d462d9b4e2a2b887ec76952c7917ee (patch) | |
tree | 9743333f9c56951ae487a864c9c77519a6225a03 /pkgs/by-name/ff | |
parent | 5c55653b86709dcf0d28404a1f48a72bc9612baa (diff) | |
parent | a149965e947989718c8dd0694b373c15c6903fda (diff) |
Merge pull request #288973 from ryze312/ff2mpv-rust-update
ff2mpv-rust: 1.1.1 -> 1.1.3 + support for Chromium based browsers
Diffstat (limited to 'pkgs/by-name/ff')
-rw-r--r-- | pkgs/by-name/ff/ff2mpv-rust/Cargo.lock | 112 | ||||
-rw-r--r-- | pkgs/by-name/ff/ff2mpv-rust/package.nix | 48 |
2 files changed, 36 insertions, 124 deletions
diff --git a/pkgs/by-name/ff/ff2mpv-rust/Cargo.lock b/pkgs/by-name/ff/ff2mpv-rust/Cargo.lock deleted file mode 100644 index 0142037d22090..0000000000000 --- a/pkgs/by-name/ff/ff2mpv-rust/Cargo.lock +++ /dev/null @@ -1,112 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "ff2mpv-rust" -version = "1.1.0" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "indexmap" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "serde" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" diff --git a/pkgs/by-name/ff/ff2mpv-rust/package.nix b/pkgs/by-name/ff/ff2mpv-rust/package.nix index bbc7f303f1d39..8114704b982ce 100644 --- a/pkgs/by-name/ff/ff2mpv-rust/package.nix +++ b/pkgs/by-name/ff/ff2mpv-rust/package.nix @@ -3,35 +3,59 @@ , fetchFromGitHub }: +let + firefoxPaths = [ + "lib/mozilla/native-messaging-hosts" + + # wrapFirefox only links lib/mozilla path, so this is ineffective + # Still the above path works, despite documentation stating otherwise + # See: https://librewolf.net/docs/faq/#how-do-i-get-native-messaging-to-work + # "lib/librewolf/native-messaging-hosts" + ]; + + chromiumPaths = [ + "etc/chromium/native-messaging-hosts" + "etc/opt/vivaldi/native-messaging-hosts" + "etc/opt/chrome/native-messaging-hosts" + "etc/opt/edge/native-messaging-hosts" + ]; +in + rustPlatform.buildRustPackage rec { pname = "ff2mpv-rust"; - version = "1.1.1"; + version = "1.1.3"; src = fetchFromGitHub { owner = "ryze312"; repo = "ff2mpv-rust"; rev = version; - hash = "sha256-sofv5uRLNbMT+w+ZDGjtKqBjYJk+UDzUDQrOiWvl5Hs="; - }; - - cargoLock = { - lockFile = ./Cargo.lock; + hash = "sha256-gk3MqoMCau6RTlttTLqFtlXhrYMOf89YFg8aAlh++9s="; }; - postPatch = '' - ln -s ${./Cargo.lock} Cargo.lock - ''; + cargoHash = "sha256-NjzqzfueqR1MNR23lRYj7IYIa+OHzVhpuAo18avKMUk="; postInstall = '' - mkdir -p $out/lib/mozilla/native-messaging-hosts/ - $out/bin/ff2mpv-rust manifest > $out/lib/mozilla/native-messaging-hosts/ff2mpv.json + $out/bin/ff2mpv-rust manifest > manifest.json + $out/bin/ff2mpv-rust manifest_chromium > manifest_chromium.json + + for path in ${toString firefoxPaths} + do + mkdir -p "$out/$path" + cp manifest.json "$out/$path/ff2mpv.json" + done + + for path in ${toString chromiumPaths} + do + mkdir -p "$out/$path" + cp manifest_chromium.json "$out/$path/ff2mpv.json" + done ''; 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 ]; + maintainers = with maintainers; [ arthsmn ryze ]; mainProgram = "ff2mpv-rust"; }; } |