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

nix: put each version in a separate file #211172

Closed
wants to merge 3 commits into from
Closed

nix: put each version in a separate file #211172

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 17, 2023

Description of changes

Some of us need to keep around specific versions of nix.

The recent churn of which Nix versions are or are not in nixpkgs is causing a lot of merge conflicts for us.

Let's put each version in a separate file, so these churn commits aren't constantly conflicting with nearby lines of code.

Things done

@ghost
Copy link
Author

ghost commented Jan 17, 2023

Please do not squash the commits; there is important (reconstructed) history in there.

@ghost
Copy link
Author

ghost commented Jan 17, 2023

@grahamc the darwin builders are wedged again

@ghost
Copy link
Author

ghost commented Jan 18, 2023

@ofborg eval

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

This PR shouldn't revert commits which are not really related to it.

pkgs/tools/package-management/nix/default.nix Outdated Show resolved Hide resolved
pkgs/tools/package-management/nix/default.nix Outdated Show resolved Hide resolved
pkgs/tools/package-management/nix/default.nix Outdated Show resolved Hide resolved
pkgs/tools/package-management/nix/2/10/default.nix Outdated Show resolved Hide resolved
@ghost
Copy link
Author

ghost commented Jan 22, 2023

This PR shouldn't revert commits which are not really related to it.

It doesn't. OfBorg shows zero rebuilds.

@ghost ghost marked this pull request as draft January 22, 2023 05:56
@ghost ghost marked this pull request as ready for review January 22, 2023 06:29
@ghost ghost requested a review from SuperSandro2000 January 22, 2023 06:29
@SuperSandro2000
Copy link
Member

It doesn't. OfBorg shows zero rebuilds

I was looking at the commit history which shows some reverts and back and forth https://github.com/NixOS/nixpkgs/pull/211172/commits

@ghost
Copy link
Author

ghost commented Jan 24, 2023

This PR shouldn't revert commits which are not really related to it.

It doesn't. OfBorg shows zero rebuilds

I was looking at the commit history which shows some reverts and back and forth https://github.com/NixOS/nixpkgs/pull/211172/commits

None of them remain reverted by the end of the PR.

Check the net effect of the entire patch series.

@ghost
Copy link
Author

ghost commented Jan 24, 2023

Resolved (non-hypothetical) merge conflict (this is the churn I'm talking about).

Copy link
Member

@Artturin Artturin left a comment

Choose a reason for hiding this comment

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

Needs rebase

@ghost
Copy link
Author

ghost commented Mar 10, 2023

Needs rebase

Done.

Note: rebasing this PR is extremely labor-intensive.

@ghost ghost marked this pull request as draft March 10, 2023 06:06
@ghost ghost marked this pull request as ready for review March 10, 2023 06:06
@ghost ghost requested review from Artturin and SuperSandro2000 and removed request for SuperSandro2000 and Artturin March 10, 2023 06:06
@SuperSandro2000
Copy link
Member

Some of us need to keep around specific versions of nix.

The recent churn of which Nix versions are or are not in nixpkgs is causing a lot of merge conflicts for us.

Let's put each version in a separate file, so these churn commits aren't constantly conflicting with nearby lines of code.

I am doing that myself here https://github.com/supersandro2000/nixpkgs/tree/nixos-22.11 with 120 commits on top of stable and rebasing it usually twice or more a week and do not have such problems.

I am using the following commands to rebase:

git co nixos-22-11
git rebase origin/nixos-22.11 nixos-22.11
git rebase upstream/nixos-22.11 nixos-22.11
git push --force-with-lease

So from my perspective this change is not necessary.


Also if we are going to merge this, can we just squash the history together? Having those 2 revert commits makes the history a bit messy.

@ghost
Copy link
Author

ghost commented Mar 28, 2023

I am doing that myself here https://github.com/supersandro2000/nixpkgs/tree/nixos-22.11 with 120 commits on top of stable and rebasing it usually twice or more a week and do not have such problems.

So from my perspective this change is not necessary.

Because you're rebasing against the slow-moving 22.11 instead of master. You haven't had any problems because you're rebasing against an incredibly slowly-moving branch. You also haven't yet tried to rebase upon 1723477 which is the one that causes all the pain:

$ git merge-base origin/master 756797b47fe316b6795103fc2065e60ef700ecbf
550e897a481b769bda516e4543166796fb455b7d

I "live at head" and run origin/master so I can eat our own dogfood.

I know that not everybody can do this, but if nobody did it we wouldn't find out about most bugs until ZHF. I also build everything myself (--trusted-public-keys "") which is the same situation: painful for me, but I catch things (like broken FODs) that nobody else does.

@ghost
Copy link
Author

ghost commented Mar 28, 2023

Also if we are going to merge this, can we just squash the history together? Having those 2 revert commits makes the history a bit messy.

I've squashed it into only three commits:

  1. Revert the deletion
  2. Move into separate files
  3. Re-do the deletion

The reason for this is so that people who want the old versions back can git revert the last commit (and carry that revert forward in their local tree). So it is really valuable to have that change isolated as a single commit -- it makes it straightforward for people to re-enable the no-longer-supported versions.

I suppose the first two commits could be fused together. I think it conveys useful information about what happened here. I've rewritten the commit message so it doesn't "look like" an obvious revert (see fc8b055) since I mean no offense toward the people who wrote the commit that I am reverting.

If you still feel strongly about reducing the number of commits I can squash the first two commits together. Squashing all three would make it obnoxiously difficult for people to bring back the deleted versions; I don't think that's a good idea.

@SuperSandro2000
Copy link
Member

Because you're rebasing against the slow-moving 22.11 instead of master. You haven't had any problems because you're rebasing against an incredibly slowly-moving branch. You also haven't yet tried to rebase upon 1723477 which is the one that causes all the pain:

I am doing the same with nixos-unstable and also run into very little problems.

I "live at head" and run origin/master so I can eat our own dogfood.

Feel free to do that but I would highly recommended against directly tracking master and instead suggest to anyone to use nixos-unstable.

The reason for this is so that people who want the old versions back can git revert the last commit (and carry that revert forward in their local tree). So it is really valuable to have that change isolated as a single commit -- it makes it straightforward for people to re-enable the no-longer-supported versions.

This will probably only ever be useful for a handful of people while way more people need to live with the messy history and wrap their head around the back and forth in the history.

A PR that first introduces code that is later deleted in the same PR has a messy history. We should avoid that if it is easily possible which it is here. You can do whatever change you like on your fork but we should keep the history try to keep the history clean especially if it is easily done.

@ghost
Copy link
Author

ghost commented Apr 11, 2023

way more people need to live with the messy history and wrap their head around the back and forth in the history.

I laughed at this.

The nixpkgs history is a complete rat's nest already. Squashing two commits together isn't going to fix that. I don't think anybody sits down and reads the whole thing from start to finish.

@ghost
Copy link
Author

ghost commented Apr 11, 2023

I would also like to point out that when we carry multiple versions of a package it is nixpkgs convention to put each one in a separate file. Currently nix violates that convention:

$ find . | grep '/[0-9\\.]*.nix'
./pkgs/applications/graphics/apngasm/2.nix
./pkgs/applications/misc/mupdf/1.17.nix
./pkgs/applications/misc/snixembed
./pkgs/applications/misc/snixembed/default.nix
./pkgs/applications/networking/bee/0002-nix-diff-for-substituteAll.patch
./pkgs/applications/networking/cisco-packet-tracer/7.nix
./pkgs/applications/networking/cisco-packet-tracer/8.nix
./pkgs/applications/networking/protonvpn-cli/2.nix
./pkgs/applications/audio/ardour/6.nix
./pkgs/applications/audio/hydrogen/0.nix
./pkgs/applications/editors/emacs/28.nix
./pkgs/applications/radio/gnuradio/3.8.nix
./pkgs/applications/radio/gnuradio/3.9.nix
./pkgs/applications/radio/uhd/3.5.nix
./pkgs/applications/radio/unixcw
./pkgs/applications/radio/unixcw/remove-use-of-dlopen.patch
./pkgs/applications/radio/unixcw/default.nix
./pkgs/applications/science/geometry/tetgen/1.4.nix
./pkgs/applications/science/math/mathematica/10.nix
./pkgs/applications/science/math/mathematica/11.nix
./pkgs/applications/science/math/mathematica/9.nix
./pkgs/applications/science/math/maxima/5.45.nix
./pkgs/applications/science/misc/root/5.nix
./pkgs/applications/virtualization/xen/4.15.nix
./pkgs/applications/window-managers/fvwm/2.6.nix
./pkgs/applications/window-managers/fvwm/3.nix
./pkgs/data/sgml+xml/schemas/xml-dtd/docbook/4.1.2.nix
./pkgs/data/sgml+xml/schemas/xml-dtd/docbook/4.2.nix
./pkgs/data/sgml+xml/schemas/xml-dtd/docbook/4.3.nix
./pkgs/data/sgml+xml/schemas/xml-dtd/docbook/4.4.nix
./pkgs/data/sgml+xml/schemas/xml-dtd/docbook/4.5.nix
./pkgs/data/sgml+xml/schemas/sgml-dtd/docbook/3.1.nix
./pkgs/data/sgml+xml/schemas/sgml-dtd/docbook/4.1.nix
./pkgs/development/compilers/alan/2.nix
./pkgs/development/compilers/dotnet/versions/3.1.nix
./pkgs/development/compilers/dotnet/versions/6.0.nix
./pkgs/development/compilers/dotnet/versions/7.0.nix
./pkgs/development/compilers/dotnet/versions/8.0.nix
./pkgs/development/compilers/ecl/16.1.2.nix
./pkgs/development/compilers/ghc/8.10.7.nix
./pkgs/development/compilers/ghc/8.8.4.nix
./pkgs/development/compilers/ghc/9.0.2.nix
./pkgs/development/compilers/ghc/9.2.4.nix
./pkgs/development/compilers/ghc/9.2.5.nix
./pkgs/development/compilers/ghc/9.2.6.nix
./pkgs/development/compilers/ghc/9.2.7.nix
./pkgs/development/compilers/ghc/9.4.2.nix
./pkgs/development/compilers/ghc/9.4.3.nix
./pkgs/development/compilers/ghc/9.4.4.nix
./pkgs/development/compilers/ghc/9.6.1.nix
./pkgs/development/compilers/go/1.18.nix
./pkgs/development/compilers/go/1.19.nix
./pkgs/development/compilers/go/1.20.nix
./pkgs/development/compilers/gwt/2.4.0.nix
./pkgs/development/compilers/ios-cross-compile/9.2.nix
./pkgs/development/compilers/julia/patches/1.6-bin/0005-nix-Enable-parallel-unit-tests-for-sandbox.patch
./pkgs/development/compilers/julia/1.8.nix
./pkgs/development/compilers/julia/1.9.nix
./pkgs/development/compilers/mlton/20130715.nix
./pkgs/development/compilers/mono/4.nix
./pkgs/development/compilers/mono/5.nix
./pkgs/development/compilers/mono/6.nix
./pkgs/development/compilers/ocaml/4.10.nix
./pkgs/development/compilers/ocaml/4.11.nix
./pkgs/development/compilers/ocaml/4.12.nix
./pkgs/development/compilers/ocaml/4.13.nix
./pkgs/development/compilers/ocaml/5.0.nix
./pkgs/development/compilers/ocaml/4.00.1.nix
./pkgs/development/compilers/ocaml/4.01.0.nix
./pkgs/development/compilers/ocaml/4.02.nix
./pkgs/development/compilers/ocaml/4.03.nix
./pkgs/development/compilers/ocaml/4.04.nix
./pkgs/development/compilers/ocaml/4.05.nix
./pkgs/development/compilers/ocaml/4.06.nix
./pkgs/development/compilers/ocaml/4.07.nix
./pkgs/development/compilers/ocaml/4.08.nix
./pkgs/development/compilers/ocaml/4.09.nix
./pkgs/development/compilers/ocaml/4.14.nix
./pkgs/development/compilers/openjdk/darwin/11.nix
./pkgs/development/compilers/openjdk/darwin/16.nix
./pkgs/development/compilers/openjdk/darwin/17.nix
./pkgs/development/compilers/openjdk/darwin/18.nix
./pkgs/development/compilers/openjdk/darwin/8.nix
./pkgs/development/compilers/openjdk/darwin/19.nix
./pkgs/development/compilers/openjdk/openjfx/11.nix
./pkgs/development/compilers/openjdk/openjfx/15.nix
./pkgs/development/compilers/openjdk/openjfx/17.nix
./pkgs/development/compilers/openjdk/openjfx/19.nix
./pkgs/development/compilers/openjdk/12.nix
./pkgs/development/compilers/openjdk/13.nix
./pkgs/development/compilers/openjdk/14.nix
./pkgs/development/compilers/openjdk/8.nix
./pkgs/development/compilers/openjdk/11.nix
./pkgs/development/compilers/openjdk/16.nix
./pkgs/development/compilers/openjdk/17.nix
./pkgs/development/compilers/openjdk/18.nix
./pkgs/development/compilers/openjdk/19.nix
./pkgs/development/compilers/openjdk/15.nix
./pkgs/development/compilers/polyml/5.6.nix
./pkgs/development/compilers/polyml/5.7.nix
./pkgs/development/compilers/zig/0.9.1.nix
./pkgs/development/compilers/zig/0.10.nix
./pkgs/development/compilers/zulu/8.nix
./pkgs/development/interpreters/python/cpython/2.7/nix-store-mtime.patch
./pkgs/development/interpreters/elixir/1.10.nix
./pkgs/development/interpreters/elixir/1.11.nix
./pkgs/development/interpreters/elixir/1.12.nix
./pkgs/development/interpreters/elixir/1.13.nix
./pkgs/development/interpreters/elixir/1.14.nix
./pkgs/development/interpreters/erlang/23.nix
./pkgs/development/interpreters/erlang/25.nix
./pkgs/development/interpreters/erlang/24.nix
./pkgs/development/interpreters/guile/1.8.nix
./pkgs/development/interpreters/guile/2.0.nix
./pkgs/development/interpreters/guile/2.2.nix
./pkgs/development/interpreters/guile/3.0.nix
./pkgs/development/interpreters/lfe/2.1.nix
./pkgs/development/interpreters/love/0.10.nix
./pkgs/development/interpreters/love/11.nix
./pkgs/development/interpreters/luajit/2.0.nix
./pkgs/development/interpreters/luajit/2.1.nix
./pkgs/development/interpreters/php/8.0.nix
./pkgs/development/interpreters/php/8.1.nix
./pkgs/development/interpreters/php/8.2.nix
./pkgs/development/interpreters/spidermonkey/78.nix
./pkgs/development/interpreters/spidermonkey/102.nix
./pkgs/development/interpreters/spidermonkey/91.nix
./pkgs/development/interpreters/tcl/8.6.nix
./pkgs/development/interpreters/tcl/8.5.nix
./pkgs/development/libraries/libdvdread/4.9.9.nix
./pkgs/development/libraries/libpng/12.nix
./pkgs/development/libraries/openssl/1.1/nix-ssl-cert-file.patch
./pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch
./pkgs/development/libraries/CGAL/4.nix
./pkgs/development/libraries/SDL2_ttf/2.0.15.nix
./pkgs/development/libraries/abseil-cpp/202103.nix
./pkgs/development/libraries/abseil-cpp/202111.nix
./pkgs/development/libraries/abseil-cpp/202206.nix
./pkgs/development/libraries/allegro/5.nix
./pkgs/development/libraries/asio/1.10.nix
./pkgs/development/libraries/atkmm/2.36.nix
./pkgs/development/libraries/bashup-events/3.2.nix
./pkgs/development/libraries/bashup-events/4.4.nix
./pkgs/development/libraries/boost/1.59.nix
./pkgs/development/libraries/boost/1.60.nix
./pkgs/development/libraries/boost/1.65.nix
./pkgs/development/libraries/boost/1.66.nix
./pkgs/development/libraries/boost/1.68.nix
./pkgs/development/libraries/boost/1.69.nix
./pkgs/development/libraries/boost/1.70.nix
./pkgs/development/libraries/boost/1.72.nix
./pkgs/development/libraries/boost/1.73.nix
./pkgs/development/libraries/boost/1.74.nix
./pkgs/development/libraries/boost/1.75.nix
./pkgs/development/libraries/boost/1.77.nix
./pkgs/development/libraries/boost/1.78.nix
./pkgs/development/libraries/boost/1.79.nix
./pkgs/development/libraries/boost/1.80.nix
./pkgs/development/libraries/boost/1.81.nix
./pkgs/development/libraries/botan/2.0.nix
./pkgs/development/libraries/cairomm/1.16.nix
./pkgs/development/libraries/catch2/3.nix
./pkgs/development/libraries/celt/0.5.1.nix
./pkgs/development/libraries/celt/0.7.nix
./pkgs/development/libraries/cloog/0.18.0.nix
./pkgs/development/libraries/eigen/2.0.nix
./pkgs/development/libraries/ffmpeg/4.nix
./pkgs/development/libraries/ffmpeg/5.nix
./pkgs/development/libraries/ffmpeg/6.nix
./pkgs/development/libraries/fltk/1.4.nix
./pkgs/development/libraries/fplll/20160331.nix
./pkgs/development/libraries/gcc/libstdc++/5.nix
./pkgs/development/libraries/gcr/4.nix
./pkgs/development/libraries/gecode/3.nix
./pkgs/development/libraries/geos/3.9.nix
./pkgs/development/libraries/giflib/4.1.nix
./pkgs/development/libraries/givaro/3.7.nix
./pkgs/development/libraries/givaro/3.nix
./pkgs/development/libraries/glew/1.10.nix
./pkgs/development/libraries/glibmm/2.68.nix
./pkgs/development/libraries/gmime/2.nix
./pkgs/development/libraries/gmime/3.nix
./pkgs/development/libraries/gmp/4.3.2.nix
./pkgs/development/libraries/gssdp/1.6.nix
./pkgs/development/libraries/gtk-sharp/2.0.nix
./pkgs/development/libraries/gtk-sharp/3.0.nix
./pkgs/development/libraries/gtkspell/3.nix
./pkgs/development/libraries/gupnp/1.6.nix
./pkgs/development/libraries/hamlib/4.nix
./pkgs/development/libraries/icu/58.nix
./pkgs/development/libraries/icu/60.nix
./pkgs/development/libraries/icu/64.nix
./pkgs/development/libraries/icu/66.nix
./pkgs/development/libraries/icu/67.nix
./pkgs/development/libraries/icu/68.nix
./pkgs/development/libraries/icu/69.nix
./pkgs/development/libraries/icu/70.nix
./pkgs/development/libraries/icu/71.nix
./pkgs/development/libraries/icu/72.nix
./pkgs/development/libraries/icu/63.nix
./pkgs/development/libraries/isl/0.11.1.nix
./pkgs/development/libraries/isl/0.14.1.nix
./pkgs/development/libraries/isl/0.17.1.nix
./pkgs/development/libraries/isl/0.20.0.nix
./pkgs/development/libraries/isl/0.24.0.nix
./pkgs/development/libraries/libdvdnav/4.2.1.nix
./pkgs/development/libraries/libdwarf/20210528.nix
./pkgs/development/libraries/libffi/3.3.nix
./pkgs/development/libraries/libgcrypt/1.5.nix
./pkgs/development/libraries/libgnome-games-support/2.0.nix
./pkgs/development/libraries/libmicrohttpd/0.9.69.nix
./pkgs/development/libraries/libmicrohttpd/0.9.71.nix
./pkgs/development/libraries/libmicrohttpd/0.9.72.nix
./pkgs/development/libraries/libpqxx/6.nix
./pkgs/development/libraries/librest/1.0.nix
./pkgs/development/libraries/libsigcxx/1.2.nix
./pkgs/development/libraries/libsigcxx/3.0.nix
./pkgs/development/libraries/libtorrent-rasterbar/1.2.nix
./pkgs/development/libraries/libusb-compat/0.1.nix
./pkgs/development/libraries/libva/1.nix
./pkgs/development/libraries/libwnck/2.nix
./pkgs/development/libraries/libwpd/0.8.nix
./pkgs/development/libraries/mesa/22.3.7.nix
./pkgs/development/libraries/mesa/23.0.1.nix
./pkgs/development/libraries/mypaint-brushes/1.0.nix
./pkgs/development/libraries/openbabel/2.nix
./pkgs/development/libraries/openexr/3.nix
./pkgs/development/libraries/pangomm/2.42.nix
./pkgs/development/libraries/pangomm/2.48.nix
./pkgs/development/libraries/pipewire/0.2.nix
./pkgs/development/libraries/proj/7.nix
./pkgs/development/libraries/protobuf/3.17.nix
./pkgs/development/libraries/protobuf/3.19.nix
./pkgs/development/libraries/protobuf/3.20.nix
./pkgs/development/libraries/protobuf/3.21.nix
./pkgs/development/libraries/protobuf/3.8.nix
./pkgs/development/libraries/readline/6.3.nix
./pkgs/development/libraries/readline/7.0.nix
./pkgs/development/libraries/readline/8.2.nix
./pkgs/development/libraries/science/math/suitesparse/4.2.nix
./pkgs/development/libraries/science/math/suitesparse/4.4.nix
./pkgs/development/libraries/spandsp/3.nix
./pkgs/development/libraries/thrift/0.10.nix
./pkgs/development/libraries/tinyxml/2.6.2.nix
./pkgs/development/libraries/tk/8.6.nix
./pkgs/development/libraries/tk/8.5.nix
./pkgs/development/libraries/unixODBC
./pkgs/development/libraries/unixODBC/default.nix
./pkgs/development/libraries/unixODBCDrivers
./pkgs/development/libraries/unixODBCDrivers/default.nix
./pkgs/development/libraries/vc/0.7.nix
./pkgs/development/libraries/volk/2.5.0.nix
./pkgs/development/libraries/webrtc-audio-processing/0.3.nix
./pkgs/development/libraries/mbedtls/2.nix
./pkgs/development/libraries/mbedtls/3.nix
./pkgs/development/libraries/yaml-cpp/0.3.0.nix
./pkgs/development/python-modules/prompt-toolkit/1.nix
./pkgs/development/python-modules/pygobject/3.nix
./pkgs/development/python-modules/tornado/4.nix
./pkgs/development/python-modules/tornado/5.nix
./pkgs/development/python-modules/wxPython/4.2.nix
./pkgs/development/python-modules/wxPython/4.0.nix
./pkgs/development/python-modules/wxPython/4.1.nix
./pkgs/development/python-modules/bcrypt/3.nix
./pkgs/development/python-modules/django/3.nix
./pkgs/development/python-modules/django/4.nix
./pkgs/development/tools/build-managers/apache-ant/1.9.nix
./pkgs/development/tools/iaca/2.1.nix
./pkgs/development/tools/iaca/3.0.nix
./pkgs/development/tools/kustomize/3.nix
./pkgs/development/tools/misc/autoconf/2.13.nix
./pkgs/development/tools/misc/autoconf/2.64.nix
./pkgs/development/tools/misc/autoconf/2.69.nix
./pkgs/development/tools/misc/lttng-ust/2.12.nix
./pkgs/development/tools/misc/patchelf/0.13.nix
./pkgs/development/tools/misc/premake/3.nix
./pkgs/development/tools/misc/premake/5.nix
./pkgs/development/tools/misc/swig/4.nix
./pkgs/development/tools/misc/texinfo/5.2.nix
./pkgs/development/tools/misc/texinfo/6.5.nix
./pkgs/development/tools/misc/texinfo/6.7.nix
./pkgs/development/tools/misc/texinfo/6.8.nix
./pkgs/development/tools/misc/texinfo/7.0.nix
./pkgs/development/tools/misc/universal-ctags/000-nixos-specific.patch
./pkgs/development/tools/ocaml/dune/1.nix
./pkgs/development/tools/ocaml/dune/2.nix
./pkgs/development/tools/ocaml/dune/3.nix
./pkgs/development/tools/parsing/antlr/3.4.nix
./pkgs/development/tools/parsing/antlr/3.5.nix
./pkgs/development/tools/parsing/antlr/2.7.7.nix
./pkgs/development/tools/parsing/antlr/4.nix
./pkgs/development/tools/parsing/flex/2.5.35.nix
./pkgs/development/tools/language-servers/rnix-lsp
./pkgs/development/tools/language-servers/rnix-lsp/default.nix
./pkgs/development/lisp-modules/asdf/2.26.nix
./pkgs/development/lisp-modules/asdf/3.1.nix
./pkgs/development/lisp-modules/quicklisp-to-nix-output/unix-options.nix
./pkgs/development/lisp-modules/quicklisp-to-nix-output/unix-opts.nix
./pkgs/development/ocaml-modules/camomile/0.8.2.nix
./pkgs/development/ocaml-modules/camomile/0.8.5.nix
./pkgs/development/ocaml-modules/cstruct/unix.nix
./pkgs/development/ocaml-modules/expat/0.9.nix
./pkgs/development/ocaml-modules/extlib/1.7.7.nix
./pkgs/development/ocaml-modules/git/unix.nix
./pkgs/development/ocaml-modules/janestreet/0.12.nix
./pkgs/development/ocaml-modules/janestreet/0.14.nix
./pkgs/development/ocaml-modules/janestreet/0.15.nix
./pkgs/development/ocaml-modules/lablgtk-extras/1.4.nix
./pkgs/development/ocaml-modules/metrics/unix.nix
./pkgs/development/ocaml-modules/mirage-clock/unix.nix
./pkgs/development/ocaml-modules/mirage-console/unix.nix
./pkgs/development/ocaml-modules/mirage-flow/unix.nix
./pkgs/development/ocaml-modules/mirage-time/unix.nix
./pkgs/development/ocaml-modules/tar/unix.nix
./pkgs/development/ocaml-modules/unix-errno
./pkgs/development/ocaml-modules/unix-errno/default.nix
./pkgs/games/liquidwar/5.nix
./pkgs/misc/cups/drivers/samsung/1.00.37.nix
./pkgs/misc/cups/drivers/samsung/4.01.17.nix
./pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix
./pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix
./pkgs/servers/etcd/3.3.nix
./pkgs/servers/etcd/3.4.nix
./pkgs/servers/etcd/3.5.nix
./pkgs/servers/http/apache-httpd/2.4.nix
./pkgs/servers/http/couchdb/3.nix
./pkgs/servers/http/envoy/0001-nixpkgs-use-system-Python.patch
./pkgs/servers/http/envoy/0002-nixpkgs-use-system-Go.patch
./pkgs/servers/nosql/cassandra/3.0.nix
./pkgs/servers/nosql/cassandra/3.11.nix
./pkgs/servers/nosql/cassandra/4.nix
./pkgs/servers/nosql/mongodb/5.0.nix
./pkgs/servers/nosql/mongodb/6.0.nix
./pkgs/servers/nosql/mongodb/4.4.nix
./pkgs/servers/teleport/11.nix
./pkgs/servers/teleport/12.nix
./pkgs/shells/bash/5.nix
./pkgs/tools/cd-dvd/ventoy-bin/000-nixos-sanitization.patch
./pkgs/tools/misc/esptool/3.nix
./pkgs/tools/misc/geekbench/4.nix
./pkgs/tools/misc/geekbench/5.nix
./pkgs/tools/misc/geekbench/6.nix
./pkgs/tools/misc/hdf5/1.10.nix
./pkgs/tools/misc/ncdu/1.nix
./pkgs/tools/misc/yubikey-manager/4.nix
./pkgs/tools/networking/iperf/3.nix
./pkgs/tools/networking/iperf/2.nix
./pkgs/tools/nix/rnix-hashes
./pkgs/tools/nix/rnix-hashes/default.nix
./pkgs/tools/package-management/nix/2.10.nix
./pkgs/tools/package-management/nix/2.11.nix
./pkgs/tools/package-management/nix/2.12.nix
./pkgs/tools/package-management/nix/2.13.nix
./pkgs/tools/package-management/nix/2.14.nix
./pkgs/tools/package-management/nix/2.3.nix
./pkgs/tools/security/bmrsa/11.nix
./pkgs/tools/security/gnupg/1.nix
./pkgs/tools/security/gnupg/24.nix
./pkgs/tools/text/patchutils/0.3.3.nix
./pkgs/tools/text/patchutils/0.4.2.nix
./pkgs/top-level/unixtools.nix
./nixos/modules/config/unix-odbc-drivers.nix

@ghost ghost requested review from edolstra and infinisil as code owners April 12, 2023 05:06
Comment on lines 64 to 72
/*
Given a directory and a regex, return a list of basenames of
files in that directory which match the regex.
*/
listFilesMatching = regex: dir:
lib.lists.filter (x: x!=null)
(lib.mapAttrsToList
(k: _: if builtins.match regex k == null then null else k)
(builtins.readDir dir));
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if this is a good function to introduce into lib. I think it would be cleaner to have a pkgs/tools/package-management/nix/versions directory where each entry corresponds to a version, then you don't need a regex filter and can just use readDir. Same for other packages if necessary.

Copy link
Author

Choose a reason for hiding this comment

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

I think it would be cleaner to have a pkgs/tools/package-management/nix/versions directory where each entry corresponds to a version, then you don't need a regex filter and can just use readDir

I agree. Done: e618baa.

The original naming scheme came from this request.

I will update all of this to match RFC140 when it is finished and implemented. However between now and then, having pkgs/tools/package-management/nix/ package split up into file-per-version will save rebasing pain on every commit that touches this directory.

I assume RFC140's implementation will include something like (and more general than) the three version_to_ helper functions, so those will go away.

@ghost ghost requested a review from infinisil April 13, 2023 03:40
@ghost
Copy link
Author

ghost commented Jun 9, 2023

Rebased again.

Adam Joseph added 3 commits June 29, 2023 04:50
This commit temporarily restores nixVersions 2.4-2.9 so the
following commit can split them into separate files before
re-performing the deletion (against the kept-in-separate-files
version).
Some of us need to keep around specific versions of nix.

The recent churn of which Nix versions are or are not in nixpkgs is
causing a lot of merge conflicts for us.

Let's put each version in a separate file, so these churn commits
aren't constantly conflicting with nearby lines of code.
@ghost
Copy link
Author

ghost commented Jul 1, 2023

Rebased.

1 similar comment
@ghost
Copy link
Author

ghost commented Jul 12, 2023

Rebased.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

I agree with the overall change here, but I don't agree with this:

I've squashed it into only three commits:

1. Revert the deletion

2. Move into separate files

3. Re-do the deletion

The reason for this is so that people who want the old versions back can git revert the last commit (and carry that revert forward in their local tree). So it is really valuable to have that change isolated as a single commit -- it makes it straightforward for people to re-enable the no-longer-supported versions.

There is no CI checking that these packages actually work in even those 2 commits. And making it easier to get back these deleted versions encourages people to still use them, maybe submit fixes to them. It also sets a precedent, encouraging others to also add commits like these to other PRs.

We should either actively support packages if they're still needed, or not support them at all imo.

@ghost
Copy link
Author

ghost commented Oct 22, 2023

There is no CI checking that these packages actually work in even those 2 commits.

There is no CI checking a lot of things, unfortunately.

@ghost ghost closed this Oct 22, 2023
@ghost ghost deleted the pr/nix/common branch October 22, 2023 07:29
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants