Skip to content

fltk14: 1.4.x-2021-12-21 -> 1.4.4, refactor#401257

Merged
LordGrimmauld merged 2 commits intoNixOS:masterfrom
jchw-forks:fltk-update
Sep 26, 2025
Merged

fltk14: 1.4.x-2021-12-21 -> 1.4.4, refactor#401257
LordGrimmauld merged 2 commits intoNixOS:masterfrom
jchw-forks:fltk-update

Conversation

@jchv
Copy link
Contributor

@jchv jchv commented Apr 23, 2025

In the distant year of 2024, I filed #357462 then proceeded to never actually do it. I think it's about time to try to take care of this, hopefully prior to NixOS 25.05 branching off.

I think FLTK 1.3 and FLTK 1.4 have diverged enough to justify forking off the 1.4 derivation and getting rid of common.nix.

(Note: default.nix is almost entirely just what common.nix used to be, just with the values inlined. Unfortunately there's no real way to make the Git diff cleaner without changing the filename, which I opted to not do.)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Apr 23, 2025
@jchv jchv force-pushed the fltk-update branch 2 times, most recently from 7f90449 to 245137e Compare April 26, 2025 19:14
@jchv
Copy link
Contributor Author

jchv commented Apr 26, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401257


x86_64-linux

✅ 4 packages built:
  • fltk14
  • fltk14-minimal
  • fltk14.bin
  • fltk14.doc

aarch64-darwin

✅ 4 packages built:
  • fltk14
  • fltk14-minimal
  • fltk14.bin
  • fltk14.doc

@jchv jchv marked this pull request as ready for review April 26, 2025 19:22
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5432

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 17, 2025
@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 4, 2025
@petrzjunior
Copy link
Contributor

@jchv I stumbled upon this PR trying to update odamex package to the newest version, which requires FLTK 1.4. Would you mind rebasing the PR so that it can be merged?

Also FLTK 1.4.4 is out already.

@jchv
Copy link
Contributor Author

jchv commented Aug 24, 2025

Will try to get to this today. Sorry, it fell through the cracks it seems.

This is branched off of common.nix as FLTK 1.4.0 makes some fairly substantial changes that are difficult to reconcile across 1.3 and 1.4.
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 24, 2025
@jchv jchv changed the title fltk: 1.4.x-2021-12-21 -> 1.4.2, refactor fltk: 1.4.x-2021-12-21 -> 1.4.4, refactor Aug 24, 2025
@jchv
Copy link
Contributor Author

jchv commented Aug 24, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401257
Commit: 262e58e54fea1d7b74d6ff0f98eca353841046b7


x86_64-linux

✅ 4 packages built:
  • fltk14
  • fltk14-minimal
  • fltk14.bin
  • fltk14.doc

@jchv
Copy link
Contributor Author

jchv commented Aug 25, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401257


aarch64-darwin

✅ 5 packages built:
  • fltk14
  • fltk14-minimal
  • fltk14.bin
  • fltk14.doc
  • nixpkgs-manual

@jchv
Copy link
Contributor Author

jchv commented Aug 25, 2025

@petrzjunior It's updated to FLTK 1.4.4 now. Unfortunately it doesn't really seem like there's anyone really to review these changes, so it might still be kind of hard to get it merged. Obviously, feel free to review it yourself. Hopefully it won't stall so badly this time around.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5804

Copy link
Contributor

@eljamm eljamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the package in the title should be fltk14 and not fltk, since the former is the one being updated.

Other than that and a few small things, this LGTM.

Comment on lines +188 to +191
postFixup = ''
substituteInPlace $out/bin/fltk-config \
--replace "/$out/" "/"
'';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly, but it definitely is still needed. Without it:

$ ./result/bin/fltk-config --cc --libs
/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/gcc
/nix/store/8spr669m2almkln8crjpiv9vc88r9g53-fltk-1.4.4//nix/store/8spr669m2almkln8crjpiv9vc88r9g53-fltk-1.4.4/lib/libfltk.a

$ ./result/bin/fltk-config --cc --libs
/nix/store/bcw9f6r9v2fm3kv7d15fcrya0mf34xds-gcc-wrapper-14.3.0/bin/gcc
/nix/store/2w74z6yw8nh66dvhn541x0278rsgyxh6-fltk-1.3.8//nix/store/2w74z6yw8nh66dvhn541x0278rsgyxh6-fltk-1.3.8/lib/libfltk.a

I can't come up with a good comment explaining it because I haven't dug deep enough to truly understand what is causing that.

I'll make them both --replace-fails, at least.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no worries, then.

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 30, 2025
@jchv jchv changed the title fltk: 1.4.x-2021-12-21 -> 1.4.4, refactor fltk14: 1.4.x-2021-12-21 -> 1.4.4, refactor Aug 30, 2025
@jchv jchv force-pushed the fltk-update branch 2 times, most recently from bfa6d97 to 340342a Compare August 30, 2025 12:19
@jchv jchv requested a review from eljamm August 30, 2025 12:20
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Aug 30, 2025
@jchv
Copy link
Contributor Author

jchv commented Aug 31, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401257


aarch64-darwin

⏩ 24 packages marked as broken and skipped:
  • crowbar
  • crowbar.dist
  • ja2-stracciatella
  • librsb
  • minc_widgets
  • octavePackages.data-smoothing
  • octavePackages.econometrics
  • octavePackages.fem-fenics
  • octavePackages.fits
  • octavePackages.gsl
  • octavePackages.level-set
  • octavePackages.ltfat
  • octavePackages.ocl
  • octavePackages.optim
  • octavePackages.parallel
  • octavePackages.sparsersb
  • octavePackages.strings
  • octavePackages.tisean
  • octavePackages.vibes
  • octavePackages.vrml
  • tigervnc
  • vpv
  • zynaddsubfx-fltk
  • zynaddsubfx-fltk.doc
❌ 3 packages failed to build:
  • dillo-plus
  • octavePackages.geometry
  • octavePackages.mapping
✅ 68 packages built:
  • dillo
  • dillo.doc
  • dillo.man
  • flamp
  • fldigi
  • fltk
  • fltk-minimal
  • fltk.bin
  • fltk.doc
  • fltk14
  • fltk14-minimal
  • fltk14.bin
  • fltk14.doc
  • gama
  • gmsh
  • jupyter-all
  • nixpkgs-manual
  • octave
  • octaveFull
  • octavePackages.bim
  • octavePackages.bsltl
  • octavePackages.cgi
  • octavePackages.communications
  • octavePackages.control
  • octavePackages.database
  • octavePackages.dataframe
  • octavePackages.dicom
  • octavePackages.divand
  • octavePackages.doctest
  • octavePackages.financial
  • octavePackages.fpl
  • octavePackages.fuzzy-logic-toolkit
  • octavePackages.ga
  • octavePackages.general
  • octavePackages.generate_html
  • octavePackages.image
  • octavePackages.instrument-control
  • octavePackages.interval
  • octavePackages.io
  • octavePackages.linear-algebra
  • octavePackages.lssa
  • octavePackages.matgeom
  • octavePackages.miscellaneous
  • octavePackages.msh
  • octavePackages.mvn
  • octavePackages.nan
  • octavePackages.ncarray
  • octavePackages.netcdf
  • octavePackages.nurbs
  • octavePackages.octclip
  • octavePackages.octproj
  • octavePackages.optics
  • octavePackages.optiminterp
  • octavePackages.quaternion
  • octavePackages.queueing
  • octavePackages.signal
  • octavePackages.sockets
  • octavePackages.splines
  • octavePackages.statistics
  • octavePackages.stk
  • octavePackages.struct
  • octavePackages.symbolic
  • octavePackages.tsa
  • octavePackages.video
  • octavePackages.windows
  • octavePackages.zeromq
  • python312Packages.gmsh
  • python313Packages.gmsh

@jchv
Copy link
Contributor Author

jchv commented Aug 31, 2025

Yep, ok. The only "real" failures I'm getting on aarch64-darwin are pre-existing.

@eljamm
Copy link
Contributor

eljamm commented Aug 31, 2025

Yep, ok. The only "real" failures I'm getting on aarch64-darwin are pre-existing.

Nice. I also ran nixpkgs-review-gha again on Darwin, but with the sandbox off and it's giving me the same result.

Copy link
Contributor

@eljamm eljamm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, thanks!

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 31, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2539

@jchv
Copy link
Contributor Author

jchv commented Sep 24, 2025

Unfortunately, I don't really know what the most polite route would be to try to get this moving forward, but it sure would be nice before NixOS 25.11 branches off. FLTK has been stuck in time for quite a while, and I already tried the obvious things. Anyone on the cc list for this PR have any advice?

@LordGrimmauld LordGrimmauld self-requested a review September 24, 2025 16:36
@LordGrimmauld
Copy link
Contributor

fltk 1.3.8 is still needed for a couple things - does this PR by chance also fix the cmake build errors? the 1.3 version is going into freecad via gmsh, which is why i am interested in that.

@jchv
Copy link
Contributor Author

jchv commented Sep 24, 2025

Not aware of the CMake build issues you speak of, FLTK 1.3 and 1.4 both were building and working fine for me. This PR doesn't actually modify FLTK 1.3, it just splits the derivations out since the FLTK 1.4 configuration diverged from FLTK 1.3 enough that I felt it wasn't worth trying to maintain it in a unified way anymore (especially seeing as I'm sure eventually FLTK 1.3 will be dropped, even if not particularly soon.)

(This does technically cause the FLTK 1.3 derivation to be re-evaluated, but it's because I changed a --replace to a --replace-fail.)

Copy link
Contributor

@LordGrimmauld LordGrimmauld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look too bad, but there is a couple aspects that can imo be improved while we are here.


cmakeFlags = [
# Common
"-DFLTK_BUILD_SHARED_LIBS=${onOff (!stdenv.hostPlatform.isStatic)}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"-DFLTK_BUILD_SHARED_LIBS=${onOff (!stdenv.hostPlatform.isStatic)}"
(lib.cmakeBool "FLTK_BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))

cmakeBool is preferable over some custom thing. Obviously applies to the other options too.

libjpeg
libpng
]
++ lib.optionals stdenv.hostPlatform.isLinux [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
++ lib.optionals stdenv.hostPlatform.isLinux [
++ withXorg [

I would like options for xorg and wayland - a linux conditional is not super readable, and i am left guessing what it does.

]
++ lib.optionals withPango [
pango
];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could also add wayland support? Should only need wayland, wayland-protocols, and xkbcommon.

glew
]
++ lib.optionals stdenv.hostPlatform.isLinux [
fontconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log is complaining about missing expat for fontconfig

graphviz
];

buildInputs =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log is complaining about missing libsysprof-capture

];

postPatch = ''
patchShebangs documentation/make_*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake 4 compat would be nice, e.g. by substituteInPlace if upstream doesn't maintain 1.3.x anymore

cmake 4 is currently in staging-next, failures and fixes are tracked in #445447. The hydra failure for fltk can be seen here: https://hydra.nixos.org/build/308206733/nixlog/1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image There is more failures on the way to freecad, but fltk is among them, which is why i went looking for open fltk PRs in the first place XD

@eljamm
Copy link
Contributor

eljamm commented Sep 26, 2025

Doesn't look too bad, but there is a couple aspects that can imo be improved while we are here.

Thanks for your review, @LordGrimmauld. While improvements are nice, I think we should limit the scope of this PR to splitting fltk, else it can become difficult to review and therefore merge. Then I believe, we can address the package failure and your suggestions in a followup PR.

(This does technically cause the FLTK 1.3 derivation to be re-evaluated, but it's because I changed a --replace to a --replace-fail.)

If you'd like, we can undo this change so that we keep 0 rebuilds, then include it again in the followup. Perhaps this can help merge this PR faster since it's just a refactor.

@LordGrimmauld
Copy link
Contributor

While improvements are nice, I think we should limit the scope of this PR to splitting fltk, else it can become difficult to review and therefore merge. Then I believe, we can address the package failure and your suggestions in a followup PR.

Fair enough. If i merge and open a follow-up, will you review that?

@eljamm
Copy link
Contributor

eljamm commented Sep 26, 2025

While improvements are nice, I think we should limit the scope of this PR to splitting fltk, else it can become difficult to review and therefore merge. Then I believe, we can address the package failure and your suggestions in a followup PR.

Fair enough. If i merge and open a follow-up, will you review that?

Yup, absolutely.

@jchv
Copy link
Contributor Author

jchv commented Sep 26, 2025

Sorry, I have plenty of time to work on this currently, I'm just bad at multi-tasking. @eljamm I'll go ahead and at least revert the --replace-fail change so that we can avoid the re-evals. @LordGrimmauld All of the proposed changes here SGTM but if you want to do the follow-up obviously that's good with me. I can lend a review.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. labels Sep 26, 2025
@jchv
Copy link
Contributor Author

jchv commented Sep 26, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 401257
Commit: a865b22a6e3c7a225afc83690a198cd84dd5bac1


x86_64-linux

⏩ 15 packages marked as broken and skipped:
  • haskellPackages.Chart-fltkhs
  • haskellPackages.Chart-fltkhs.doc
  • haskellPackages.fltkhs
  • haskellPackages.fltkhs-demos
  • haskellPackages.fltkhs-demos.doc
  • haskellPackages.fltkhs-fluid-demos
  • haskellPackages.fltkhs-fluid-demos.doc
  • haskellPackages.fltkhs-fluid-examples
  • haskellPackages.fltkhs-fluid-examples.doc
  • haskellPackages.fltkhs-hello-world
  • haskellPackages.fltkhs-hello-world.doc
  • haskellPackages.fltkhs-themes
  • haskellPackages.fltkhs-themes.data
  • haskellPackages.fltkhs-themes.doc
  • haskellPackages.fltkhs.doc
✅ 4 packages built:
  • fltk14
  • fltk14-minimal
  • fltk14.bin
  • fltk14.doc

@LordGrimmauld
Copy link
Contributor

Okay, i have my fltk fixes ready locally (built on top of this). Will merge and open my PR in the interest of not stalling this with bike sheds.

@LordGrimmauld LordGrimmauld added this pull request to the merge queue Sep 26, 2025
Merged via the queue into NixOS:master with commit c8bb686 Sep 26, 2025
30 of 33 checks passed
@LordGrimmauld
Copy link
Contributor

Follow-up in #446331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants