Skip to content

flake.nix: Track hydra master branch #620

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 3 commits into from
Apr 8, 2025
Merged

flake.nix: Track hydra master branch #620

merged 3 commits into from
Apr 8, 2025

Conversation

mweinelt
Copy link
Member

@mweinelt mweinelt commented Apr 8, 2025

The master branch has caught up with the patches we've been carrying for the last 12 months or so. We also start following the nix-eval-jobs version pinned in hydra, so that we stay compatible.

Flake lock file updates:

• Updated input 'hydra':
    'github:NixOS/hydra/c3b6e7b425325b2ea65a0ed638c5913ac32d1a28' (2025-02-16)
  → 'github:NixOS/hydra/1c52c4c0ed596ea71de370562ed5af1604bd2183' (2025-04-07)
• Removed input 'hydra/libgit2'
• Updated input 'hydra/nix':
    'github:NixOS/nix/a7fdef6858dd45b9d7bda7c92324c63faee7f509' (2024-09-19)
  → 'github:NixOS/nix/a4962f73b5fc874d4b16baef47921daf349addfc' (2025-04-07)
• Removed input 'hydra/nix/libgit2'
• Updated input 'hydra/nix-eval-jobs':
    follows 'nix-eval-jobs'
  → 'github:nix-community/nix-eval-jobs/cba718bafe5dc1607c2b6761ecf53c641a6f3b21' (2025-04-07)
• Removed input 'nix-eval-jobs'
• Removed input 'nix-eval-jobs/flake-parts'
• Removed input 'nix-eval-jobs/flake-parts/nixpkgs-lib' • Removed input 'nix-eval-jobs/nix-github-actions' • Removed input 'nix-eval-jobs/nix-github-actions/nixpkgs' • Removed input 'nix-eval-jobs/nixpkgs'
• Removed input 'nix-eval-jobs/treefmt-nix'
• Removed input 'nix-eval-jobs/treefmt-nix/nixpkgs'

The master branch has caught up with the patches we've been carrying for
the last 12 months or so. We also start following the nix-eval-jobs
version pinned in hydra, so that we stay compatible.

Flake lock file updates:

• Updated input 'hydra':
    'github:NixOS/hydra/c3b6e7b425325b2ea65a0ed638c5913ac32d1a28' (2025-02-16)
  → 'github:NixOS/hydra/1c52c4c0ed596ea71de370562ed5af1604bd2183' (2025-04-07)
• Removed input 'hydra/libgit2'
• Updated input 'hydra/nix':
    'github:NixOS/nix/a7fdef6858dd45b9d7bda7c92324c63faee7f509' (2024-09-19)
  → 'github:NixOS/nix/a4962f73b5fc874d4b16baef47921daf349addfc' (2025-04-07)
• Removed input 'hydra/nix/libgit2'
• Updated input 'hydra/nix-eval-jobs':
    follows 'nix-eval-jobs'
  → 'github:nix-community/nix-eval-jobs/cba718bafe5dc1607c2b6761ecf53c641a6f3b21' (2025-04-07)
• Removed input 'nix-eval-jobs'
• Removed input 'nix-eval-jobs/flake-parts'
• Removed input 'nix-eval-jobs/flake-parts/nixpkgs-lib'
• Removed input 'nix-eval-jobs/nix-github-actions'
• Removed input 'nix-eval-jobs/nix-github-actions/nixpkgs'
• Removed input 'nix-eval-jobs/nixpkgs'
• Removed input 'nix-eval-jobs/treefmt-nix'
• Removed input 'nix-eval-jobs/treefmt-nix/nixpkgs'
@mweinelt
Copy link
Member Author

mweinelt commented Apr 8, 2025

mimas | Evaluated mimas
mimas | Building mimas
mimas | warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/jzawz4a4r1cp426hrb2rhfxgnssxnan4-nixos-system-mimas-24.11pre-git.drv^*'
mimas | copying 0 paths...
mimas | these 12 derivations will be built:
mimas |   /nix/store/fmbnc2prf4xwnlzaf8k7r23sbf8r92g3-nixos-option.drv
mimas |   /nix/store/mz7lr69x7cbzpwmb6d6w0acx6rpzrd91-system-path.drv
mimas |   /nix/store/5y4m0pa9lxxpads2k7rmr7777y35z5fl-dbus-1.drv
mimas |   /nix/store/2p79jwpy2xv4vfnr94cac7afzn38h1q5-X-Restart-Triggers-dbus.drv
mimas |   /nix/store/8ryfb6qhdy879sdk2wmxnba1bavwyxjf-unit-dbus.service.drv
mimas |   /nix/store/19bckwdrbqi02f0hm8kxz2yd981dvlsf-user-units.drv
mimas |   /nix/store/pi6ngy01w3ygq6mn4idps9p7rmg1jlnr-unit-dbus.service.drv
mimas |   /nix/store/xf4zzj5q6qdf3fb1rysrzaf9lwmw6k7r-unit-systemd-tmpfiles-resetup.service.drv
mimas |   /nix/store/zq5w9fpxacgxg0ndmlcj9nfm2r7fhlbm-unit-nix-daemon.service.drv
mimas |   /nix/store/s4hxg5mjwn9fy9r92hpm8caybcgdwrfv-system-units.drv
mimas |   /nix/store/zbyi513pxi023qiddf0nl3bcy3m584nq-etc.drv
mimas |   /nix/store/jzawz4a4r1cp426hrb2rhfxgnssxnan4-nixos-system-mimas-24.11pre-git.drv
mimas | building '/nix/store/zq5w9fpxacgxg0ndmlcj9nfm2r7fhlbm-unit-nix-daemon.service.drv'...
mimas | building '/nix/store/xf4zzj5q6qdf3fb1rysrzaf9lwmw6k7r-unit-systemd-tmpfiles-resetup.service.drv'...
mimas | building '/nix/store/fmbnc2prf4xwnlzaf8k7r23sbf8r92g3-nixos-option.drv'...
mimas | Running phase: unpackPhase
mimas | unpacking source archive /nix/store/gk2qs90xfhv0h19h8dca9hn9j3wkix6f-nixos-option
mimas | source root is nixos-option
mimas | Running phase: patchPhase
mimas | Running phase: updateAutotoolsGnuConfigScriptsPhase
mimas | Running phase: configurePhase
mimas | mesonConfigurePhase flags: --prefix=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option --libdir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/lib --libexecdir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/libexec --bindir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/bin --sbindir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/sbin --includedir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/include --mandir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/share/man --infodir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/share/info --localedir=/nix/store/53qp5ycicd46pbif95sgq9hvnlq98w73-nixos-option/share/locale -Dauto_features=enabled -Dwrap_mode=nodownload --buildtype=plain
mimas | The Meson build system
mimas | Version: 1.6.0
mimas | Source dir: /build/nixos-option
mimas | Build dir: /build/nixos-option/build
mimas | Build type: native build
mimas | Project name: nixos-option
mimas | Project version: 0.1.6
mimas | C++ compiler for the host machine: g++ (gcc 13.3.0 "g++ (GCC) 13.3.0")
mimas | C++ linker for the host machine: g++ ld.bfd 2.43.1
mimas | Host machine cpu family: x86_64
mimas | Host machine cpu: x86_64
mimas | Found pkg-config: YES (/nix/store/ry0993a35awd6d74pss5gjdwj5dsrf1p-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
mimas | Did not find CMake 'cmake'
mimas | Found CMake: NO
mimas | Run-time dependency nix-main found: NO (tried pkgconfig)
mimas | 
mimas | meson.build:6:15: ERROR: Dependency "nix-main" not found, tried pkgconfig
mimas | 
mimas | A full log can be found at /build/nixos-option/build/meson-logs/meson-log.txt
mimas | error: builder for '/nix/store/fmbnc2prf4xwnlzaf8k7r23sbf8r92g3-nixos-option.drv' failed with exit code 1
mimas | error: 1 dependencies of derivation '/nix/store/mz7lr69x7cbzpwmb6d6w0acx6rpzrd91-system-path.drv' failed to build
mimas | error: 1 dependencies of derivation '/nix/store/jzawz4a4r1cp426hrb2rhfxgnssxnan4-nixos-system-mimas-24.11pre-git.drv' failed to build

@Ericson2314
Copy link
Member

@mweinelt can we avoid changing the version of Nix nix-option is built with temporarily?

@mweinelt
Copy link
Member Author

mweinelt commented Apr 8, 2025

I'm not even sure how we're pulling it in, but we certainly try an overlay.

@mweinelt mweinelt requested a review from a team as a code owner April 8, 2025 01:29
@mweinelt
Copy link
Member Author

mweinelt commented Apr 8, 2025

And channel scripts as well:

building '/nix/store/6miz626q0w5nwp9fy8b49dqx5yjpjavi-nixos-channel-native-programs.drv'...
Package nix-main was not found in the pkg-config search path.
Perhaps you should add the directory containing `nix-main.pc'
to the PKG_CONFIG_PATH environment variable
No package 'nix-main' found
Package nix-main was not found in the pkg-config search path.
Perhaps you should add the directory containing `nix-main.pc'
to the PKG_CONFIG_PATH environment variable
No package 'nix-main' found
copying path '/nix/store/d09p4q8awrpawplf003r2bs7ahmypyd4-nginx-1.26.3' from 'https://cache.nixos.org/'...
Package nix-store was not found in the pkg-config search path.
Perhaps you should add the directory containing `nix-store.pc'
to the PKG_CONFIG_PATH environment variable
No package 'nix-store' found
copying path '/nix/store/ccyny0nr3a4dn5f864caj1nmvhkyz938-append-initrd-secrets' from 'https://cache.nixos.org/'...
copying path '/nix/store/dz1yfrpha153h7x269krj2h87qicmbp1-kbd-2.6.4' from 'https://cache.nixos.org/'...
copying path '/nix/store/y51jvj92hiy2i95m7zjagckm3nf1kxm7-man-db-2.13.0' from 'https://cache.nixos.org/'...
/nix/store/k607x0ll10x6f533bicgg17ilw0wnjwb-index-debuginfo.cc:1:10: fatal error: nix/config.h: No such file or directory
    1 | #include <nix/config.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
error: builder for '/nix/store/6miz626q0w5nwp9fy8b49dqx5yjpjavi-nixos-channel-native-programs.drv' failed with exit code 1;
       last 16 log lines:
       > Package nix-main was not found in the pkg-config search path.
       > Perhaps you should add the directory containing `nix-main.pc'
       > to the PKG_CONFIG_PATH environment variable
       > No package 'nix-main' found
       > Package nix-main was not found in the pkg-config search path.
       > Perhaps you should add the directory containing `nix-main.pc'
       > to the PKG_CONFIG_PATH environment variable
       > No package 'nix-main' found
       > Package nix-store was not found in the pkg-config search path.
       > Perhaps you should add the directory containing `nix-store.pc'
       > to the PKG_CONFIG_PATH environment variable
       > No package 'nix-store' found
       > /nix/store/k607x0ll10x6f533bicgg17ilw0wnjwb-index-debuginfo.cc:1:10: fatal error: nix/config.h: No such file or directory
       >     1 | #include <nix/config.h>
       >       |          ^~~~~~~~~~~~~~
       > compilation terminated.
       For full logs, run:
         nix log /nix/store/6miz626q0w5nwp9fy8b49dqx5yjpjavi-nixos-channel-native-programs.drv
error: 1 dependencies of derivation '/nix/store/wjmn10g1qwk4vizqxjsqa78i2lfxvp4y-nixos-channel-scripts.drv' failed to build

@Ericson2314
Copy link
Member

I guess Nix is put in the main package set by override, and that's just picking up a lot of collateral stuff. Maybe this will be easier after we finish scrambling for 25.05.

@SuperSandro2000
Copy link
Member

that's done here https://github.com/NixOS/infra/blob/main/build/flake-module.nix#L15

Maybe it would be easier to maintain if we just change nix.package and the nix hydra is using.

@Ericson2314
Copy link
Member

Ericson2314 commented Apr 8, 2025

Good idea, @SuperSandro2000. Let's definitely consider doing that.

@Ericson2314
Copy link
Member

commit 5d5e7ff4ad0749fbe03866d2dfab48c9fb6bbfbf (HEAD -> hydra-main)
Author: John Ericson <[email protected]>
Date:   Tue Apr 8 13:30:25 2025 -0400

    build: Pin nixos-channel-scripts to Nix 2.24

diff --git a/build/flake-module.nix b/build/flake-module.nix
index f3bd2d7..e0c425c 100644
--- a/build/flake-module.nix
+++ b/build/flake-module.nix
@@ -14,7 +14,17 @@ let
     nixpkgs.overlays = [
       inputs.nix.overlays.default
       inputs.hydra.overlays.default
-      inputs.nixos-channel-scripts.overlays.default
+      (
+        final: prev:
+        inputs.nixos-channel-scripts.overlays.default (
+          final
+          // {
+            # Doesn't yet work with Nix 2.28
+            # https://github.com/NixOS/nixos-channel-scripts/issues/79
+            nix = final.nixVersions.nix_2_24;
+          }
+        ) prev
+      )
       inputs.rfc39.overlays.default
     ];
   };

Can't push, but this should fix

@mweinelt mweinelt added this pull request to the merge queue Apr 8, 2025
Merged via the queue into main with commit 53d2c54 Apr 8, 2025
15 checks passed
@mweinelt mweinelt deleted the hydra-main branch April 8, 2025 20:48
@mweinelt
Copy link
Member Author

mweinelt commented Apr 8, 2025

Deployeed.

Comment on lines +17 to +27
(
final: prev:
inputs.nixos-channel-scripts.overlays.default (
final
// {
# Doesn't yet work with Nix 2.28
# https://github.com/NixOS/nixos-channel-scripts/issues/79
nix = final.nixVersions.nix_2_24;
}
) prev
)
Copy link
Member

Choose a reason for hiding this comment

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

NixOS/nixos-channel-scripts#80 so we can eventually revert this back as it was

Comment on lines +18 to +25
nixpkgs.overlays = [
(_prev: final: {
# fails to find nix-main against nix 2.28.x
# https://github.com/NixOS/infra/pull/620#issuecomment-2784979947
nixos-option = final.nixos-option.override { nix = pkgs.nixVersions.nix_2_24; };
})
];

Copy link
Member

Choose a reason for hiding this comment

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

N.B. to the future: this can go away in 25.05 when nixos-option is just a script that shells out to Nix.

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.

3 participants