git.iko.soy/typeable/nixpkgs
on master help sign in
nushell: 0.8.0 -> 0.9.0
e8e47ceSerg Nesterov
pkgs/shells/nushell/default.nix+21−10
@@ -1,4 +1,5 @@
1{ stdenv
1{ stdenv
2+, lib
2, fetchFromGitHub
3, fetchFromGitHub
3, rustPlatform
4, rustPlatform
4, openssl
5, openssl
@@ -9,36 +10,46 @@
9, AppKit
10, AppKit
10, Security
11, Security
11, withStableFeatures ? true
12, withStableFeatures ? true
13+, withTestBinaries ? true
12}:
14}:
13
15
14rustPlatform.buildRustPackage rec {
16rustPlatform.buildRustPackage rec {
15 pname = "nushell";
17 pname = "nushell";
16− version = "0.8.0";
18+ version = "0.9.0";
17
19
18 src = fetchFromGitHub {
20 src = fetchFromGitHub {
19 owner = pname;
21 owner = pname;
20 repo = pname;
22 repo = pname;
21 rev = version;
23 rev = version;
22− sha256 = "1hw9fazf5m80p39wgjqjcxafkfjxh0rkjmiznn2p66gccjnkddm6";
24+ sha256 = "0p1aykhkz5rixj6x0rskg77q31xw11mirvjhzp7n4nmbx3rfkagc";
23 };
25 };
24
26
25− cargoSha256 = "17hx02g9m3l2kgxba0n6wmixdbd9g8443h085v8shd70c6vln2v8";
27+ cargoSha256 = "0143mm9cdswd1azpzzpbfc5x7dy3ryywvq44mwkd6h1027n5idap";
26
28
27 nativeBuildInputs = [ pkg-config ]
29 nativeBuildInputs = [ pkg-config ]
28− ++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ];
30+ ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ];
29
31
30− buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
32+ buildInputs = lib.optionals stdenv.isLinux [ openssl ]
31− ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ]
33+ ++ lib.optionals stdenv.isDarwin [ libiconv Security ]
32− ++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ]
34+ ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ]
33− ++ stdenv.lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ];
35+ ++ lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ];
34
36
35− cargoBuildFlags = stdenv.lib.optional withStableFeatures "--features=stable";
37+ cargoBuildFlags = lib.optional withStableFeatures "--features stable";
38+
39+ cargoTestFlags = lib.optional withTestBinaries "--features test-bins";
36
40
37 preCheck = ''
41 preCheck = ''
38 export HOME=$TMPDIR
42 export HOME=$TMPDIR
39 '';
43 '';
40
44
45+ checkPhase = ''
46+ runHook preCheck
47+ echo "Running cargo cargo test ${lib.strings.concatStringsSep " " cargoTestFlags} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
48+ cargo test ${lib.strings.concatStringsSep " " cargoTestFlags} -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
49+ runHook postCheck
50+ '';
51+
41− meta = with stdenv.lib; {
52+ meta = with lib; {
42 description = "A modern shell written in Rust";
53 description = "A modern shell written in Rust";
43 homepage = "https://www.nushell.sh/";
54 homepage = "https://www.nushell.sh/";
44 license = licenses.mit;
55 license = licenses.mit;