nixpkgs/pkgs/tools/misc/starship/default.nix
2020-02-19 18:46:59 -08:00

33 lines
956 B
Nix

{ stdenv, fetchFromGitHub, rustPlatform
, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "starship";
version = "0.36.1";
src = fetchFromGitHub {
owner = "starship";
repo = pname;
rev = "v${version}";
sha256 = "1ip6jfnlw0maabvihzbmmka453njnw1yf7hq3fd89l6dx57315m5";
};
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
postPatch = ''
substituteInPlace src/utils.rs \
--replace "/bin/echo" "echo"
'';
cargoSha256 = "16wsd8z4cfb5pplwfvwgi5qawwv8c0aa220wnvphplmgz8cpq35r";
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;
};
}