nixpkgs-suyu/pkgs/shells/nushell/default.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

2019-11-09 10:20:00 +01:00
{ stdenv
, fetchFromGitHub
, rustPlatform
, openssl
, pkg-config
, python3
, xorg
2019-11-09 10:20:00 +01:00
, libiconv
, AppKit
2019-11-09 10:20:00 +01:00
, Security
, withStableFeatures ? true
2019-11-09 10:20:00 +01:00
}:
rustPlatform.buildRustPackage rec {
pname = "nushell";
2019-12-19 10:17:23 +01:00
version = "0.7.0";
2019-11-09 10:20:00 +01:00
src = fetchFromGitHub {
owner = pname;
repo = pname;
2019-11-27 07:49:59 +01:00
rev = version;
2019-12-19 10:17:23 +01:00
sha256 = "09kcyvhnhf5qsaivgrw58l9jh48rx40i9lkf10cpmk7jvqxgqyks";
2019-11-09 10:20:00 +01:00
};
2019-12-19 10:17:23 +01:00
cargoSha256 = "0bdxlbl33kilp9ai40dvdzlx9vcl8r21br82r5ljs2pg521jd66p";
2019-11-09 10:20:00 +01:00
nativeBuildInputs = [ pkg-config ]
++ stdenv.lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ];
2019-11-09 10:20:00 +01: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 10:20:00 +01: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 07:49:18 +01:00
maintainers = with maintainers; [ filalex77 marsam ];
2019-11-09 10:20:00 +01:00
};
passthru = {
shellPath = "/bin/nu";
};
}