diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/uutils-coreutils/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/uutils-coreutils/default.nix | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/tools/misc/uutils-coreutils/default.nix b/nixpkgs/pkgs/tools/misc/uutils-coreutils/default.nix index 44871b07a8ea..b2d3883176c6 100644 --- a/nixpkgs/pkgs/tools/misc/uutils-coreutils/default.nix +++ b/nixpkgs/pkgs/tools/misc/uutils-coreutils/default.nix @@ -1,32 +1,51 @@ -{ stdenv, fetchFromGitHub, rustPlatform, cargo, cmake, sphinx, lib, prefix ? "uutils-" +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, cargo +, sphinx , Security +, prefix ? "uutils-" +, buildMulticallBinary ? true }: -rustPlatform.buildRustPackage rec { + +stdenv.mkDerivation rec { pname = "uutils-coreutils"; - version = "0.0.3"; + version = "0.0.6"; src = fetchFromGitHub { owner = "uutils"; repo = "coreutils"; rev = version; - sha256 = "QWiEHk8aciiwQeyNgrr0M0c1EeAgE3gSqw0ly/YTwTQ="; + sha256 = "sha256-dnswE/DU2jCfxWW10Ctjw8woktwWZqyd3E9IuKkle1M="; }; - # too many impure/platform-dependent tests - doCheck = false; + postPatch = '' + # can be removed after https://github.com/uutils/coreutils/pull/1815 is included + substituteInPlace GNUmakefile \ + --replace uutils coreutils + ''; - cargoSha256 = "m2a7WNkF5TxjJlytjdoQ/JZIF9gp9qBkH+UU/NVRJzA="; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-92BHPSVIPZLn399AcaJJjRq2WkxzDm8knKN3FIdAxAA="; + }; - makeFlags = - [ "CARGO=${cargo}/bin/cargo" "PREFIX=$(out)" "PROFILE=release" "INSTALLDIR_MAN=$(out)/share/man/man1" ] - ++ lib.optional (prefix != null) [ "PROG_PREFIX=${prefix}" ]; + nativeBuildInputs = [ rustPlatform.cargoSetupHook sphinx ]; - nativeBuildInputs = [ cmake cargo sphinx ]; buildInputs = lib.optional stdenv.isDarwin Security; - # empty {build,install}Phase to use defaults of `stdenv.mkDerivation` rather than rust defaults - buildPhase = ""; - installPhase = ""; + makeFlags = [ + "CARGO=${cargo}/bin/cargo" + "PREFIX=${placeholder "out"}" + "PROFILE=release" + "INSTALLDIR_MAN=${placeholder "out"}/share/man/man1" + ] ++ lib.optionals (prefix != null) [ "PROG_PREFIX=${prefix}" ] + ++ lib.optionals buildMulticallBinary [ "MULTICALL=y" ]; + + # too many impure/platform-dependent tests + doCheck = false; meta = with lib; { description = "Cross-platform Rust rewrite of the GNU coreutils"; @@ -35,7 +54,7 @@ rustPlatform.buildRustPackage rec { CLI utils in Rust. This repo is to aggregate the GNU coreutils rewrites. ''; homepage = "https://github.com/uutils/coreutils"; - maintainers = with maintainers; [ siraben ]; + maintainers = with maintainers; [ siraben SuperSandro2000 ]; license = licenses.mit; platforms = platforms.unix; }; |