nixpkgs-suyu/pkgs/tools/networking/bukubrow/default.nix
Alyssa Ross 062210bdff treewide: update cargoSha256 hashes for cargo-vendor upgrade
A recent upgrade of cargo-vendor changed its output slightly, which
broke all cargoSha256 hashes in nixpkgs.
See https://github.com/NixOS/nixpkgs/issues/60668 for more information.

Since then, a few hashes have been fixed in master by hand, but there
were a lot still to do, so I did all of the ones left over with some
scripts I wrote.

The one hash I wasn’t able to update was habitat's, because it’s
currently broken and the build doesn’t get far enough to produce a
hash anyway.
2019-06-01 15:17:52 +00:00

37 lines
1.1 KiB
Nix

{ stdenv, rustPlatform, fetchFromGitHub, sqlite }:
rustPlatform.buildRustPackage rec {
name = "bukubrow-${version}";
version = "2.4.0";
src = fetchFromGitHub {
owner = "SamHH";
repo = "bukubrow";
rev = version;
sha256 = "1wrwav7am73bmgbpwh1pi0b8k7vhydqvw91hmmhnvbjhrhbns7s5";
};
sourceRoot = "source/binary";
cargoSha256 = "0553awiba24a3a8xwjhlwf8yzbs44lnirjvcxnvsgah7dc44r0gj";
buildInputs = [ sqlite ];
postInstall = ''
mkdir -p $out/etc $out/lib/mozilla/native-messaging-hosts
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; {
description = "Bukubrow is a WebExtension for Buku, a command-line bookmark manager";
homepage = https://github.com/SamHH/bukubrow;
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ infinisil ];
};
}