Skip to content

Conversation

alexfmpe
Copy link
Member

@alexfmpe alexfmpe commented Feb 23, 2025

Used for #384127 , #384431, #397255

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 the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Feb 23, 2025
@alexfmpe alexfmpe changed the title Add script to sweep for unused overrides haskellPackages: add script to sweep for unused overrides Feb 23, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Feb 23, 2025
@alexfmpe alexfmpe marked this pull request as draft February 23, 2025 23:10
@alexfmpe alexfmpe assigned alexfmpe and unassigned alexfmpe Feb 23, 2025
@alexfmpe alexfmpe marked this pull request as ready for review February 23, 2025 23:25
Copy link
Member

@maralorn maralorn left a comment

Choose a reason for hiding this comment

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

Fancy, I assume you use something like this regularly?

I guess the worst this can do is bit-rot. So I am in favor.

@alexfmpe
Copy link
Member Author

Fancy, I assume you use something like this regularly?

Well it's a much better approach than my old "let's look at old enough overrides and see if they can be cleaned up".

I also just recently realised this could probably be re-purposed for doCheck on non-haskell packages

@alexfmpe alexfmpe force-pushed the sweep branch 2 times, most recently from b95473c to 66c376b Compare February 25, 2025 02:29
@alexfmpe alexfmpe marked this pull request as draft March 9, 2025 23:08
@alexfmpe alexfmpe mentioned this pull request Apr 10, 2025
2 tasks
@alexfmpe alexfmpe marked this pull request as ready for review April 15, 2025 00:18
@alexfmpe
Copy link
Member Author

Re-worked this so it's much more versatile. It's not particularly haskellPackages specific anymore, so maybe it can be placed elsewhere?

@alexfmpe
Copy link
Member Author

cc @wolfgangwalther

@maralorn
Copy link
Member

I feel it is good here. Why do you use overrideAttrs for doCheck and patches? We normally also control these via overrideCabal within nixpkgs.

@alexfmpe
Copy link
Member Author

Why do you use overrideAttrs for doCheck and patches? We normally also control these via overrideCabal within nixpkgs.

I had overrideCabal at start then noticed that doCheck and patches being arguments to mkDerivation meant the mechanism could also be used for derivations that aren't cabal packages

# Utils for sweeping through packages based on some property discoverable at eval time
# Useful for narrowing down package candidates on which to test some build time property
#
# Example 1: finding packages with patches that no longer apply
Copy link
Member

Choose a reason for hiding this comment

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

Arguably, here the better approach is to build srcOnly pkg and see whether it fails which is much cheaper.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any 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.

3 participants