Skip to content

all-packages: move aliases to aliases.nix#39686

Merged
matthewbauer merged 9 commits intoNixOS:stagingfrom
matthewbauer:new-aliases
May 1, 2018
Merged

all-packages: move aliases to aliases.nix#39686
matthewbauer merged 9 commits intoNixOS:stagingfrom
matthewbauer:new-aliases

Conversation

@matthewbauer
Copy link
Member

Lots of aliases have been left over. This is a massive edit that
changes many random lines.

Another spinoff from #39515.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be super?

Copy link
Member Author

Choose a reason for hiding this comment

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

aliases is called with "import ./aliases.nix super" - so I think it works okay. Not sure if this is incorrect though.

Copy link
Member

Choose a reason for hiding this comment

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

skipAliases is a nice idea, like -Wcompat for GHC.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we could even put a warning in aliases as well. It would probably be too annoying right now though- aliases are still used extensively in Nixpkgs.

@oxij
Copy link
Member

oxij commented May 1, 2018 via email

@globin
Copy link
Member

globin commented May 1, 2018

@oxij from the diff that looks like it's on purpose to align it with the unversioned ant attribute.

@matthewbauer feel free to hit merge after resolving conflicts!

@GrahamcOfBorg GrahamcOfBorg removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 1, 2018
@matthewbauer matthewbauer force-pushed the new-aliases branch 3 times, most recently from 728613a to af64a0a Compare May 1, 2018 15:27
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels May 1, 2018
@matthewbauer
Copy link
Member Author

In case anyone is interested, here is the script I'm using to find dupes in all-packaages.nix:

grep 'callPackage ' pkgs/top-level/all-packages.nix | sed 's,^.*callPackage ,,' | sed 's, .*,,' | sort | uniq -d

@GrahamcOfBorg GrahamcOfBorg added the 2.status: merge conflict This PR has merge conflicts with the target branch label May 1, 2018
Lots of aliases have been left over. This is a massive edit that
changes many random lines.
If an alias is already defined in all-packages.nix, we want to throw
an error to make it obvious that something is wrong. Otherwise there
is no way to realize that the alias is shadowing the real definition.
You can turn on this config option if you want to find references to
aliases in Nixpkgs. Ideally these can be removed from Nixpkgs and
eventually we can remove the alias altogether.
Overrides should only be on the "default" package not the other way around.
@matthewbauer matthewbauer changed the base branch from master to staging May 1, 2018 18:55
@matthewbauer
Copy link
Member Author

@GrahamcOfBorg eval

I am reverting two name changes that might not be a good idea:

- gnum4 → m4
- apacheAnt → ant

These are debatable changes & not sure what’s best. I prefered the
short version because there are not alternatives- but will not hold
off for now.
@GrahamcOfBorg GrahamcOfBorg added 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: printing Drivers, CUPS & Co. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: stdenv Standard environment 6.topic: xfce The Xfce Desktop Environment 8.has: documentation This PR adds or changes documentation 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: printing Drivers, CUPS & Co. 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: ruby A dynamic, open source programming language with a focus on simplicity and productivity. 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 6.topic: stdenv Standard environment 6.topic: xfce The Xfce Desktop Environment 8.has: documentation This PR adds or changes documentation labels May 1, 2018
@matthewbauer matthewbauer merged commit e9be7fc into NixOS:staging May 1, 2018
@matthewbauer
Copy link
Member Author

@volth Yes I can definitely see the case w.r.t. mysql. Feel free to move any back that don't make sense. It's hard to make that judgement on so many aliases. My basic rule was to leave any "versioned" attributes but that was the only exception.

@matthewbauer
Copy link
Member Author

matthewbauer commented Jun 1, 2018

A thumb rule could be buildability of nixpkgs with config.skipAliases = true.

I would agree at least if you substitute "buildability" with "eval". Aliases should not affect the building of anything.

Right now I think skipAliases will always fail but we can definitely improve that.

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

Labels

8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants