nixpkgs/pkgs/tools/misc/starship/default.nix

33 lines
956 B
Nix
Raw Normal View History

2019-12-20 11:09:28 +01:00
{ stdenv, fetchFromGitHub, rustPlatform
, libiconv, Security }:
2019-08-16 19:12:52 +02:00
rustPlatform.buildRustPackage rec {
pname = "starship";
version = "0.37.0";
2019-08-16 19:12:52 +02:00
src = fetchFromGitHub {
owner = "starship";
2019-12-03 18:10:30 +01:00
repo = pname;
2019-08-16 19:12:52 +02:00
rev = "v${version}";
sha256 = "17jgb8fp6zarsnl1hm2y24h0xb0w2w6m61k8g3ww3r4fm8yj649v";
2019-08-16 19:12:52 +02:00
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
2019-08-16 19:12:52 +02:00
postPatch = ''
substituteInPlace src/utils.rs \
--replace "/bin/echo" "echo"
'';
cargoSha256 = "01qzwk3q1f6pmyqsq5gnczdjm3157ja2zlrahw5bd5vmy929l5gq";
2019-08-19 18:17:24 +02:00
checkPhase = "cargo test -- --skip directory::home_directory --skip directory::directory_in_root";
2019-08-16 19:12:52 +02: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 18:10:55 +01:00
maintainers = with maintainers; [ bbigras davidtwco filalex77 ];
2019-08-16 19:12:52 +02:00
platforms = platforms.all;
};
}