Skip to content

nixos-option: fix build against nix 2.24#355745

Merged
Mic92 merged 1 commit intoNixOS:masterfrom
Mic92:nixos-option
Nov 13, 2024
Merged

nixos-option: fix build against nix 2.24#355745
Mic92 merged 1 commit intoNixOS:masterfrom
Mic92:nixos-option

Conversation

@Mic92
Copy link
Copy Markdown
Member

@Mic92 Mic92 commented Nov 13, 2024

Things done

I noticed today we still have nix 2.18 in our default nixos closure. Bumping nixos-option fixes that. This pull request just does the minimum to get nixos-option build.
I have already follow up commits to improve things further: #355748

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Mic92 Mic92 requested a review from a team November 13, 2024 20:08
@Mic92 Mic92 mentioned this pull request Nov 13, 2024
13 tasks
Copy link
Copy Markdown
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

LGTM at a cursory glance

Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Otherwise looks good!

@Mic92 Mic92 merged commit 501505f into NixOS:master Nov 13, 2024
@Mic92 Mic92 deleted the nixos-option branch November 13, 2024 23:27
@foolnotion
Copy link
Copy Markdown
Contributor

foolnotion commented Nov 16, 2024

This breaks the build on the current master. Last good commit is d13c9db

nix log /nix/store/0vj9pr9s98dkjv2imwdgp1vwfz5fnc8r-nixos-option.drv
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/0vj9pr9s98dkjv2imwdgp1vwfz5fnc8r-nixos-option.drv^*'
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/gk2qs90xfhv0h19h8dca9hn9j3wkix6f-nixos-option
source root is nixos-option
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
mesonConfigurePhase flags: --prefix=/nix/store/z3bnffna084is69k0qn2jhimjshav2gm-nixos-option --libdir=/nix/store/z3bnffna084is69k0qn2jh>
The Meson build system
Version: 1.6.0
Source dir: /build/nixos-option
Build dir: /build/nixos-option/build
Build type: native build
Project name: nixos-option
Project version: 0.1.6
C++ compiler for the host machine: g++ (gcc 13.3.0 "g++ (GCC) 13.3.0")
C++ linker for the host machine: g++ ld.bfd 2.43.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/nix/store/f1gamyykr0f8n4afy910ass2jx2g9zkv-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
Run-time dependency nix-main found: YES 2.18.9
Run-time dependency nix-store found: YES 2.18.9
Run-time dependency nix-expr found: YES 2.18.9
Run-time dependency nix-cmd found: YES 2.18.9
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency nix-flake found: NO (tried pkgconfig)

meson.build:10:16: ERROR: Dependency "nix-flake" not found, tried pkgconfig

A full log can be found at /build/nixos-option/build/meson-logs/meson-log.txt

EDIT: nevermind, all good. I'd forgotten that i tested lix at some point and that machine was still using it.

@nixos-discourse
Copy link
Copy Markdown

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

https://discourse.nixos.org/t/2024-11-13-nix-team-meeting-minutes-194/56211/1

@lf-
Copy link
Copy Markdown
Member

lf- commented Nov 18, 2024

This effort would have been better spent on #313497 as nixos-option is a reimplementation of a bunch of the nix CLI front-end and is a giant pile of bad code. We should just get rid of it being a C++ API client and use the CLI and Nix expressions.

Nevertheless, thanks for fixing the dependency in the default closure!

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.

6 participants