2019-12-29 22:45:09 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, cargo, cmake, sphinx, lib, prefix ? "uutils-"
|
|
|
|
, Security
|
|
|
|
}:
|
2021-03-09 15:42:22 +00:00
|
|
|
|
2021-02-03 03:41:46 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "uutils-coreutils";
|
2021-03-09 15:42:22 +00:00
|
|
|
version = "0.0.4";
|
2018-02-11 11:37:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "uutils";
|
|
|
|
repo = "coreutils";
|
2021-02-03 03:41:46 +00:00
|
|
|
rev = version;
|
2021-03-09 15:42:22 +00:00
|
|
|
sha256 = "sha256-z5lDKJpFxXDCQq+0Da/63GGoUXacy5TSn+1gJiMvicc=";
|
2018-02-11 11:37:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# too many impure/platform-dependent tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-09 15:42:22 +00:00
|
|
|
cargoSha256 = "sha256-x/nn2JNe8x+I0G2Vbr2PZAHCghwLBDhKAhkHPQFeL0M=";
|
2018-02-11 11:37:48 +00:00
|
|
|
|
|
|
|
makeFlags =
|
|
|
|
[ "CARGO=${cargo}/bin/cargo" "PREFIX=$(out)" "PROFILE=release" "INSTALLDIR_MAN=$(out)/share/man/man1" ]
|
|
|
|
++ lib.optional (prefix != null) [ "PROG_PREFIX=${prefix}" ];
|
|
|
|
|
2020-03-29 09:07:29 +01:00
|
|
|
nativeBuildInputs = [ cmake cargo sphinx ];
|
|
|
|
buildInputs = lib.optional stdenv.isDarwin Security;
|
2018-02-11 11:37:48 +00:00
|
|
|
|
|
|
|
# empty {build,install}Phase to use defaults of `stdenv.mkDerivation` rather than rust defaults
|
|
|
|
buildPhase = "";
|
|
|
|
installPhase = "";
|
|
|
|
|
2019-12-29 22:45:09 +00:00
|
|
|
meta = with lib; {
|
2018-02-11 11:37:48 +00:00
|
|
|
description = "Cross-platform Rust rewrite of the GNU coreutils";
|
|
|
|
longDescription = ''
|
|
|
|
uutils is an attempt at writing universal (as in cross-platform)
|
|
|
|
CLI utils in Rust. This repo is to aggregate the GNU coreutils rewrites.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/uutils/coreutils";
|
2021-02-03 03:41:46 +00:00
|
|
|
maintainers = with maintainers; [ siraben ];
|
2018-02-11 11:37:48 +00:00
|
|
|
license = licenses.mit;
|
2018-10-05 08:50:19 +01:00
|
|
|
platforms = platforms.unix;
|
2018-02-11 11:37:48 +00:00
|
|
|
};
|
|
|
|
}
|