@@ -1,15 +1,22 @@
1−{ stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, installShellFiles
2−, libiconv, Security }:
1+{ stdenv
2+, fetchFromGitHub
3+, rustPlatform
4+, pkg-config
5+, openssl
6+, installShellFiles
7+, libiconv
8+, Security
9+}:
310
411rustPlatform.buildRustPackage rec {
512 pname = "starship";
6− version = "0.44.0";
13+ version = "0.45.2";
714
815 src = fetchFromGitHub {
916 owner = "starship";
1017 repo = pname;
1118 rev = "v${version}";
12− sha256 = "1pxrg5sfqqkvqww3fabq64j1fg03v5fj5yvm2xg2qa5n2f2qwnhi";
19+ sha256 = "0kxmgx4pnayp3jf6cgmka05x3aymxr79rim5nff6k3cg5zaqrz59";
1320 };
1421
1522 nativeBuildInputs = [ installShellFiles ] ++ stdenv.lib.optionals stdenv.isLinux [ pkg-config ];
@@ -17,28 +24,22 @@ rustPlatform.buildRustPackage rec {
1724 buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
1825 ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
1926
20− postPatch = ''
21− substituteInPlace src/utils.rs \
22− --replace "/bin/echo" "echo"
23− '';
24−
2527 postInstall = ''
2628 for shell in bash fish zsh; do
27− $out/bin/starship completions $shell > starship.$shell
29+ STARSHIP_CACHE=$TMPDIR $out/bin/starship completions $shell > starship.$shell
2830 installShellCompletion starship.$shell
2931 done
3032 '';
3133
32− cargoSha256 = "1b5gsw7jpiqjc7kbwf2kp6h6ks7jcgygrwzvn2akz86z40sskyg3";
33−
34− preCheck = ''
35− substituteInPlace tests/testsuite/common.rs \
36− --replace "./target/debug/starship" "./$releaseDir/starship"
37− substituteInPlace tests/testsuite/python.rs \
38− --replace "#[test]" "#[test] #[ignore]"
39− '';
34+ cargoSha256 = "0x9a322anwrgpxfqrvqb1ikavp8qffa93wdvj5kln1d2rgmxr2sy";
4035
41− checkFlagsArray = [ "--skip=directory::home_directory" "--skip=directory::directory_in_root" ];
36+ checkFlags = [
37+ "--skip=directory_in_home"
38+ "--skip=fish_directory_in_home"
39+ "--skip=home_directory"
40+ "--skip=truncated_directory_in_home"
41+ "--skip=directory_in_root"
42+ ];
4243
4344 meta = with stdenv.lib; {
4445 description = "A minimal, blazing fast, and extremely customizable prompt for any shell";