diff options
author | Nick Cao <nickcao@nichi.co> | 2023-04-11 12:44:52 +0800 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2023-04-11 15:40:56 +0800 |
commit | bf30644a3d9d5aeb6b4c145bbb2639d454484069 (patch) | |
tree | 408d2b6cba83744220fa47cbfb297cc09884d1be /pkgs/development/libraries | |
parent | 290c0ce1aeb759525d9a9e23f21cba3bb9b29a13 (diff) | |
download | nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.tar nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.tar.gz nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.tar.bz2 nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.tar.lz nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.tar.xz nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.tar.zst nixpkgs-bf30644a3d9d5aeb6b4c145bbb2639d454484069.zip |
qt6.qtModule: drop fixup handlings
As they are either already part of the qtbase setupHook, or no longer required as we are building qt components with cmake.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/qt-6/modules/qtwebengine.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-6/qtModule.nix | 67 |
2 files changed, 15 insertions, 56 deletions
diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix index 22d1e497f4f..a8f69a5659e 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -226,9 +226,9 @@ qtModule { export NINJAFLAGS="-j$NIX_BUILD_CORES" ''; - postInstall = '' + postFixup = '' # This is required at runtime - mkdir $out/libexec + mkdir -p $out/libexec mv $dev/libexec/QtWebEngineProcess $out/libexec ''; diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index 4a149108e07..8efbfdece4c 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -1,4 +1,11 @@ -{ stdenv, lib, perl, cmake, ninja, writeText, qtbase, qmake, srcs, patches ? [ ] }: +{ lib +, stdenv +, cmake +, ninja +, perl +, srcs +, patches ? [ ] +}: args: @@ -11,68 +18,20 @@ stdenv.mkDerivation (args // { inherit pname version src; patches = args.patches or patches.${pname} or [ ]; - buildInputs = args.buildInputs or [ ]; - nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ - perl - cmake - ninja - qmake - ]; - propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); - preHook = '' . ${./hooks/move-qt-dev-tools.sh} - . ${./hooks/fix-qt-builtin-paths.sh} ''; + buildInputs = args.buildInputs or [ ]; + nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ]; + propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); + outputs = args.outputs or [ "out" "dev" ]; dontWrapQtApps = args.dontWrapQtApps or true; - postInstall = '' - if [ ! -z "$dev" ]; then - mkdir "$dev" - for dir in libexec mkspecs - do - moveToOutput "$dir" "$dev" - done - fi - fixQtBuiltinPaths $out/lib "*.pr?" - ${args.postInstall or ""} - ''; - - preConfigure = args.preConfigure or "" + '' - fixQtBuiltinPaths . '*.pr?' - '' + lib.optionalString (builtins.compareVersions "5.15.0" version <= 0) - # Note: We use ${version%%-*} to remove any tag from the end of the version - # string. Version tags are added by Nixpkgs maintainers and not reflected in - # the source version. - '' - if [[ -z "$dontCheckQtModuleVersion" ]] \ - && grep -q '^MODULE_VERSION' .qmake.conf 2>/dev/null \ - && ! grep -q -F "''${version%%-*}" .qmake.conf 2>/dev/null - then - echo >&2 "error: could not find version ''${version%%-*} in .qmake.conf" - echo >&2 "hint: check .qmake.conf and update the package version in Nixpkgs" - exit 1 - fi - - if [[ -z "$dontSyncQt" && -f sync.profile ]]; then - # FIXME: this probably breaks crosscompiling as it's not from nativeBuildInputs - # I don't know how to get /libexec from nativeBuildInputs to work, it's not under /bin - ${lib.getDev qtbase}/libexec/syncqt.pl -version "''${version%%-*}" - fi - ''; postFixup = '' - if [ -d "''${!outputDev}/lib/pkgconfig" ]; then - find "''${!outputDev}/lib/pkgconfig" -name '*.pc' | while read pc; do - sed -i "$pc" \ - -e "/^prefix=/ c prefix=''${!outputLib}" \ - -e "/^exec_prefix=/ c exec_prefix=''${!outputBin}" \ - -e "/^includedir=/ c includedir=''${!outputDev}/include" - done - fi - + moveToOutput "libexec" "''${!outputDev}" moveQtDevTools '' + args.postFixup or ""; |