git.iko.soy/typeable/nixpkgs
on master help sign in
bukubrow: 2.4.0 -> 5.0.0
commitc33a44a88596df9c8a6f8a9c400b45005c9a199e authorarcnmx <arcnmx@users.noreply.github.com> dateSat 27 Jul 2019, 11:45 (7 years ago) parent98d9589
1 file changed+29−17
pkgs/tools/networking/bukubrow/default.nix+29−17
pkgs/tools/networking/bukubrow/default.nix+29−17
@@ -1,34 +1,46 @@
1−{ stdenv, rustPlatform, fetchFromGitHub, sqlite }:
1+{ stdenv, rustPlatform, fetchFromGitHub, sqlite }: let
22
3−rustPlatform.buildRustPackage rec {
4− pname = "bukubrow";
5− version = "2.4.0";
3+manifest = {
4+ description = "Bukubrow extension host application";
5+ name = "com.samhh.bukubrow";
6+ path = "@out@/bin/bukubrow";
7+ type = "stdio";
8+};
9+
10+in rustPlatform.buildRustPackage rec {
11+ pname = "bukubrow-host";
12+ version = "5.0.0";
613
714 src = fetchFromGitHub {
815 owner = "SamHH";
9− repo = "bukubrow";
10− rev = version;
11− sha256 = "1wrwav7am73bmgbpwh1pi0b8k7vhydqvw91hmmhnvbjhrhbns7s5";
16+ repo = pname;
17+ rev = "v${version}";
18+ sha256 = "1a3gqxj6d1shv3w0v9m8x2xr0bvcynchy778yqalxkc3x4vr0nbn";
1219 };
13− sourceRoot = "source/binary";
1420
15− cargoSha256 = "0553awiba24a3a8xwjhlwf8yzbs44lnirjvcxnvsgah7dc44r0gj";
21+ cargoSha256 = "06nh99cvg3y4f98fs0j5bkidzq6fg46wk47z5jfzz5lf72ha54lk";
1622
1723 buildInputs = [ sqlite ];
1824
25+ passAsFile = [ "firefoxManifest" "chromeManifest" ];
26+ firefoxManifest = builtins.toJSON (manifest // {
27+ allowed_extensions = [ "bukubrow@samhh.com" ];
28+ });
29+ chromeManifest = builtins.toJSON (manifest // {
30+ allowed_origins = [ "chrome-extension://ghniladkapjacfajiooekgkfopkjblpn/" ];
31+ });
32+ postBuild = ''
33+ substituteAll $firefoxManifestPath firefox.json
34+ substituteAll $chromeManifestPath chrome.json
35+ '';
1936 postInstall = ''
20− mkdir -p $out/etc $out/lib/mozilla/native-messaging-hosts
21−
22− host_file="$out/bin/bukubrow"
23− sed -e "s!%%replace%%!$host_file!" browser-hosts/firefox.json > "$out/etc/firefox-host.json"
24− sed -e "s!%%replace%%!$host_file!" browser-hosts/chrome.json > "$out/etc/chrome-host.json"
25−
26− ln -s $out/etc/firefox-host.json $out/lib/mozilla/native-messaging-hosts/com.samhh.bukubrow.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
2739 '';
2840
2941 meta = with stdenv.lib; {
3042 description = "Bukubrow is a WebExtension for Buku, a command-line bookmark manager";
31− homepage = https://github.com/SamHH/bukubrow;
43+ homepage = https://github.com/SamHH/bukubrow-host;
3244 license = licenses.gpl3;
3345 platforms = platforms.all;
3446 maintainers = with maintainers; [ infinisil ];