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

32 lines
981 B
Nix

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