nixpkgs/pkgs/shells/nushell/default.nix

53 lines
1.3 KiB
Nix
Raw Normal View History

2019-11-09 09:20:00 +00:00
{ stdenv
, fetchFromGitHub
, rustPlatform
, openssl
, pkg-config
, python3
, xorg
2019-11-09 09:20:00 +00:00
, libiconv
, AppKit
2019-11-09 09:20:00 +00:00
, Security
, withStableFeatures ? true
2019-11-09 09:20:00 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "nushell";
2020-01-07 17:58:06 +00:00
version = "0.8.0";
2019-11-09 09:20:00 +00:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
2020-01-07 17:58:06 +00:00
rev = version;
sha256 = "1hw9fazf5m80p39wgjqjcxafkfjxh0rkjmiznn2p66gccjnkddm6";
2019-11-09 09:20:00 +00:00
};
2020-01-07 17:58:06 +00:00
cargoSha256 = "17hx02g9m3l2kgxba0n6wmixdbd9g8443h085v8shd70c6vln2v8";
2019-11-09 09:20:00 +00:00
nativeBuildInputs = [ pkg-config ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ];
2019-11-09 09:20:00 +00:00
buildInputs = stdenv.lib.optionals stdenv.isLinux [ openssl ]
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ];
cargoBuildFlags = stdenv.lib.optional withStableFeatures "--features=stable";
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 ];
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
2019-11-09 09:20:00 +00:00
};
passthru = {
shellPath = "/bin/nu";
};
}