Skip to content

Modernize psutils and fix Darwin build#241869

Merged
wegank merged 3 commits intoNixOS:masterfrom
afh:modernize-psutils
Jul 6, 2023
Merged

Modernize psutils and fix Darwin build#241869
wegank merged 3 commits intoNixOS:masterfrom
afh:modernize-psutils

Conversation

@afh
Copy link
Copy Markdown
Member

@afh afh commented Jul 6, 2023

Description of changes

When building psutils using nix shell nixpkgs#psutils the build fails with exit code 2 gcc: command not found.

last 10 log lines
error: builder for '/nix/store/ax00m59llahk44w81698h92jnp9knhrs-psutils-17.drv' failed with exit code 2;
       last 10 log lines:
       > source root is psutils
       > setting SOURCE_DATE_EPOCH to timestamp 858120785 of file psutils/showchar.sh
       > patching sources
       > updateAutotoolsGnuConfigScriptsPhase
       > configuring
       > building
       > build flags: SHELL=/nix/store/mxvgjwzdvrl81plvgqnzbrqb14ccnji6-bash-5.2-p15/bin/bash
       > gcc -DPAPER=\"a4\" -DUNIX -O -Wall   -c -o psbook.o psbook.c
       > /nix/store/mxvgjwzdvrl81plvgqnzbrqb14ccnji6-bash-5.2-p15/bin/bash: line 1: gcc: command not found
       > make: *** [<builtin>: psbook.o] Error 127
       For full logs, run 'nix log /nix/store/ax00m59llahk44w81698h92jnp9knhrs-psutils-17.drv'

Adding makeFlags resolved the issue for me on aarch64-darwin.

❓ Should the makeFlags only be applied on Darwin or are they acceptable or even also desirable on other platforms?

Additionally I went ahead and "modernized" the package to the best of my knowledge and changed the src URL as the ftp URL timed out for me.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.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.

@afh afh mentioned this pull request Jul 6, 2023
13 tasks
@afh afh requested review from Profpatsch and Stunkymonkey July 6, 2023 09:33
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jul 6, 2023
@wegank
Copy link
Copy Markdown
Member

wegank commented Jul 6, 2023

Result of nixpkgs-review pr 241869 run on aarch64-darwin 1

1 package built:
  • psutils

@wegank
Copy link
Copy Markdown
Member

wegank commented Jul 6, 2023

@ofborg build psutils psutils.passthru.tests

@wegank wegank merged commit 76d44eb into NixOS:master Jul 6, 2023
@afh afh deleted the modernize-psutils branch July 6, 2023 17:39
@afh
Copy link
Copy Markdown
Member Author

afh commented Jul 6, 2023

Thanks for merging, @wegank, very much appreciated! This will be quite useful for folks like me wanting to use groff on Darwin with enableHtml = true 👍

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

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants