summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2019-11-12 22:33:06 -0500
committerGitHub <noreply@github.com>2019-11-12 22:33:06 -0500
commit1933ae397301b9e46d309b494aeb0d03110ee9d3 (patch)
treeadc10fb17a0a5676d3a533f5d0ca84376d3cbf02 /pkgs/shells
parentca9be2e872694579a4a541d5d6f1b6f53bde1d12 (diff)
parenta8942c6cbd737c4ce989caab5a5ae2a05b9a5d43 (diff)
downloadnixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.tar
nixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.tar.gz
nixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.tar.bz2
nixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.tar.lz
nixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.tar.xz
nixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.tar.zst
nixpkgs-1933ae397301b9e46d309b494aeb0d03110ee9d3.zip
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.nix51
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 00000000000..91684504774
--- /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";
+  };
+}