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 = "sha256-xz5Agsm+ATQXXgpPGN4EQ00i1t8qUlrviNHauVdCu4U=";
21 cargoSha256 = "sha256-mH76ODPKlKDEK9ckThPnL5Ar7p1l1gNd7zXfesLZlBM=";
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;
46 mainProgram = "bukubrow";