Nixpkgs: Don't substitute packages in comments

Created on 5 Dec 2018  路  1Comment  路  Source: NixOS/nixpkgs

Issue description

so commenting out works.

[root@atomic:~]# nixos-rebuild switch
building Nix...
building the system configuration...
error: attribute 'php56' missing, at /root/nixos/machines/atomic/configuration.nix:150:27
(use '--show-trace' to show detailed location information)

Not sure if this is a problem of Nix. Feel free to move the issue.

Steps to reproduce

screenshot from 2018-12-05 16-54-51

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.84, NixOS, 18.09.1446.db561c90ef3 (Jellyfish)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.3
  • channels(root): "nixos-18.09.1446.db561c90ef3"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
wontfix

Most helpful comment

There's not really a way for nix to know the line is actually a comment. To nix phpOptions just a string. What's considered a comment depends on the language, not all languages use # for comments. To 芦fix禄 this strings would need to how they're meant to be used, or what language they are in other words.

Though it's sure is a gotcha which isn't immediately obvious :laughing:

>All comments

There's not really a way for nix to know the line is actually a comment. To nix phpOptions just a string. What's considered a comment depends on the language, not all languages use # for comments. To 芦fix禄 this strings would need to how they're meant to be used, or what language they are in other words.

Though it's sure is a gotcha which isn't immediately obvious :laughing:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lverns picture lverns  路  3Comments

tomberek picture tomberek  路  3Comments

edolstra picture edolstra  路  3Comments

sid-kap picture sid-kap  路  3Comments

ayyess picture ayyess  路  3Comments