3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/the-way/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

37 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }:
rustPlatform.buildRustPackage rec {
pname = "the-way";
version = "0.13.0";
src = fetchFromGitHub {
owner = "out-of-cheese-error";
repo = pname;
rev = "v${version}";
sha256 = "sha256-OqJceRO1RFOLgNi3SbTKLw62tSfJSO7T2/u0RTX89AM=";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Security ];
cargoSha256 = "sha256-sULjd+weixTQYFIQlluPwY4MFlZ1+vMMoMn4GP79oQs=";
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=copy" ];
dontUseCargoParallelTests = true;
postInstall = ''
$out/bin/the-way config default tmp.toml
for shell in bash fish zsh; do
THE_WAY_CONFIG=tmp.toml $out/bin/the-way complete $shell > the-way.$shell
installShellCompletion the-way.$shell
done
'';
meta = with lib; {
description = "Terminal code snippets manager";
homepage = "https://github.com/out-of-cheese-error/the-way";
license = with licenses; [ mit ];
maintainers = with maintainers; [ numkem ];
};
}