1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

Allow dashes in identifiers

In Nixpkgs, the attribute in all-packages.nix corresponding to a
package is usually equal to the package name.  However, this doesn't
work if the package contains a dash, which is fairly common.  The
convention is to replace the dash with an underscore (e.g. "dbus-lib"
becomes "dbus_glib"), but that's annoying.  So now dashes are valid in
variable / attribute names, allowing you to write:

  dbus-glib = callPackage ../development/libraries/dbus-glib { };

and

  buildInputs = [ dbus-glib ];

Since we don't have a negation or subtraction operation in Nix, this
is unambiguous.
This commit is contained in:
Eelco Dolstra 2012-09-27 15:43:08 -04:00
parent f46612be96
commit 95c74eae26
4 changed files with 9 additions and 4 deletions

View file

@ -14,6 +14,11 @@
<itemizedlist>
<listitem>
<para>Dashes are now valid as part of identifiers and attribute
names.</para>
</listitem>
<listitem>
<para>Nix no longer sets the immutable bit on files in the Nix
store. Instead, the recommended way to guard the Nix store