-
-
Couldn't load subscription status.
- Fork 17.1k
Open
Labels
0.kind: bugSomething is brokenSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Description
Describe the bug
Ideally install .iso should be buildable against ca-derivations via nixpkgs.config.contentAddressedByDefault = true;. This fails today as:
error: A definition for option `system.extraDependencies."[definition 1-entry 1]"' is not of type `path in the Nix store'. Definition values:
- In `/nix/store/m90lvfa50gc7s1ysa9zzx2drdm10pmyc-source/nixos/modules/profiles/installation-device.nix': <derivation stdenv-linux>
Steps To Reproduce
Executable reproducer:
- Create
iso.nixwith the following contents:
# iso.nix
{ config, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
];
# This breaks the build:
nixpkgs.config.contentAddressedByDefault = true;
}- Try to build an
.iso:
$ nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix
… while calling the 'derivationStrict' builtin
at /builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'nixos-23.11pre-git-x86_64-linux.iso'
whose name attribute is located at /nix/store/m90lvfa50gc7s1ysa9zzx2drdm10pmyc-source/pkgs/stdenv/generic/make-derivation.nix:300:7
… while evaluating attribute 'sources' of derivation 'nixos-23.11pre-git-x86_64-linux.iso'
at /nix/store/m90lvfa50gc7s1ysa9zzx2drdm10pmyc-source/nixos/lib/make-iso9660-image.nix:57:3:
56|
57| sources = map (x: x.source) contents;
| ^
58| targets = map (x: x.target) contents;
(stack trace truncated; use '--show-trace' to show the full trace)
error: A definition for option `system.extraDependencies."[definition 1-entry 1]"' is not of type `path in the Nix store'. Definition values:
- In `/nix/store/m90lvfa50gc7s1ysa9zzx2drdm10pmyc-source/nixos/modules/profiles/installation-device.nix': <derivation stdenv-linux>
Expected behavior
.iso should build successfully.
Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.5.7, NixOS, 23.11 (Tapir), 23.11.20231016.17c847f`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.17.0`
- channels(root): `""`
- channels(slyfox): `""`
- nixpkgs: `/run/current-system/sw/share/nixos-flakes/inputs/nixpkgs`Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md