forked from mirrors/nixpkgs
Merge pull request #65489 from arcnmx/pr-bukubrow-update
bukubrow: 2.4.0 -> 5.0.0
This commit is contained in:
commit
6128371279
|
@ -1,34 +1,46 @@
|
||||||
{ stdenv, rustPlatform, fetchFromGitHub, sqlite }:
|
{ stdenv, rustPlatform, fetchFromGitHub, sqlite }: let
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
manifest = {
|
||||||
pname = "bukubrow";
|
description = "Bukubrow extension host application";
|
||||||
version = "2.4.0";
|
name = "com.samhh.bukubrow";
|
||||||
|
path = "@out@/bin/bukubrow";
|
||||||
|
type = "stdio";
|
||||||
|
};
|
||||||
|
|
||||||
|
in rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "bukubrow-host";
|
||||||
|
version = "5.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "SamHH";
|
owner = "SamHH";
|
||||||
repo = "bukubrow";
|
repo = pname;
|
||||||
rev = version;
|
rev = "v${version}";
|
||||||
sha256 = "1wrwav7am73bmgbpwh1pi0b8k7vhydqvw91hmmhnvbjhrhbns7s5";
|
sha256 = "1a3gqxj6d1shv3w0v9m8x2xr0bvcynchy778yqalxkc3x4vr0nbn";
|
||||||
};
|
};
|
||||||
sourceRoot = "source/binary";
|
|
||||||
|
|
||||||
cargoSha256 = "0553awiba24a3a8xwjhlwf8yzbs44lnirjvcxnvsgah7dc44r0gj";
|
cargoSha256 = "06nh99cvg3y4f98fs0j5bkidzq6fg46wk47z5jfzz5lf72ha54lk";
|
||||||
|
|
||||||
buildInputs = [ sqlite ];
|
buildInputs = [ sqlite ];
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/etc $out/lib/mozilla/native-messaging-hosts
|
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
|
||||||
host_file="$out/bin/bukubrow"
|
|
||||||
sed -e "s!%%replace%%!$host_file!" browser-hosts/firefox.json > "$out/etc/firefox-host.json"
|
|
||||||
sed -e "s!%%replace%%!$host_file!" browser-hosts/chrome.json > "$out/etc/chrome-host.json"
|
|
||||||
|
|
||||||
ln -s $out/etc/firefox-host.json $out/lib/mozilla/native-messaging-hosts/com.samhh.bukubrow.json
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Bukubrow is a WebExtension for Buku, a command-line bookmark manager";
|
description = "Bukubrow is a WebExtension for Buku, a command-line bookmark manager";
|
||||||
homepage = https://github.com/SamHH/bukubrow;
|
homepage = https://github.com/SamHH/bukubrow-host;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with maintainers; [ infinisil ];
|
maintainers = with maintainers; [ infinisil ];
|
||||||
|
|
Loading…
Reference in a new issue