3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/starship/default.nix
2019-12-29 19:13:12 +01:00

33 lines
956 B
Nix

{ stdenv, fetchFromGitHub, rustPlatform
, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "starship";
version = "0.32.2";
src = fetchFromGitHub {
owner = "starship";
repo = pname;
rev = "v${version}";
sha256 = "1yn2xr7142xnrsglrabxzgv16hp16i5d2dybazpzxflfnn52c0am";
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
postPatch = ''
substituteInPlace src/utils.rs \
--replace "/bin/echo" "echo"
'';
cargoSha256 = "0i3jrk7qyyzhk4855z0vsdf64n14xqqg9by0dr62jz83hdx89x1w";
checkPhase = "cargo test -- --skip directory::home_directory --skip directory::directory_in_root";
meta = with stdenv.lib; {
description = "A minimal, blazing fast, and extremely customizable prompt for any shell";
homepage = "https://starship.rs";
license = licenses.isc;
maintainers = with maintainers; [ bbigras davidtwco filalex77 ];
platforms = platforms.all;
};
}