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

Separate truely top-level code from per-bootstrapping-stage code #21209

Closed
wants to merge 4 commits into from

Conversation

Ericson2314
Copy link
Member

Motivation for this change

I think top-level was getting a but unwieldy. With this change:

  • Truely top level stays in pkgs/top-level
  • Per-bootstrapping-stage goes in pkgs/stage
Things done

Gonna let Travis test this one

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @aske, @obadz, @rardiol and @FRidh to be potential reviewers.

@copumpkin
Copy link
Member

copumpkin commented Dec 16, 2016

Renaming files that everyone changes all the time is going to break almost every open PR or branch...

@Ericson2314
Copy link
Member Author

Hmm git itself can easily deal with renamed files, but github isn't so clever.

@FRidh
Copy link
Member

FRidh commented Dec 16, 2016

Is there an overview of what the desired structure of the top-level functions and repository layout is?

In my opinion we should just move python-packages.nix to pkgs/development/python-modules/default.nix.

@Ericson2314
Copy link
Member Author

Ericson2314 commented Dec 16, 2016

@FRidh this is my own vison, if you will :). If you see how I split top-level/default.nix into top-level/stage.nix in #15043, this is moving things around to further that distinction.

@nbp
Copy link
Member

nbp commented Dec 17, 2016

These are not stages, but collections / indexes of packages.
The stages would be the steps taken by the top-level to aggregate stdenv and others.

I think pkgs/indexes/node-packages.nix makes more sense than pkgs/stages/node-packages.nix.
Also, if all these indexes / collections are suffixed by -packages, maybe we should move this particle to the directory name, if it is not explicit yet, such as pkgs/indexes/npm.nix, pkgs/indexes/pip.nix, pkgs/indexes/cabal.nix ?

What do you think?

@Ericson2314
Copy link
Member Author

@nbp I like it! While yes stage/default.nix computes a single bootstrapping stage, that involves little more than aggregating the indices. And certainly everything else in there is an index that just happens to be used for computing a single stage—and it's better to label our "nouns" by what they are than how they are used.

I'll change this PR accordingly in a few minites, and also change the documentation in now-called indices/default.nix to philosophicly align.

Ericson2314 and others added 4 commits December 18, 2016 00:31
 - Truely top level stays in `pkgs/top-level`
 - Indices go in `pkgs/indices`
The command that did this was:
(cd pkgs/indices; find -type f) | grep -v 'default\.nix' | cut -d/ -f2 | xargs -n1 -I % bash -c "git ls-files | xargs sed -i -e 's_top-level/%_indices/%_g'"
@Ericson2314 Ericson2314 force-pushed the organize branch 2 times, most recently from f92e2dc to e28853a Compare December 18, 2016 09:31
@Ericson2314
Copy link
Member Author

Not sure if I'm actually causing some sort of pythonic mass rebuild, or Travis was just having a bad day.

@mmahut
Copy link
Member

mmahut commented Aug 1, 2019

Any update on this pull request?

@FRidh
Copy link
Member

FRidh commented Aug 1, 2019

I think moving the package sets into their own folder is not a bad idea, although it's a pain when going through the history. if we would do this, then may as well create a new commit and PR.

@FRidh FRidh closed this Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants