Skip to content

treewide: stdenv.lib -> lib #109455

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

Merged
merged 1 commit into from
Jan 16, 2021
Merged

treewide: stdenv.lib -> lib #109455

merged 1 commit into from
Jan 16, 2021

Conversation

siraben
Copy link
Member

@siraben siraben commented Jan 15, 2021

Motivation for this change

Part of #108938.

I wasn't doing sed with /g, so here's the fix. Proof:

$ rg 'stdenv\.lib' pkgs/applications | wc -l
0
$ rg 'stdenv\.lib' pkgs/desktops | wc -l
0
$ rg 'stdenv\.lib' pkgs/data | wc -l
0
$ rg 'stdenv\.lib' pkgs/desktops | wc -l
0
$ rg 'stdenv\.lib' pkgs/games | wc -l
0
$ rg 'stdenv\.lib' pkgs/misc | wc -l
0
$ rg 'stdenv\.lib' pkgs/shells | wc -l
0
$ rg 'stdenv\.lib' pkgs/tools | wc -l
0
$ rg 'stdenv\.lib' pkgs/top-level | wc -l
0

I have not performed the change to pkgs/development which has over 30K occurrences of stdenv.lib

$ rg 'stdenv\.lib' pkgs/development | wc -l
30598

@siraben siraben changed the title Remove stdenv lib treewide: stdenv.lib -> lib Jan 15, 2021
@ofborg ofborg bot added 6.topic: cinnamon Desktop environment 6.topic: emacs Text editor 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: pantheon The Pantheon desktop environment 6.topic: printing 6.topic: vim 6.topic: xfce The Xfce Desktop Environment 8.has: documentation This PR adds or changes documentation labels Jan 15, 2021
@siraben siraben force-pushed the remove-stdenv-lib branch 11 times, most recently from 54c145d to 38784cf Compare January 15, 2021 16:47
@siraben
Copy link
Member Author

siraben commented Jan 16, 2021

@SuperSandro2000 The mass rebuild is because of whitespace changes in the phases, again.

@siraben
Copy link
Member Author

siraben commented Jan 16, 2021

Rebased on master again because of my other treewide PR. If looks good, I will squash the two commits.

@Mic92
Copy link
Member

Mic92 commented Jan 16, 2021

/rebase-staging

@github-actions github-actions bot changed the base branch from master to staging January 16, 2021 12:44
@SuperSandro2000
Copy link
Member

There are under 100 rebuilds. I think that could have gone straight to master.

@Mic92
Copy link
Member

Mic92 commented Jan 16, 2021

Right. I missed that the mass-rebuild was removed.

@siraben
Copy link
Member Author

siraben commented Jan 16, 2021

Reverted back to badf512.

@siraben siraben changed the base branch from staging to master January 16, 2021 13:11
@Mic92 Mic92 merged commit d8d06d1 into NixOS:master Jan 16, 2021
@siraben siraben deleted the remove-stdenv-lib branch January 16, 2021 16:18
@SuperSandro2000 SuperSandro2000 mentioned this pull request Jan 17, 2021
10 tasks
@archseer
Copy link
Member

This breaks in certain places where lib wasn't imported:

error: --- UndefinedVarError ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ nix
at: (3:8) in file: /nix/store/qh1497vqx38yl6qcpdgf83jd45i96ahi-source/pkgs/applications/editors/kakoune/plugins/kak-fzf.nix

     2|
     3| assert lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];
      |        ^

{ stdenv, fetchFromGitHub, fzf }:
assert lib.asserts.assertOneOf "fzf" fzf.pname [ "fzf" "skim" ];

@jonringer
Copy link
Contributor

@archseer although unfortunate, these changes are hard to review due to the massive scope, I'll create a PR to fix the affected packages

@SuperSandro2000
Copy link
Member

Those plugins are not evaluated by ofborg so this could happen with every treewide PR. I suggest to add them to evaluation do we noticed such regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cinnamon Desktop environment 6.topic: emacs Text editor 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: pantheon The Pantheon desktop environment 6.topic: printing 6.topic: vim 6.topic: xfce The Xfce Desktop Environment 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants