Loading pkgs/development/libraries/qt-6/default.nix +12 −3 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ let ./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch ./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch ./patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch ./patches/0008-qtbase-allow-translations-outside-prefix.patch ]; }; env = callPackage ./qt-env.nix { }; Loading Loading @@ -168,6 +169,14 @@ let # TODO(@Artturin): convert to makeScopeWithSplicing # simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01 self = lib.makeScope newScope addPackages; in self baseScope = lib.makeScope newScope addPackages; bootstrapScope = baseScope.overrideScope'(final: prev: { qtbase = prev.qtbase.override { qttranslations = null; }; qtdeclarative = null; }); finalScope = baseScope.overrideScope'(final: prev: { qttranslations = bootstrapScope.qttranslations; }); in finalScope pkgs/development/libraries/qt-6/modules/qtbase.nix +2 −1 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ , libGL , debug ? false , developerBuild ? false , qttranslations ? null }: let Loading Loading @@ -233,7 +234,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.isDarwin [ # error: 'path' is unavailable: introduced in macOS 10.15 "-DQT_FEATURE_cxx17_filesystem=OFF" ]; ] ++ lib.optional (qttranslations != null) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations"; NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [ # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc" Loading pkgs/development/libraries/qt-6/modules/qttranslations.nix +2 −1 Original line number Diff line number Diff line Loading @@ -4,5 +4,6 @@ qtModule { pname = "qttranslations"; qtInputs = [ qttools ]; nativeBuildInputs = [ qttools ]; outputs = [ "out" ]; } pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch 0 → 100644 +13 −0 Original line number Diff line number Diff line diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index b45ec1d208..05f69c131b 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -30,7 +30,7 @@ function(qt_configure_process_path name default docstring) set(rel_path ".") elseif(rel_path MATCHES "^\.\./") # INSTALL_SYSCONFDIR is allowed to be outside the prefix. - if(NOT name STREQUAL "INSTALL_SYSCONFDIR") + if(NOT (name STREQUAL "INSTALL_SYSCONFDIR" OR name STREQUAL "INSTALL_TRANSLATIONSDIR")) message(FATAL_ERROR "Path component '${name}' is outside computed install prefix: ${rel_path} ") return() pkgs/development/libraries/qt-6/qtModule.nix +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ stdenv.mkDerivation (args // { buildInputs = args.buildInputs or [ ]; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ] ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); propagatedBuildInputs = (args.qtInputs or [ ]) ++ (args.propagatedBuildInputs or [ ]); moveToDev = false; Loading Loading
pkgs/development/libraries/qt-6/default.nix +12 −3 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ let ./patches/0005-qtbase-deal-with-a-font-face-at-index-0-as-Regular-f.patch ./patches/0006-qtbase-qt-cmake-always-use-cmake-from-path.patch ./patches/0007-qtbase-find-qt-tools-in-QTTOOLSPATH.patch ./patches/0008-qtbase-allow-translations-outside-prefix.patch ]; }; env = callPackage ./qt-env.nix { }; Loading Loading @@ -168,6 +169,14 @@ let # TODO(@Artturin): convert to makeScopeWithSplicing # simple example of how to do that in 5568a4d25ca406809530420996d57e0876ca1a01 self = lib.makeScope newScope addPackages; in self baseScope = lib.makeScope newScope addPackages; bootstrapScope = baseScope.overrideScope'(final: prev: { qtbase = prev.qtbase.override { qttranslations = null; }; qtdeclarative = null; }); finalScope = baseScope.overrideScope'(final: prev: { qttranslations = bootstrapScope.qttranslations; }); in finalScope
pkgs/development/libraries/qt-6/modules/qtbase.nix +2 −1 Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ , libGL , debug ? false , developerBuild ? false , qttranslations ? null }: let Loading Loading @@ -233,7 +234,7 @@ stdenv.mkDerivation rec { ] ++ lib.optionals stdenv.isDarwin [ # error: 'path' is unavailable: introduced in macOS 10.15 "-DQT_FEATURE_cxx17_filesystem=OFF" ]; ] ++ lib.optional (qttranslations != null) "-DINSTALL_TRANSLATIONSDIR=${qttranslations}/translations"; NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [ # Undefined symbols for architecture arm64: "___gss_c_nt_hostbased_service_oid_desc" Loading
pkgs/development/libraries/qt-6/modules/qttranslations.nix +2 −1 Original line number Diff line number Diff line Loading @@ -4,5 +4,6 @@ qtModule { pname = "qttranslations"; qtInputs = [ qttools ]; nativeBuildInputs = [ qttools ]; outputs = [ "out" ]; }
pkgs/development/libraries/qt-6/patches/0008-qtbase-allow-translations-outside-prefix.patch 0 → 100644 +13 −0 Original line number Diff line number Diff line diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index b45ec1d208..05f69c131b 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -30,7 +30,7 @@ function(qt_configure_process_path name default docstring) set(rel_path ".") elseif(rel_path MATCHES "^\.\./") # INSTALL_SYSCONFDIR is allowed to be outside the prefix. - if(NOT name STREQUAL "INSTALL_SYSCONFDIR") + if(NOT (name STREQUAL "INSTALL_SYSCONFDIR" OR name STREQUAL "INSTALL_TRANSLATIONSDIR")) message(FATAL_ERROR "Path component '${name}' is outside computed install prefix: ${rel_path} ") return()
pkgs/development/libraries/qt-6/qtModule.nix +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ stdenv.mkDerivation (args // { buildInputs = args.buildInputs or [ ]; nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ] ++ lib.optionals stdenv.isDarwin [ moveBuildTree ]; propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]); propagatedBuildInputs = (args.qtInputs or [ ]) ++ (args.propagatedBuildInputs or [ ]); moveToDev = false; Loading