Skip to content

Comments

[RFC 140 2b] pkgs/by-name: Automated migration#211832

Draft
infinisil wants to merge 10 commits intoNixOS:masterfrom
nixpkgs-architecture:auto-calling
Draft

[RFC 140 2b] pkgs/by-name: Automated migration#211832
infinisil wants to merge 10 commits intoNixOS:masterfrom
nixpkgs-architecture:auto-calling

Conversation

@infinisil
Copy link
Member

@infinisil infinisil commented Jan 20, 2023

Context

This is the second part of the implementation of the accepted RFC 140, the automated migration. The first part is already done and can be found here: #237439.

The plan for the second part can be found here: #258650

This is hopefully only the first of many quality-of-life improvements to Nixpkgs by the Nixpkgs Architecture Team.

This PR is currently an old draft of the implementation, using a slightly hacky tool to do it. Will be updated after part 1 is done.

TODO

@infinisil infinisil changed the title Nixpkgs Architecture Team: Simple Package Paths RFC draft implementation test Nixpkgs Architecture: Simple Package Paths RFC draft implementation test Jan 20, 2023
@zowoq zowoq changed the title Nixpkgs Architecture: Simple Package Paths RFC draft implementation test Nixpkgs Architecture: Simple Package Paths RFC draft implementation test [skip editorconfig] Jan 20, 2023
@zowoq
Copy link
Contributor

zowoq commented Jan 20, 2023

[skip editorconfig] should help with this.

@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 20, 2023
@infinisil
Copy link
Member Author

@zowoq Not entirely how that works, see here, but that can't disable just a specific workflow, it disables all of them which I don't want

@github-actions github-actions bot added the 6.topic: policy discussion Discuss policies to work in and around Nixpkgs label Jan 20, 2023
@zowoq
Copy link
Contributor

zowoq commented Jan 20, 2023

if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip editorconfig]')"

[skip editorconfig] in the PR title skips only the editorconfig check

infinisil added a commit to infinisil/nixpkgs that referenced this pull request Jan 20, 2023
NixOS#211832 broke the workflows for all
PR's temporarily because it runs into GitHub API limits. This change to
the workflow files just makes sure that the problematic workflows don't
run for that specific PR.
@zowoq zowoq changed the title Nixpkgs Architecture: Simple Package Paths RFC draft implementation test [skip editorconfig] Nixpkgs Architecture: Simple Package Paths RFC draft implementation test [skip treewide] Jan 20, 2023
@infinisil infinisil force-pushed the auto-calling branch 3 times, most recently from a06330e to 35c73e4 Compare January 23, 2023 22:07
@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 23, 2023
Makes the build independency of the default.nix and update.sh file by
explicitly specifying the files that are needed in the result

This allows changing those files without causing a rebuild
This way, changing the Nix file won't change the derivation
Tested with nix-env -qaf .

The res -> super changes are necessary because res points to the result
of the current overlay, but some of the packages were moved to the
previous overlay, which can be accessed with super. This is a
fundamental problem to be fixed, see NixOS#55061
and related issues

The schleuder change is necessary because the ./default.nix file
referenced ./., but there's also another package in ./bin. The tool
couldn't move the gemfiles in ./. because

The schleuder change is necessary because the tool isn't smart enough
and this is a special case of the default.nix reading gemfiles from a
./. reference and there being both schleuder in
pkgs/tools/security/schleuder and schleuder-cli in
pkgs/tools/security/schleuder/cli
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jan 24, 2023
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2022-01-23-nixpkgs-architecture-team-meeting-26/24892/1

@infinisil
Copy link
Member Author

infinisil commented Sep 23, 2023

I'm planning to implement this in a series of steps: #258650

contents: write # for korthout/backport-action to create branch
pull-requests: write # for korthout/backport-action to create PR to backport
name: Backport Pull Request
if: github.repository_owner == 'NixOS' && github.event.pull_request.merged == true && (github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be changed back after this PR has been merged, otherwise this workflow might run in every contributors repo as well, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah I only used this for testing. I'll have to completely update this PR once everything is ready.

@infinisil infinisil changed the title [RFC 140] Simple package paths, part 2: Automated migration [RFC 140 2b] pkgs/by-name: Automated migration Dec 20, 2023
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/ci-will-soon-enforce-pkgs-by-name-for-new-packages/38098/1

@gaykitty
Copy link
Contributor

gaykitty commented Aug 6, 2024

FYI the Nixpkgs Architecture Team link is incorrect or dead.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 6, 2024
@GaetanLepage GaetanLepage mentioned this pull request Nov 21, 2024
13 tasks
@infinisil
Copy link
Member Author

Note that @Aleksanaa did a large part of the automated migration in #354531, thank you! There's still more that can be migrated manually, so I'll leave this PR open for now until I or somebody else can do it

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/a-look-at-nixos-nixpkgs-evaluation-times-over-the-years/65114/13

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: significant Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc. 2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants