3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/starship/default.nix

33 lines
956 B
Nix
Raw Normal View History

2019-12-20 10:09:28 +00:00
{ stdenv, fetchFromGitHub, rustPlatform
, libiconv, Security }:
2019-08-16 18:12:52 +01:00
rustPlatform.buildRustPackage rec {
pname = "starship";
2020-01-06 18:27:44 +00:00
version = "0.33.0";
2019-08-16 18:12:52 +01:00
src = fetchFromGitHub {
owner = "starship";
2019-12-03 17:10:30 +00:00
repo = pname;
2019-08-16 18:12:52 +01:00
rev = "v${version}";
2020-01-06 18:27:44 +00:00
sha256 = "1wqxcfd7ams3k0swps9037dzc1qzxhpbqaz4qjw9jabgcl6jkb6v";
2019-08-16 18:12:52 +01:00
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
2019-08-16 18:12:52 +01:00
postPatch = ''
substituteInPlace src/utils.rs \
--replace "/bin/echo" "echo"
'';
2020-01-06 18:27:44 +00:00
cargoSha256 = "0gcca3vlwrfhw9k4r9zc1raflr1m4xws9dpdxjh1kz34f9g88ijg";
2019-08-19 17:17:24 +01:00
checkPhase = "cargo test -- --skip directory::home_directory --skip directory::directory_in_root";
2019-08-16 18:12:52 +01:00
meta = with stdenv.lib; {
description = "A minimal, blazing fast, and extremely customizable prompt for any shell";
homepage = "https://starship.rs";
license = licenses.isc;
2019-12-03 17:10:55 +00:00
maintainers = with maintainers; [ bbigras davidtwco filalex77 ];
2019-08-16 18:12:52 +01:00
platforms = platforms.all;
};
}