1 { lib, rustPlatform, fetchFromGitHub, sqlite }: let
4 description = "Bukubrow extension host application";
5 name = "com.samhh.bukubrow";
6 path = "@out@/bin/bukubrow";
10 in rustPlatform.buildRustPackage rec {
11 pname = "bukubrow-host";
14 src = fetchFromGitHub {
18 sha256 = "1a3gqxj6d1shv3w0v9m8x2xr0bvcynchy778yqalxkc3x4vr0nbn";
21 cargoSha256 = "1k6mffcs9g0z5lh8hpflyharx6653cs1f2rjpldab0fc5fjmjfza";
23 buildInputs = [ sqlite ];
25 passAsFile = [ "firefoxManifest" "chromeManifest" ];
26 firefoxManifest = builtins.toJSON (manifest // {
27 allowed_extensions = [ "bukubrow@samhh.com" ];
29 chromeManifest = builtins.toJSON (manifest // {
30 allowed_origins = [ "chrome-extension://ghniladkapjacfajiooekgkfopkjblpn/" ];
33 substituteAll $firefoxManifestPath firefox.json
34 substituteAll $chromeManifestPath chrome.json
37 install -Dm0644 firefox.json $out/lib/mozilla/native-messaging-hosts/com.samhh.bukubrow.json
38 install -Dm0644 chrome.json $out/etc/chromium/native-messaging-hosts/com.samhh.bukubrow.json
42 description = "A WebExtension for Buku, a command-line bookmark manager";
43 homepage = "https://github.com/SamHH/bukubrow-host";
44 license = licenses.gpl3;
45 maintainers = with maintainers; [ infinisil ];