diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2019-11-12 22:33:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-12 22:33:06 -0500 |
commit | 1933ae397301b9e46d309b494aeb0d03110ee9d3 (patch) | |
tree | adc10fb17a0a5676d3a533f5d0ca84376d3cbf02 /pkgs/shells | |
parent | ca9be2e872694579a4a541d5d6f1b6f53bde1d12 (diff) | |
parent | a8942c6cbd737c4ce989caab5a5ae2a05b9a5d43 (diff) |
Merge pull request #73121 from marsam/init-nushell
nushell: init at 0.5.0
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/nushell/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix new file mode 100644 index 0000000000000..9168450477400 --- /dev/null +++ b/pkgs/shells/nushell/default.nix @@ -0,0 +1,51 @@ +{ stdenv +, fetchFromGitHub +, rustPlatform +, openssl +, pkg-config +, python3 +, xorg +, libiconv +, AppKit +, Security +, withAllFeatures ? true +}: + +rustPlatform.buildRustPackage rec { + pname = "nushell"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "0_5_0"; + sha256 = "1s60w29c8sv0a4nmpggls9pkqyfrwwxjzd65p68d1xxxsdb36rzj"; + }; + + cargoSha256 = "0b8alc3si6y4xmn812izknbkfkz64kz7kcnq4xaqws6iqn7pqidp"; + + nativeBuildInputs = [ pkg-config ] + ++ stdenv.lib.optionals (withAllFeatures && stdenv.isLinux) [ python3 ]; + + buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ] + ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ] + ++ stdenv.lib.optionals (withAllFeatures && stdenv.isLinux) [ xorg.libX11 ] + ++ stdenv.lib.optionals (withAllFeatures && stdenv.isDarwin) [ AppKit ]; + + cargoBuildFlags = stdenv.lib.optionals withAllFeatures [ "--features" "all" ]; + + preCheck = '' + export HOME=$TMPDIR + ''; + + meta = with stdenv.lib; { + description = "A modern shell written in Rust"; + homepage = "https://www.nushell.sh/"; + license = licenses.mit; + maintainers = [ maintainers.marsam ]; + }; + + passthru = { + shellPath = "/bin/nu"; + }; +} |