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

This commit is contained in:
Artturi 2023-09-15 21:42:13 +03:00 committed by GitHub
commit dc1668abd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ 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";
};
}