Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdf4: modernize, fix cross #348334

Merged
merged 3 commits into from
Nov 5, 2024
Merged

hdf4: modernize, fix cross #348334

merged 3 commits into from
Nov 5, 2024

Conversation

TomaSajt
Copy link
Contributor

@TomaSajt TomaSajt commented Oct 13, 2024

  • format
  • use hash
  • use finalAttrs
  • use --replace-fail
  • use lib.cmake* utility functions
    • the logic was changed a bit: if a toggle is disabled, the cmake flag is set to false instead of being unset.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Copy link
Member

@knedlsepp knedlsepp left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup!

@knedlsepp
Copy link
Member

@NixOS/nixpkgs-merge-bot merge

@nixpkgs-merge-bot
Copy link
Contributor

@knedlsepp merge not permitted (#305350):
pkgs/tools/misc/hdf4/default.nix is not in pkgs/by-name/

@knedlsepp
Copy link
Member

@knedlsepp merge not permitted (#305350): pkgs/tools/misc/hdf4/default.nix is not in pkgs/by-name/

Alright, then we'll have to wait for someone with commit bit. 😄

@TomaSajt
Copy link
Contributor Author

@knedlsepp merge not permitted (#305350):
pkgs/tools/misc/hdf4/default.nix is not in pkgs/by-name/

Other than being in pkgs/by-name, IIRC the PR has to be made by r-ryantm (the auto-update bot) to be mergeable with the merge bot.

"-DHDF4_ENABLE_JPEG_LIB_SUPPORT=ON"
"-DHDF4_ENABLE_NETCDF=${if netcdfSupport then "ON" else "OFF"}"
"-DHDF4_ENABLE_Z_LIB_SUPPORT=ON"
"-DJPEG_DIR=${libjpeg}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It turns out JPEG_DIR no longer does anything, so I removed it. Maybe the library detection got better.

@TomaSajt TomaSajt mentioned this pull request Oct 14, 2024
13 tasks
@TomaSajt
Copy link
Contributor Author

TomaSajt commented Oct 14, 2024

I also included and improved the cross-compilation fixes from #348319

If you're using x86_64-linux you can try
nix-build -A pkgsCross.aarch64-multiplatform.hdf4 (doesn't have emulation)
nix-build -A pkgsCross.gnu32.hdf4 (has emulation)

@TomaSajt TomaSajt changed the title hdf4: modernize hdf4: modernize, fix cross Oct 14, 2024
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Oct 14, 2024
@ofborg ofborg bot requested a review from knedlsepp October 14, 2024 20:53
@jtojnar jtojnar merged commit cf8ec68 into NixOS:master Nov 5, 2024
34 checks passed
@GaetanLepage
Copy link
Contributor

This commit has broken python3Packages.gdal on all platforms.

@GaetanLepage
Copy link
Contributor

I would strongly encourage you to run nixpkgs-review before merging PRs as much as possible. I know that it is not always feasible. Here it would have prevented a somewhat unnecessary breakage of several packages.

@TomaSajt
Copy link
Contributor Author

TomaSajt commented Nov 6, 2024

Sorry about this...
Opened #353979

@GaetanLepage
Copy link
Contributor

Sorry about this...
Opened #353979

No worry, thanks for the quick reaction :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants