2019-11-09 09:20:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
2019-11-12 09:20:00 +00:00
|
|
|
, python3
|
|
|
|
, xorg
|
2019-11-09 09:20:00 +00:00
|
|
|
, libiconv
|
2019-11-12 09:20:00 +00:00
|
|
|
, AppKit
|
2019-11-09 09:20:00 +00:00
|
|
|
, Security
|
2019-11-12 09:20:00 +00:00
|
|
|
, withAllFeatures ? true
|
2019-11-09 09:20:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "nushell";
|
2019-12-01 09:00:19 +00:00
|
|
|
version = "0.6.1";
|
2019-11-09 09:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2019-11-27 06:49:59 +00:00
|
|
|
rev = version;
|
2019-12-01 09:00:19 +00:00
|
|
|
sha256 = "0fdi5c9l8ij2vqcxwi9203mh1qj3lcqsl4kl2rkshqj45hn4ab2a";
|
2019-11-09 09:20:00 +00:00
|
|
|
};
|
|
|
|
|
2019-12-01 09:00:19 +00:00
|
|
|
cargoSha256 = "11cr88jmy34lzjka7agzfvm13hvg66ksa735rzcdx7lcxha538f3";
|
2019-11-09 09:20:00 +00:00
|
|
|
|
2019-11-12 09:20:00 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ]
|
|
|
|
++ stdenv.lib.optionals (withAllFeatures && stdenv.isLinux) [ python3 ];
|
2019-11-09 09:20:00 +00:00
|
|
|
|
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
|
2019-11-12 09:20:00 +00:00
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ]
|
|
|
|
++ stdenv.lib.optionals (withAllFeatures && stdenv.isLinux) [ xorg.libX11 ]
|
|
|
|
++ stdenv.lib.optionals (withAllFeatures && stdenv.isDarwin) [ AppKit ];
|
|
|
|
|
2019-11-27 06:49:59 +00:00
|
|
|
cargoBuildFlags = stdenv.lib.optional withAllFeatures "--all-features";
|
2019-11-09 09:20:00 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A modern shell written in Rust";
|
|
|
|
homepage = "https://www.nushell.sh/";
|
|
|
|
license = licenses.mit;
|
2019-11-27 06:49:18 +00:00
|
|
|
maintainers = with maintainers; [ filalex77 marsam ];
|
2019-11-09 09:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
shellPath = "/bin/nu";
|
|
|
|
};
|
|
|
|
}
|