all-packages: move aliases to aliases.nix#39686
Conversation
c9279bd to
8de6603
Compare
pkgs/top-level/aliases.nix
Outdated
There was a problem hiding this comment.
aliases is called with "import ./aliases.nix super" - so I think it works okay. Not sure if this is incorrect though.
pkgs/top-level/stage.nix
Outdated
There was a problem hiding this comment.
skipAliases is a nice idea, like -Wcompat for GHC.
There was a problem hiding this comment.
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.
|
Awesome.
I put the following into `check-sameness.nix`
```nix
with import ./nixpkgs/lib/default.nix;
let
pkgs = import ./nixpkgs/default.nix {};
pkgsA = import ./nixpkgs_old/default.nix {};
pkgsB = import ./nixpkgs_new/default.nix {};
a = pkgs.writeText "pkgsA-list" (concatStringsSep "\n" (attrNames pkgsA));
b = pkgs.writeText "pkgsB-list" (concatStringsSep "\n" (attrNames pkgsB));
in
pkgs.runCommand "pkgs-diff" {
inherit a b;
} ''
diff -Nua "$a" "$b" > $out || true
''
```
checked out before and after trees into `nixpkgs_old` and `nixpkgs_new`,
built the derivation, and got this:
```screen
--- /nix/store/<censored>-pkgsA-list 1970-01-01 00:00:01.000000000 +0000
+++ /nix/store/<censored>-pkgsB-list 1970-01-01 00:00:01.000000000 +0000
@@ -216,6 +216,7 @@
ansible_2_5
ansifilter
ant
+ant_1_9
antfs-cli
anthy
antigen
```
Is this a bug?
|
|
@oxij from the diff that looks like it's on purpose to align it with the unversioned @matthewbauer feel free to hit merge after resolving conflicts! |
728613a to
af64a0a
Compare
|
In case anyone is interested, here is the script I'm using to find dupes in all-packaages.nix: |
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.
|
@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.
|
@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. |
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. |
Lots of aliases have been left over. This is a massive edit that
changes many random lines.
Another spinoff from #39515.