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

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

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

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.

@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

@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
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
@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 infinisil added the significant Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc. label Apr 19, 2023
@infinisil infinisil changed the title Nixpkgs Architecture: Simple Package Paths RFC draft implementation test [skip treewide] [RFC 140] Simple package paths, part 2: Automated migration Jul 14, 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/2023-09-05-nixpkgs-architecture-team-meeting-43/32635/1

@infinisil
Copy link
Member Author

infinisil commented Sep 23, 2023

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

@@ -17,7 +17,7 @@ jobs:
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: policy discussion 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 significant Novel ideas, large API changes, notable refactorings, issues with RFC potential, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants