3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/bukubrow/default.nix
Daniël de Kok 85f96822a0 treewide: fix cargoSha256/cargoHash
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.

This change updates cargoSha256/cargoHash tree-wide.

Fixes #121994.
2021-05-08 00:36:37 -07:00

49 lines
1.4 KiB
Nix

{ lib, rustPlatform, fetchFromGitHub, sqlite }: let
manifest = {
description = "Bukubrow extension host application";
name = "com.samhh.bukubrow";
path = "@out@/bin/bukubrow";
type = "stdio";
};
in rustPlatform.buildRustPackage rec {
pname = "bukubrow-host";
version = "5.0.0";
src = fetchFromGitHub {
owner = "SamHH";
repo = pname;
rev = "v${version}";
sha256 = "1a3gqxj6d1shv3w0v9m8x2xr0bvcynchy778yqalxkc3x4vr0nbn";
};
cargoSha256 = "0z6i9wzz5gy9rs8cxfmwg4mpfajv0xvj4nn6jfl7f1rw6k457jc9";
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 = ''
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
'';
meta = with lib; {
description = "A WebExtension for Buku, a command-line bookmark manager";
homepage = "https://github.com/SamHH/bukubrow-host";
license = licenses.gpl3;
maintainers = with maintainers; [ infinisil ];
};
}