Skip to content

Commit

Permalink
qt5: move buildPackages.stdenv.cc to pkgsBuildBuild
Browse files Browse the repository at this point in the history
As recommended here:
#220310 (comment)

The non-idiomatic `if..then..else null` is to prevent a mass-rebuild
sending this to staging.  I can submit a separate PR to staging to
change it to the `lib.optional` idiom if this bothers people.
  • Loading branch information
Adam Joseph committed Mar 21, 2023
1 parent 393ab31 commit ceb4d99
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions pkgs/development/libraries/qt-5/qtModule.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ mkDerivation (args // {
patches = (args.patches or []) ++ (patches.${pname} or []);

nativeBuildInputs = (args.nativeBuildInputs or [])
++ [ perl self.qmake ]
# `qmake` expects to find `cc` (with no prefix) in the
# `$PATH`, so the following is needed even if
# `stdenv.buildPlatform.canExecute stdenv.hostPlatform`
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.stdenv.cc;
++ [ perl self.qmake ];

# `qmake` expects to find `cc` (with no prefix) in the
# `$PATH`, so the following is needed even if
# `stdenv.buildPlatform.canExecute stdenv.hostPlatform`
pkgsBuildBuild =
if (stdenv.hostPlatform != stdenv.buildPlatform)
then [ buildPackages.stdenv.cc ]
else null;

propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or []);

outputs = args.outputs or [ "out" "dev" ];
Expand Down

0 comments on commit ceb4d99

Please sign in to comment.