-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix: update to latest
nixpkgs-unstable
(a bit of a rough one)
- Cherry picked NixOS/nixpkgs#159516 - Starship workaround: NixOS/nixpkgs#160876
- Loading branch information
Showing
6 changed files
with
62 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, rustPlatform | ||
, pkg-config | ||
, openssl | ||
, installShellFiles | ||
, libiconv | ||
, nixosTests | ||
, Security | ||
}: | ||
|
||
rustPlatform.buildRustPackage rec { | ||
pname = "starship"; | ||
version = "1.2.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "starship"; | ||
repo = pname; | ||
rev = "v${version}"; | ||
sha256 = "sha256-5MJA8eHo1enOHlLpAOF1iDvOHCS/Nw0sc84VWu9nApE="; | ||
}; | ||
|
||
nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ pkg-config ]; | ||
|
||
buildInputs = lib.optionals stdenv.isLinux [ openssl ] | ||
++ lib.optionals stdenv.isDarwin [ libiconv Security ]; | ||
|
||
buildFeatures = lib.optional (!stdenv.isDarwin) "notify-rust"; | ||
|
||
postInstall = '' | ||
for shell in bash fish zsh; do | ||
STARSHIP_CACHE=$TMPDIR $out/bin/starship completions $shell > starship.$shell | ||
installShellCompletion starship.$shell | ||
done | ||
''; | ||
|
||
cargoSha256 = "sha256-DTQQFxj6stzlVzSdmv4J4Nsf8X/VMlwvfIumnuK0YDo="; | ||
|
||
preCheck = '' | ||
HOME=$TMPDIR | ||
''; | ||
|
||
passthru.tests = { | ||
inherit (nixosTests) starship; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "A minimal, blazing fast, and extremely customizable prompt for any shell"; | ||
homepage = "https://starship.rs"; | ||
license = licenses.isc; | ||
maintainers = with maintainers; [ bbigras danth davidtwco Br1ght0ne Frostman marsam ]; | ||
}; | ||
} |
Submodule nix-darwin
updated
42 files
Submodule nixpkgs
updated
from 22a500 to 3cf246