nushell: 0.8.0 -> 0.9.0

This commit is contained in:
Serg Nesterov 2020-01-29 23:03:54 +03:00
parent afa36de49d
commit e8e47ce945
No known key found for this signature in database
GPG key ID: 7ED18DB77A86EE14

View file

@ -1,4 +1,5 @@
{ stdenv { stdenv
, lib
, fetchFromGitHub , fetchFromGitHub
, rustPlatform , rustPlatform
, openssl , openssl
@ -9,36 +10,46 @@
, AppKit , AppKit
, Security , Security
, withStableFeatures ? true , withStableFeatures ? true
, withTestBinaries ? true
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "nushell"; pname = "nushell";
version = "0.8.0"; version = "0.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "1hw9fazf5m80p39wgjqjcxafkfjxh0rkjmiznn2p66gccjnkddm6"; sha256 = "0p1aykhkz5rixj6x0rskg77q31xw11mirvjhzp7n4nmbx3rfkagc";
}; };
cargoSha256 = "17hx02g9m3l2kgxba0n6wmixdbd9g8443h085v8shd70c6vln2v8"; cargoSha256 = "0143mm9cdswd1azpzzpbfc5x7dy3ryywvq44mwkd6h1027n5idap";
nativeBuildInputs = [ pkg-config ] nativeBuildInputs = [ pkg-config ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ]; ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ];
buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ] buildInputs = lib.optionals stdenv.isLinux [ openssl ]
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ] ++ lib.optionals stdenv.isDarwin [ libiconv Security ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ] ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ]; ++ lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ];
cargoBuildFlags = stdenv.lib.optional withStableFeatures "--features=stable"; cargoBuildFlags = lib.optional withStableFeatures "--features stable";
cargoTestFlags = lib.optional withTestBinaries "--features test-bins";
preCheck = '' preCheck = ''
export HOME=$TMPDIR export HOME=$TMPDIR
''; '';
meta = with stdenv.lib; { checkPhase = ''
runHook preCheck
echo "Running cargo cargo test ${lib.strings.concatStringsSep " " cargoTestFlags} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}"
cargo test ${lib.strings.concatStringsSep " " cargoTestFlags} -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"}
runHook postCheck
'';
meta = with lib; {
description = "A modern shell written in Rust"; description = "A modern shell written in Rust";
homepage = "https://www.nushell.sh/"; homepage = "https://www.nushell.sh/";
license = licenses.mit; license = licenses.mit;