···121121 <varlistentry>
122122 <term><varname>license</varname></term>
123123 <listitem><para>The license for the package. One from attribute set defined in
124124- <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix">
124124+ <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
125125 <filename>nixpkgs/lib/licenses.nix</filename></link>.
126126 Example:
127127 <literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem>
128128+ See details in <xref linkend='sec-meta-license'/>,
128129 </varlistentry>
129130130131 <varlistentry>
···133134 maintainers of this Nix expression. If
134135 you would like to be a maintainer of a package, you may want to add
135136 yourself to <link
136136- xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link>
137137+ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link>
137138 and write something like <literal>[ stdenv.lib.maintainers.alice
138139 stdenv.lib.maintainers.bob ]</literal>.</para></listitem>
139140 </varlistentry>
···159160meta.platforms = stdenv.lib.platforms.linux;
160161</programlisting>
161162162162- Attribute Set <varname>stdenv.lib.platforms</varname> in
163163- <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/platforms.nix">
163163+ Attribute Set <varname>stdenv.lib.platforms</varname> in
164164+ <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/platforms.nix">
164165 <filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
165166 lists of platforms types.
166167 </para></listitem>
···202203203204<section xml:id="sec-meta-license"><title>Licenses</title>
204205205205-<para>The <varname>meta.license</varname> attribute could be one of the
206206-following:
206206+<para>The <varname>meta.license</varname> attribute should preferrably contain
207207+a value from <varname>stdenv.lib.licenses</varname> defined in
208208+<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
209209+<filename>nixpkgs/lib/licenses.nix</filename></link>,
210210+or in-place license description of the same format if the license is
211211+unlikely to be useful in another expression.
207212213213+A few generic options are available, although it's typically better
214214+to indicate the specific license:
208215<variablelist>
209216210217 <varlistentry>
···80808181 package = mkOption {
8282 type = types.package;
8383- default = pulseaudio;
8484- example = literalExample "pulseaudio.override { jackaudioSupport = true; }";
8383+ default = pulseaudioFull;
8484+ example = literalExample "pulseaudioFull";
8585 description = ''
8686- The PulseAudio derivation to use. This can be used to enable
8787- features (such as JACK support) that are not enabled in the
8888- default PulseAudio in Nixpkgs.
8686+ The PulseAudio derivation to use. This can be used to disable
8787+ features (such as JACK support, Bluetooth) that are enabled in the
8888+ pulseaudioFull package in Nixpkgs.
8989 '';
9090 };
9191
+4
nixos/modules/misc/ids.nix
···139139 polipo = 129;
140140 mopidy = 130;
141141 unifi = 131;
142142+ gdm = 132;
143143+ dhcpd = 133;
142144143145 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
144146···252254 polipo = 129;
253255 mopidy = 130;
254256 docker = 131;
257257+ gdm = 132;
258258+ tss = 133;
255259256260 # When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!
257261
···11+# tcsd daemon.
22+33+{ config, pkgs, ... }:
44+55+with pkgs.lib;
66+let
77+88+ cfg = config.services.tcsd;
99+1010+ tcsdConf = pkgs.writeText "tcsd.conf" ''
1111+ port = 30003
1212+ num_threads = 10
1313+ system_ps_file = ${cfg.stateDir}/system.data
1414+ # This is the log of each individual measurement done by the system.
1515+ # By re-calculating the PCR registers based on this information, even
1616+ # finer details about the measured environment can be inferred than
1717+ # what is available directly from the PCR registers.
1818+ firmware_log_file = /sys/kernel/security/tpm0/binary_bios_measurements
1919+ kernel_log_file = /sys/kernel/security/ima/binary_runtime_measurements
2020+ #firmware_pcrs = 0,1,2,3,4,5,6,7
2121+ #kernel_pcrs = 10,11
2222+ platform_cred = ${cfg.platformCred}
2323+ conformance_cred = ${cfg.conformanceCred}
2424+ endorsement_cred = ${cfg.endorsementCred}
2525+ #remote_ops = create_key,random
2626+ #host_platform_class = server_12
2727+ #all_platform_classes = pc_11,pc_12,mobile_12
2828+ '';
2929+3030+in
3131+{
3232+3333+ ###### interface
3434+3535+ options = {
3636+3737+ services.tcsd = {
3838+3939+ enable = mkOption {
4040+ default = false;
4141+ type = types.bool;
4242+ description = ''
4343+ Whether to enable tcsd, a Trusted Computing management service
4444+ that provides TCG Software Stack (TSS). The tcsd daemon is
4545+ the only portal to the Trusted Platform Module (TPM), a hardware
4646+ chip on the motherboard.
4747+ '';
4848+ };
4949+5050+ user = mkOption {
5151+ default = "tss";
5252+ type = types.string;
5353+ description = "User account under which tcsd runs.";
5454+ };
5555+5656+ group = mkOption {
5757+ default = "tss";
5858+ type = types.string;
5959+ description = "Group account under which tcsd runs.";
6060+ };
6161+6262+ stateDir = mkOption {
6363+ default = "/var/lib/tpm";
6464+ type = types.path;
6565+ description = ''
6666+ The location of the system persistent storage file.
6767+ The system persistent storage file holds keys and data across
6868+ restarts of the TCSD and system reboots.
6969+ '';
7070+ };
7171+7272+ platformCred = mkOption {
7373+ default = "${cfg.stateDir}/platform.cert";
7474+ type = types.path;
7575+ description = ''
7676+ Path to the platform credential for your TPM. Your TPM
7777+ manufacturer may have provided you with a set of credentials
7878+ (certificates) that should be used when creating identities
7979+ using your TPM. When a user of your TPM makes an identity,
8080+ this credential will be encrypted as part of that process.
8181+ See the 1.1b TPM Main specification section 9.3 for information
8282+ on this process. '';
8383+ };
8484+8585+ conformanceCred = mkOption {
8686+ default = "${cfg.stateDir}/conformance.cert";
8787+ type = types.path;
8888+ description = ''
8989+ Path to the conformance credential for your TPM.
9090+ See also the platformCred option'';
9191+ };
9292+9393+ endorsementCred = mkOption {
9494+ default = "${cfg.stateDir}/endorsement.cert";
9595+ type = types.path;
9696+ description = ''
9797+ Path to the endorsement credential for your TPM.
9898+ See also the platformCred option'';
9999+ };
100100+ };
101101+102102+ };
103103+104104+ ###### implementation
105105+106106+ config = mkIf cfg.enable {
107107+108108+ environment.systemPackages = [ pkgs.trousers ];
109109+110110+# system.activationScripts.tcsd =
111111+# ''
112112+# chown ${cfg.user}:${cfg.group} ${tcsdConf}
113113+# '';
114114+115115+ systemd.services.tcsd = {
116116+ description = "TCSD";
117117+ after = [ "systemd-udev-settle.service" ];
118118+ wantedBy = [ "multi-user.target" ];
119119+ path = [ pkgs.trousers ];
120120+ preStart =
121121+ ''
122122+ mkdir -m 0700 -p ${cfg.stateDir}
123123+ chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
124124+ '';
125125+ serviceConfig.ExecStart = "${pkgs.trousers}/sbin/tcsd -f -c ${tcsdConf}";
126126+ };
127127+128128+ users.extraUsers = optionalAttrs (cfg.user == "tss") (singleton
129129+ { name = "tss";
130130+ group = "tss";
131131+ uid = config.ids.uids.nginx;
132132+ });
133133+134134+ users.extraGroups = optionalAttrs (cfg.group == "tss") (singleton
135135+ { name = "tss";
136136+ gid = config.ids.gids.nginx;
137137+ });
138138+ };
139139+}
···1919 libnotify isocodes gobjectIntrospection
2020 ];
21212222- preBuild = "patchShebangs ./scripts";
2222+ preBuild = ''
2323+ patchShebangs ./scripts
2424+ substituteInPlace data/dconf/Makefile --replace "dconf update" "echo"
2525+ '';
23262427 preFixup = ''
2528 for f in "$out"/bin/*; do
+3-3
pkgs/development/libraries/libtiff/default.nix
···40404141 doCheck = true;
42424343- meta = {
4343+ meta = with stdenv.lib; {
4444 description = "Library and utilities for working with the TIFF image file format";
4545 homepage = http://www.remotesensing.org/libtiff/;
4646- license = "bsd";
4747- platforms = stdenv.lib.platforms.unix;
4646+ license = licenses.libtiff;
4747+ platforms = platforms.unix;
4848 };
4949}
+1-1
pkgs/development/libraries/thrift/default.nix
···1313 md5 = "466aca9e43e43df868f4385af50e32f6";
1414 };
15151616- enableParallelBuilding = true;
1616+ #enableParallelBuilding = true; problems on hydra
17171818 # Fixes build error: <flex>/lib/libfl.so: undefined reference to `yylex'.
1919 # Patch exists in upstream git repo, so it can be removed on the next version
···11+{ stdenv, fetchzip }:
22+33+let
44+ version = "0.3.0";
55+ meta = with stdenv.lib; {
66+ homepage = http://www.consul.io/intro/getting-started/ui.html;
77+ description = "The static files for Consul's UI (used via -ui-dir)";
88+ maintainers = with maintainers; [ cstrahan ];
99+ license = licenses.mpl20 ;
1010+ platforms = platforms.all;
1111+ };
1212+in (fetchzip {
1313+ name = "consul-ui-${version}";
1414+ url = "https://dl.bintray.com/mitchellh/consul/${version}_web_ui.zip";
1515+ sha256 = "0p4mhlrqidd6p3899wd3i9p41bdbb5avbz5986mnxg9f7dvhjdrc";
1616+}) // { inherit meta; }
1717+
+3-2
pkgs/servers/sql/virtuoso/7.x.nix
···2525 echo Removing jars and empty directories
2626 find $out -name "*.a" -delete -o -name "*.jar" -delete -o -type d -empty -delete
2727 '';
2828-2828+2929 meta = with stdenv.lib; {
3030 description = "SQL/RDF database used by, e.g., KDE-nepomuk";
3131 homepage = http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/;
3232- platforms = platforms.all;
3232+ #configure: The current version [...] can only be build on 64bit platforms
3333+ platforms = [ "x86_64-linux" "x86_64-darwin" ];
3334 maintainers = [ maintainers.urkud ];
3435 };
3536}
+18-7
pkgs/stdenv/generic/default.nix
···29293030 allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
31313232+ forceEvalHelp = unfreeOrBroken:
3333+ assert (unfreeOrBroken == "Unfree" || unfreeOrBroken == "Broken");
3434+ ''
3535+ You can set
3636+ { nixpkgs.config.allow${unfreeOrBroken} = true; }
3737+ in configuration.nix to override this. If you use Nix standalone, you can add
3838+ { allow${unfreeOrBroken} = true; }
3939+ to ~/.nixpkgs/config.nix.
4040+ '';
4141+3242 unsafeGetAttrPos = builtins.unsafeGetAttrPos or (n: as: null);
33433444 # The stdenv that we are producing.
···7686 in
7787 if !allowUnfree && (let l = lib.lists.toList attrs.meta.license or []; in lib.lists.elem "unfree" l || lib.lists.elem "unfree-redistributable" l) && !(allowUnfreePredicate attrs) then
7888 throw ''
7979- Package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate. You can set
8080- { nixpkgs.config.allowUnfree = true; }
8181- in configuration.nix to override this. If you use Nix standalone, you can add
8282- { allowUnfree = true; }
8383- to ~/.nixpkgs/config.nix.''
8989+ Package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate.
9090+ ${forceEvalHelp "Unfree"}''
8491 else if !allowBroken && attrs.meta.broken or false then
8585- throw "you can't use package ‘${attrs.name}’ in ${pos'} because it has been marked as broken"
9292+ throw ''
9393+ Package ‘${attrs.name}’ in ${pos'} is marked as broken, refusing to evaluate.
9494+ ${forceEvalHelp "Broken"}''
8695 else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem result.system attrs.meta.platforms then
8787- throw "the package ‘${attrs.name}’ in ${pos'} is not supported on ‘${result.system}’"
9696+ throw ''
9797+ Package ‘${attrs.name}’ in ${pos'} is not supported on ‘${result.system}’, refusing to evaluate.
9898+ ${forceEvalHelp "Broken"}''
8899 else
89100 lib.addPassthru (derivation (
90101 (removeAttrs attrs ["meta" "passthru" "crossAttrs"])