14 rustPlatform.buildRustPackage rec {
18 src = fetchFromGitHub {
22 hash = "sha256-Xn9qV26/ST+3VtVq6OJP823lIVIo0zEdno+nIUv8B9c=";
25 nativeBuildInputs = [ installShellFiles cmake ];
27 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security Foundation Cocoa ];
29 NIX_LDFLAGS = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ "-framework" "AppKit" ];
31 # tries to access HOME only in aarch64-darwin environment when building mac-notification-sys
32 preBuild = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
37 presetdir=$out/share/starship/presets/
39 cp docs/public/presets/toml/*.toml $presetdir
40 '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
41 installShellCompletion --cmd starship \
42 --bash <($out/bin/starship completions bash) \
43 --fish <($out/bin/starship completions fish) \
44 --zsh <($out/bin/starship completions zsh)
47 cargoHash = "sha256-YbZCe2OcX/wq0OWvWK61nWvRT0O+CyW0QY0J7vv6QaM=";
49 nativeCheckInputs = [ git ];
56 inherit (nixosTests) starship;
60 description = "Minimal, blazing fast, and extremely customizable prompt for any shell";
61 homepage = "https://starship.rs";
62 license = licenses.isc;
63 maintainers = with maintainers; [ danth davidtwco Br1ght0ne Frostman ];
64 mainProgram = "starship";