Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4bca7dfb2716
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f38d3df11c5b
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jul 5, 2020

  1. Revert "cmake: only set output paths with multiple outputs"

    This reverts commit be1b225.
    
    The commit broke Qt modules using CMake because they disable setOutputFlags.
    
    There is no need to have these flags limited to multiple output derivations since it
    should just work. If it does not, it is a bug that should be fixed as per
    https://github.com/jtojnar/cmake-snips#assuming-cmake_install_dir-is-relative-path
    Likewise, having a variable to disable passing the flags is also unnecessary,
    since CMake, unlike some configure scripts, ignores unknown flags. And if a person
    does not like the values, they can just override them by passing the offending
    flag with a different value to cmakeFlags.
    jtojnar committed Jul 5, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    cfe7e12 View commit details
  2. Revert "qt5.qtwebkit: Fix paths in pc files"

    This reverts commit dee7377.
    jtojnar committed Jul 5, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    f38d3df View commit details
Showing with 13 additions and 20 deletions.
  1. +0 −3 pkgs/development/libraries/qt-5/modules/qtwebkit.nix
  2. +13 −17 pkgs/development/tools/build-managers/cmake/setup-hook.sh
3 changes: 0 additions & 3 deletions pkgs/development/libraries/qt-5/modules/qtwebkit.nix
Original file line number Diff line number Diff line change
@@ -34,9 +34,6 @@ qtModule {
bison flex gdb gperf perl pkgconfig python2 ruby
] ++ optional usingAnnulenWebkitFork cmake;

# Temporary fix for https://github.com/NixOS/nixpkgs/commit/be1b22538a60e52987d238bb11f93043682b6e9a
setOutputFlags = true;

cmakeFlags = optionals usingAnnulenWebkitFork ([ "-DPORT=Qt" ]
++ optionals stdenv.isDarwin [
"-DQt5Multimedia_DIR=${getDev qtmultimedia}/lib/cmake/Qt5Multimedia"
30 changes: 13 additions & 17 deletions pkgs/development/tools/build-managers/cmake/setup-hook.sh
Original file line number Diff line number Diff line change
@@ -68,24 +68,19 @@ cmakeConfigurePhase() {
# nix/store directory.
cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=${!outputLib}/lib $cmakeFlags"

if [ "$outputs" != "out" -a -n "${setOutputFlags-1}" ]; then
# This ensures correct paths with multiple output derivations
# It requires the project to use variables from GNUInstallDirs module
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
cmakeFlags="-DCMAKE_INSTALL_BINDIR=${!outputBin}/bin $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_SBINDIR=${!outputBin}/sbin $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputInclude}/include $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_OLDINCLUDEDIR=${!outputInclude}/include $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_MANDIR=${!outputMan}/share/man $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_INFODIR=${!outputInfo}/share/info $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_DOCDIR=${!outputDoc}/share/doc/${shareDocName} $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_LIBEXECDIR=${!outputLib}/libexec $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags"
fi

# This output flag must always be set, unlike the others, because
# otherwise we end up with lib64.
# This ensures correct paths with multiple output derivations
# It requires the project to use variables from GNUInstallDirs module
# https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
cmakeFlags="-DCMAKE_INSTALL_BINDIR=${!outputBin}/bin $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_SBINDIR=${!outputBin}/sbin $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_INCLUDEDIR=${!outputInclude}/include $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_OLDINCLUDEDIR=${!outputInclude}/include $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_MANDIR=${!outputMan}/share/man $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_INFODIR=${!outputInfo}/share/info $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_DOCDIR=${!outputDoc}/share/doc/${shareDocName} $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_LIBDIR=${!outputLib}/lib $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_LIBEXECDIR=${!outputLib}/libexec $cmakeFlags"
cmakeFlags="-DCMAKE_INSTALL_LOCALEDIR=${!outputLib}/share/locale $cmakeFlags"

# Don’t build tests when doCheck = false
if [ -z "${doCheck-}" ]; then
@@ -120,6 +115,7 @@ cmakeConfigurePhase() {
}

if [ -z "${dontUseCmakeConfigure-}" -a -z "${configurePhase-}" ]; then
setOutputFlags=
configurePhase=cmakeConfigurePhase
fi