diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/tools/misc/starship/default.nix | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/starship/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/starship/default.nix | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/tools/misc/starship/default.nix b/nixpkgs/pkgs/tools/misc/starship/default.nix index a27674290d67..608b495a8fa5 100644 --- a/nixpkgs/pkgs/tools/misc/starship/default.nix +++ b/nixpkgs/pkgs/tools/misc/starship/default.nix @@ -4,36 +4,41 @@ , rustPlatform , installShellFiles , libiconv -, libgit2 -, pkg-config +, cmake +, fetchpatch , nixosTests , Security , Foundation +, Cocoa }: rustPlatform.buildRustPackage rec { pname = "starship"; - version = "1.3.0"; + version = "1.10.1"; src = fetchFromGitHub { owner = "starship"; repo = pname; rev = "v${version}"; - sha256 = "sha256-mqUE4JzNBhvtDpT2LM23eHX8q93wtPqA+/zr/PxEDiE="; + sha256 = "sha256-ujv2lqhzsug9Qpco+4doMGH+0yG5cZZzLmSLr0MBmZk="; }; - nativeBuildInputs = [ installShellFiles pkg-config ]; + nativeBuildInputs = [ installShellFiles cmake ]; - buildInputs = [ libgit2 ] ++ lib.optionals stdenv.isDarwin [ libiconv Security Foundation ]; + buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security Foundation Cocoa ]; + + buildNoDefaultFeatures = true; + # the "notify" feature is currently broken on darwin + buildFeatures = if stdenv.isDarwin then [ "battery" ] else [ "default" ]; postInstall = '' - for shell in bash fish zsh; do - STARSHIP_CACHE=$TMPDIR $out/bin/starship completions $shell > starship.$shell - installShellCompletion starship.$shell - done + installShellCompletion --cmd starship \ + --bash <($out/bin/starship completions bash) \ + --fish <($out/bin/starship completions fish) \ + --zsh <($out/bin/starship completions zsh) ''; - cargoSha256 = "sha256-hQNDiayVT4UgbxcxdXssi/evPvwgyvG/UOFyEHj7jpo="; + cargoSha256 = "sha256-iZvjU/GzC/ssXcd+UeV57IA0hKT45cQ09VBB4BNYw50="; preCheck = '' HOME=$TMPDIR |