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";
version = "0.37.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}";
sha256 = "17jgb8fp6zarsnl1hm2y24h0xb0w2w6m61k8g3ww3r4fm8yj649v";
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"
'';
cargoSha256 = "01qzwk3q1f6pmyqsq5gnczdjm3157ja2zlrahw5bd5vmy929l5gq";
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;
};
}