Unverified Commit dc1668ab authored by Artturi's avatar Artturi Committed by GitHub
Browse files

Merge pull request #255331 from yu-re-ka/parallel-cross

parents 1f832ad5 f92f6b6a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
{ fetchurl, lib, stdenv, perl, makeWrapper, procps, coreutils }:
{ fetchurl, lib, stdenv, perl, makeWrapper, procps, coreutils, buildPackages }:

stdenv.mkDerivation rec {
  pname = "parallel";
@@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ perl procps ];

  postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
    substituteInPlace Makefile.in \
      --replace '$(DESTDIR)$(bindir)/parallel --shell-completion' '${lib.getExe buildPackages.parallel} --shell-completion'
  '';

  preInstall = ''
    patchShebangs ./src/parallel
  '';
@@ -48,5 +53,6 @@ stdenv.mkDerivation rec {
    license = licenses.gpl3Plus;
    platforms = platforms.all;
    maintainers = with maintainers; [ pSub vrthra tomberek ];
    mainProgram = "parallel";
  };
}