mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 08:31:59 +00:00
85f96822a0
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.
49 lines
1.4 KiB
Nix
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 ];
|
|
};
|
|
}
|
|
|