3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/starship/default.nix
2019-12-14 01:00:11 +02:00

32 lines
981 B
Nix

{ stdenv, fetchFromGitHub, rustPlatform, libiconv, darwin }:
rustPlatform.buildRustPackage rec {
pname = "starship";
version = "0.30.1";
src = fetchFromGitHub {
owner = "starship";
repo = pname;
rev = "v${version}";
sha256 = "19h6ahbqfrq5jfdjqxd7phzh1lanqqvkb1phr4fx6qnn5icj9hlm";
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
postPatch = ''
substituteInPlace src/utils.rs \
--replace "/bin/echo" "echo"
'';
cargoSha256 = "0391l44rqshjz62658mfl58c2npv7k11l4lb4kk9gb3ywdhbjv26";
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;
};
}