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

treewide: get rid of platforms.allBut #36985

Merged
merged 1 commit into from Mar 14, 2018

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Mar 14, 2018

Motivation for this change

Negative reasoning like allBut is a bad idea with an open world of platforms. Concretely, if we add a new, quite different sort of platform, existing packages with allBut will claim they work on it even though they probably won't.

Also, there's no good/cheap way to implement this with a #34444 strategy.

all is also bad, but at least as a good constructive interpretation of "I work everywhere because I require nothing; so give me nothing". Relatedly, everything we have left can be expressed with horn clauses, allBut couldn't be.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
description = "Binary decision diagram package";
license = "as-is";

platforms = with stdenv.lib.platforms; allBut cygwin;
platforms = stdenv.lib.platforms.unix; # Once had cygwin problems
Copy link
Member Author

Choose a reason for hiding this comment

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

unix is actually exactly allBut cygwin today, but comment is still good because cygwin probably should be considered Unix and Windows.

@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
description = "Numix icon theme (square version)";
homepage = https://numixproject.org;
license = licenses.gpl3;
platforms = with platforms; allBut darwin;
platforms = platforms.linux; # Maybe other non-darwin Unix
Copy link
Member Author

Choose a reason for hiding this comment

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

Concretely this now is claimed not work on the BSDs, but that stdenv has bitrotted anyways.

Copy link
Member

@shlevy shlevy left a comment

Choose a reason for hiding this comment

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

Haven't looked through the details, but 💯 on the concept.

@@ -37,7 +37,9 @@ stdenv.mkDerivation rec {
description = "A GTK2 image viewer, manga reader, and booru browser";
maintainers = with maintainers; [ skrzyp xzfc ];
license = licenses.mit;
platforms = platforms.allBut [ "darwin" "cygwin" ];
# Unintentionally not working on Darwin:
# https://github.com/ahodesuka/ahoviewer/issues/63
Copy link
Member

Choose a reason for hiding this comment

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

That's a dead link ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

ahodesuka/ahoviewer#62 wow I incremented it somehow?

Negative reasoning like `allBut` is a bad idea with an open world of
platforms. Concretely, if we add a new, quite different sort of
platform, existing packages with `allBut` will claim they work on it
even though they probably won't.
@Ericson2314 Ericson2314 merged commit 2e87550 into NixOS:master Mar 14, 2018
@Ericson2314 Ericson2314 deleted the no-allBut branch March 14, 2018 22:57
@Ericson2314
Copy link
Member Author

@dezgeg oh as it turned out, this achieved some of #7846

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

Successfully merging this pull request may close these issues.

None yet

4 participants