nixpkgs/pkgs/by-name/bu/bukubrow/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, rustPlatform, fetchFromGitHub, sqlite }: let
2018-07-30 21:02:19 +00:00
2019-07-27 18:45:46 +00:00
manifest = {
description = "Bukubrow extension host application";
name = "com.samhh.bukubrow";
path = "@out@/bin/bukubrow";
type = "stdio";
};
in rustPlatform.buildRustPackage rec {
pname = "bukubrow-host";
2022-08-14 06:47:45 +00:00
version = "5.4.0";
2018-07-30 21:02:19 +00:00
src = fetchFromGitHub {
owner = "SamHH";
2019-07-27 18:45:46 +00:00
repo = pname;
rev = "v${version}";
2022-08-14 06:47:45 +00:00
sha256 = "sha256-xz5Agsm+ATQXXgpPGN4EQ00i1t8qUlrviNHauVdCu4U=";
2018-07-30 21:02:19 +00:00
};
cargoHash = "sha256-mH76ODPKlKDEK9ckThPnL5Ar7p1l1gNd7zXfesLZlBM=";
2018-07-30 21:02:19 +00:00
buildInputs = [ sqlite ];
2019-07-27 18:45:46 +00:00
passAsFile = [ "firefoxManifest" "chromeManifest" ];
firefoxManifest = builtins.toJSON (manifest // {
allowed_extensions = [ "bukubrow@samhh.com" ];
});
chromeManifest = builtins.toJSON (manifest // {
allowed_origins = [ "chrome-extension://ghniladkapjacfajiooekgkfopkjblpn/" ];
});
postBuild = ''
substituteAll $firefoxManifestPath firefox.json
substituteAll $chromeManifestPath chrome.json
'';
2018-07-30 21:02:19 +00:00
postInstall = ''
2019-07-27 18:45:46 +00:00
install -Dm0644 firefox.json $out/lib/mozilla/native-messaging-hosts/com.samhh.bukubrow.json
install -Dm0644 chrome.json $out/etc/chromium/native-messaging-hosts/com.samhh.bukubrow.json
2018-07-30 21:02:19 +00:00
'';
meta = with lib; {
description = "WebExtension for Buku, a command-line bookmark manager";
homepage = "https://github.com/SamHH/bukubrow-host";
2018-07-30 21:02:19 +00:00
license = licenses.gpl3;
maintainers = [ ];
2024-02-11 02:19:15 +00:00
mainProgram = "bukubrow";
2018-07-30 21:02:19 +00:00
};
}