3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #195604 from tjni/starship

starship: reenable default features on darwin
This commit is contained in:
Mario Rodas 2022-11-05 01:14:07 -05:00 committed by GitHub
commit a395a15960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,6 @@
, fetchFromGitHub
, rustPlatform
, installShellFiles
, libiconv
, cmake
, fetchpatch
, nixosTests
@ -20,16 +19,14 @@ rustPlatform.buildRustPackage rec {
owner = "starship";
repo = pname;
rev = "v${version}";
sha256 = "sha256-90mh8C52uD68K5o1LE22gkbL1gy6FyMJTiiN9oV/3DE=";
hash = "sha256-90mh8C52uD68K5o1LE22gkbL1gy6FyMJTiiN9oV/3DE=";
};
nativeBuildInputs = [ installShellFiles cmake ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security Foundation Cocoa ];
buildInputs = lib.optionals stdenv.isDarwin [ Security Foundation Cocoa ];
buildNoDefaultFeatures = true;
# the "notify" feature is currently broken on darwin
buildFeatures = if stdenv.isDarwin then [ "battery" ] else [ "default" ];
NIX_LDFLAGS = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ "-framework" "AppKit" ];
postInstall = ''
installShellCompletion --cmd starship \
@ -38,7 +35,7 @@ rustPlatform.buildRustPackage rec {
--zsh <($out/bin/starship completions zsh)
'';
cargoSha256 = "sha256-Q1VY9RyHEsQAWRN/upeG5XJxJfrmzj5FQG6GBGrN0xU=";
cargoHash = "sha256-Q1VY9RyHEsQAWRN/upeG5XJxJfrmzj5FQG6GBGrN0xU=";
preCheck = ''
HOME=$TMPDIR