NixOS / NixOS/nixpkgs

nix-required-mounts: The experimental nix-command feature is required, but not enabled

Open
#454,792 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

0.kind: bug 2.status: stale 6.topic: cuda
Dominant language
Nix
Stars
26.2k
Forks
20.1k
PR merge metrics
PR metrics pending

Description

Nixpkgs version
  • Unstable (25.11)
Describe the bug

nix-required-mounts attempts to run nix show-derivation, but the nix-command feature is not guaranteed to be enabled. It should probably add --extra-experimental-features nix-command to the invocation.

Steps to reproduce
  1. Enable nix-required-mounts without enabling the nix-command feature
  2. Build a package
Expected behaviour

nix-required-mounts should work regardless of the system Nix settings

Screenshots

No response

Relevant log output
this derivation will be built:
  /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-package.drv
ERROR:root:Couldn't parse the output of`nix show-derivation`. Expected JSON, observed: b''
ERROR:root:
building '/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-package.drv'...
Additional context

No response

System metadata

N/A

Notify maintainers

@SomeoneSerge


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs
Is this issue important to you?

Add a 👍 reaction to issues you find important.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The invocation is in pkgs/by-name/ni/nix-required-mounts/nix_required_mounts.py at lines 123-130. Start by reproducing the build with the nix-command feature disabled, then inspect the nix show-derivation call. Done means nix-required-mounts can parse the derivation output without requiring a system-wide experimental-feature setting.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.