Skip to content

unclutter: unbreak on gcc 14, modernize - #396975

Closed
haylinmoore wants to merge 1 commit into
NixOS:masterfrom
haylinmoore:fix-unclutter
Closed

haylinmoore wants to merge 1 commit into
NixOS:masterfrom
haylinmoore:fix-unclutter

Conversation

@haylinmoore

Copy link
Copy Markdown
Contributor

#388196

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 This PR causes 1 package to rebuild on Darwin. 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 8, 2025
@nix-owners
nix-owners Bot requested a review from domenkozar April 8, 2025 02:07
@FliegendeWurst

Copy link
Copy Markdown
Member

Could modernize some more while we are here.

diff --git a/pkgs/by-name/un/unclutter/package.nix b/pkgs/by-name/un/unclutter/package.nix
index 6d2193e42d7e..a69a1bff8c4e 100644
--- a/pkgs/by-name/un/unclutter/package.nix
+++ b/pkgs/by-name/un/unclutter/package.nix
@@ -17,11 +17,17 @@ stdenv.mkDerivation rec {

   buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];

-  installPhase = ''
+  installFlags = [
+    "DESTDIR=${placeholder "out"}"
+    "BINDIR=${placeholder "out"}/bin"
+    "MANPATH=${placeholder "out"}/share/man"
+    "PREFIX="
+  ];
+  installTargets = [ "install" "install.man" ];
+
+  preInstall = ''
     mkdir -pv "$out/bin"
     mkdir -pv "$out/share/man/man1"
-    make DESTDIR="$out" BINDIR="$out/bin" PREFIX="" install
-    make DESTDIR="$out" MANPATH="$out/share/man" PREFIX="" install.man
   '';

   meta = with lib; {

preInstall could perhaps be removed too, did not test.

@Sigmanificient Sigmanificient mentioned this pull request Apr 25, 2025
27 of 28 tasks
@Sigmanificient Sigmanificient mentioned this pull request May 4, 2025
3 of 13 tasks
@rnhmjoj

rnhmjoj commented May 4, 2025

Copy link
Copy Markdown
Contributor

I'd rather avoid patching this software: it's been unchanged since 1995. Setting -std=c89 fixes the build.

@rnhmjoj

rnhmjoj commented May 7, 2025

Copy link
Copy Markdown
Contributor

I've incorporated @FliegendeWurst's changes and fixed the build without patching in #404065. If you're ok, I will close this PR and merge that.

@haylinmoore

Copy link
Copy Markdown
Contributor Author

go for it ! thanks

@haylinmoore haylinmoore closed this May 7, 2025
@haylinmoore
haylinmoore deleted the fix-unclutter branch May 7, 2025 19:40
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-darwin: 1 This PR causes 1 package 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.

3 participants