mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
05e40e79a8
API change: `cargoParallelTestThreads` suggests that this attribute sets the number of threads used during tests, while it is actually a boolean option (use 1 thread or NIX_BUILD_CORES threads). In the hook, this is replaced by a more canonical name `dontUseCargoParallelTests`.
37 lines
1.1 KiB
Nix
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-jTZso61Lyt6jprBxBAhvchgOsgM9y1qBleTxUx1jCnE=";
|
|
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 ];
|
|
};
|
|
}
|