Loading pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +5 −3 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ else # Only set up Qt once. local lib="${!outputLib}" moveToOutput "mkspecs" "$dev" moveToOutput "modules" "$dev" moveToOutput "lib/*.prl" "$dev" if [ -d "$dev/mkspecs/modules" ]; then fixQtModulePaths "$dev/mkspecs/modules" Loading @@ -68,8 +70,8 @@ else # Only set up Qt once. fixQtBuiltinPaths "$dev/mkspecs" '*.pr?' fi if [ -d "$lib" ]; then fixQtBuiltinPaths "$lib" '*.pr?' if [ -d "$dev/lib" ]; then fixQtBuiltinPaths "$dev/lib" '*.pr?' fi } if [ -z "${dontPatchMkspecs-}" ]; then Loading pkgs/development/libraries/qt-6/modules/qtbase.nix +6 −8 Original line number Diff line number Diff line Loading @@ -233,10 +233,6 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; postInstall = '' moveToOutput "mkspecs" "$dev" ''; devTools = [ "libexec/moc" "libexec/rcc" Loading Loading @@ -264,10 +260,12 @@ stdenv.mkDerivation rec { ]; postFixup = '' # Don't retain build-time dependencies like gdb. sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri fixQtModulePaths "''${!outputDev}/mkspecs/modules" fixQtBuiltinPaths "''${!outputDev}" '*.pr?' moveToOutput "mkspecs" "$dev" moveToOutput "modules" "$dev" moveToOutput "lib/*.prl" "$dev" fixQtModulePaths "$dev/mkspecs/modules" fixQtBuiltinPaths "$dev" '*.pr?' # Move development tools to $dev moveQtDevTools Loading pkgs/development/libraries/qt-6/modules/qtwebengine.nix +2 −2 Original line number Diff line number Diff line Loading @@ -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 ''; Loading pkgs/development/libraries/qt-6/qtModule.nix +13 −54 Original line number Diff line number Diff line { stdenv, lib, perl, cmake, ninja, writeText, qtbase, qmake, srcs, patches ? [ ] }: { lib , stdenv , cmake , ninja , perl , srcs , patches ? [ ] }: args: Loading @@ -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 ""; Loading Loading
pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh +5 −3 Original line number Diff line number Diff line Loading @@ -59,6 +59,8 @@ else # Only set up Qt once. local lib="${!outputLib}" moveToOutput "mkspecs" "$dev" moveToOutput "modules" "$dev" moveToOutput "lib/*.prl" "$dev" if [ -d "$dev/mkspecs/modules" ]; then fixQtModulePaths "$dev/mkspecs/modules" Loading @@ -68,8 +70,8 @@ else # Only set up Qt once. fixQtBuiltinPaths "$dev/mkspecs" '*.pr?' fi if [ -d "$lib" ]; then fixQtBuiltinPaths "$lib" '*.pr?' if [ -d "$dev/lib" ]; then fixQtBuiltinPaths "$dev/lib" '*.pr?' fi } if [ -z "${dontPatchMkspecs-}" ]; then Loading
pkgs/development/libraries/qt-6/modules/qtbase.nix +6 −8 Original line number Diff line number Diff line Loading @@ -233,10 +233,6 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; postInstall = '' moveToOutput "mkspecs" "$dev" ''; devTools = [ "libexec/moc" "libexec/rcc" Loading Loading @@ -264,10 +260,12 @@ stdenv.mkDerivation rec { ]; postFixup = '' # Don't retain build-time dependencies like gdb. sed '/QMAKE_DEFAULT_.*DIRS/ d' -i $dev/mkspecs/qconfig.pri fixQtModulePaths "''${!outputDev}/mkspecs/modules" fixQtBuiltinPaths "''${!outputDev}" '*.pr?' moveToOutput "mkspecs" "$dev" moveToOutput "modules" "$dev" moveToOutput "lib/*.prl" "$dev" fixQtModulePaths "$dev/mkspecs/modules" fixQtBuiltinPaths "$dev" '*.pr?' # Move development tools to $dev moveQtDevTools Loading
pkgs/development/libraries/qt-6/modules/qtwebengine.nix +2 −2 Original line number Diff line number Diff line Loading @@ -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 ''; Loading
pkgs/development/libraries/qt-6/qtModule.nix +13 −54 Original line number Diff line number Diff line { stdenv, lib, perl, cmake, ninja, writeText, qtbase, qmake, srcs, patches ? [ ] }: { lib , stdenv , cmake , ninja , perl , srcs , patches ? [ ] }: args: Loading @@ -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 ""; Loading