at 18.03-beta 39 lines 1.3 kB view raw
1{ stdenv, fetchFromGitHub, rustPlatform, cargo, cmake, sphinx, lib, prefix ? "uutils-" }: 2 3rustPlatform.buildRustPackage { 4 name = "uutils-coreutils-2018-02-09"; 5 src = fetchFromGitHub { 6 owner = "uutils"; 7 repo = "coreutils"; 8 rev = "f333ab26b03294a32a10c1c203a03c6b5cf8a89a"; 9 sha256 = "0nkggs5nqvc1mxzzgcsqm1ahchh4ll11xh0xqmcljrr5yg1rhhzf"; 10 }; 11 12 # too many impure/platform-dependent tests 13 doCheck = false; 14 15 cargoSha256 = "0qv2wz1bxhm5xhzbic7cqmn8jj8fyap0s18ylia4fbwpmv89nkc5"; 16 17 makeFlags = 18 [ "CARGO=${cargo}/bin/cargo" "PREFIX=$(out)" "PROFILE=release" "INSTALLDIR_MAN=$(out)/share/man/man1" ] 19 ++ lib.optional (prefix != null) [ "PROG_PREFIX=${prefix}" ]; 20 21 nativeBuildInputs = [ cmake ]; 22 buildInputs = [ cargo sphinx ]; 23 24 # empty {build,install}Phase to use defaults of `stdenv.mkDerivation` rather than rust defaults 25 buildPhase = ""; 26 installPhase = ""; 27 28 meta = with stdenv.lib; { 29 description = "Cross-platform Rust rewrite of the GNU coreutils"; 30 longDescription = '' 31 uutils is an attempt at writing universal (as in cross-platform) 32 CLI utils in Rust. This repo is to aggregate the GNU coreutils rewrites. 33 ''; 34 homepage = https://github.com/uutils/coreutils; 35 maintainers = with maintainers; [ ma27 ]; 36 license = licenses.mit; 37 platforms = platforms.linux; 38 }; 39}