···11+# Qt 5 Maintainer's Notes
22+33+## Minor Updates
44+55+Let `$major` be the major version number, e.g. `5.9`.
66+77+1. Change the version number in the `$major/fetch.sh`.
88+2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/qt-5/$major`
99+ from the top of the Nixpkgs tree.
1010+1111+See below if it is necessary to update any patches.
1212+1313+## Major Updates
1414+1515+Let `$major` be the new major version number, e.g. `5.10`.
1616+1717+1. Copy the subdirectory from the previous major version to `$major`.
1818+2. Change the version number in `$major/fetch.sh`.
1919+3. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/development/qt-5/$major`
2020+ from the top of the Nixpkgs tree.
2121+4. Add a top-level attribute in `pkgs/top-level/all-packages.nix` for the new
2222+ major version.
2323+5. Change the `qt5` top-level attribute to point to the new major version.
2424+6. If the previous major version is _not_ a long-term support release,
2525+ remove it from Nixpkgs.
2626+2727+See below if it is necessary to update any patches.
2828+2929+## Patches
3030+3131+Nixpkgs maintains several patches for Qt which cannot be submitted upstream. To
3232+facilitate maintenance, a fork of the upstream repository is created for each patched module:
3333+3434+- [qtbase](https://github.com/ttuegel/qtbase)
3535+- [qtwebkit](https://github.com/ttuegel/qtwebkit)
3636+- [qttools](https://github.com/ttuegel/qttools)
3737+- [qtscript](https://github.com/ttuegel/qtscript)
3838+- [qtserialport](https://github.com/ttuegel/qtserialport)
3939+- [qtdeclarative](https://github.com/ttuegel/qtdeclarative)
4040+- [qtwebengine](https://github.com/ttuegel/qtwebengine)
4141+4242+In each repository, the patches are contained in a branch named `nixpkgs/$major`
4343+for each major version. Please make a pull request to add or update any patch
4444+which will be maintained in Nixpkgs.
4545+4646+The forked repository for each module is used to create a single patch in
4747+Nixpkgs. To recreate the patch for module `$module` (e.g. `qtbase`) at version
4848+`$version` (e.g. `5.9.1`) in the branch `$major` (e.g. `5.9`),
4949+5050+1. Clone the fork for `$module` from the list above.
5151+2. Checkout the active branch, `git checkout nixpkgs/$major`.
5252+3. Compare the patched branch to the release tag,
5353+ `git diff v$version > $module.patch`.
5454+4. Copy `$module.patch` into the Nixpkgs tree.
5555+5656+### Minor Version Updates
5757+5858+To update module `$module` to version `$version` from an older version in the
5959+same branch `$major`,
6060+6161+1. Clone the fork for `$module` from the list above.
6262+2. Checkout the active branch, `git checkout nixpkgs/$major`.
6363+3. Merge the new version into the active branch,
6464+ `git merge --no-ff v$version`.
6565+4. Fix any conflicts.
6666+5. Open a pull request for the changes.
6767+6. Follow the instructions above to recreate the module patch in Nixpkgs.
6868+6969+### Major Version Updates
7070+7171+To update module `$module` from `$oldversion` in branch `$oldmajor` to version
7272+`$version` in branch `$major`,
7373+7474+1. Clone the fork for `$module` from the list above.
7575+2. Checkout a new branch for the new major version,
7676+ `git checkout -b nixpkgs/$major nixpkgs/$oldmajor`.
7777+3. Rebase the patches from `$oldversion` onto the new branch,
7878+ `git rebase v$oldversion --onto v$version`.
7979+4. Fix any conflicts.
8080+5. Open a pull request for the changes.
8181+6. Follow the instructions above to recreate the module patch in Nixpkgs.