···121 <varlistentry>
122 <term><varname>license</varname></term>
123 <listitem><para>The license for the package. One from attribute set defined in
124- <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/licenses.nix">
125 <filename>nixpkgs/lib/licenses.nix</filename></link>.
126 Example:
127 <literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem>
0128 </varlistentry>
129130 <varlistentry>
···133 maintainers of this Nix expression. If
134 you would like to be a maintainer of a package, you may want to add
135 yourself to <link
136- xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link>
137 and write something like <literal>[ stdenv.lib.maintainers.alice
138 stdenv.lib.maintainers.bob ]</literal>.</para></listitem>
139 </varlistentry>
···159meta.platforms = stdenv.lib.platforms.linux;
160</programlisting>
161162- Attribute Set <varname>stdenv.lib.platforms</varname> in
163- <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/lib/platforms.nix">
164 <filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
165 lists of platforms types.
166 </para></listitem>
···202203<section xml:id="sec-meta-license"><title>Licenses</title>
204205-<para>The <varname>meta.license</varname> attribute could be one of the
206-following:
000020700208<variablelist>
209210 <varlistentry>
···121 <varlistentry>
122 <term><varname>license</varname></term>
123 <listitem><para>The license for the package. One from attribute set defined in
124+ <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
125 <filename>nixpkgs/lib/licenses.nix</filename></link>.
126 Example:
127 <literal>stdenv.lib.licenses.gpl3</literal>.</para></listitem>
128+ See details in <xref linkend='sec-meta-license'/>,
129 </varlistentry>
130131 <varlistentry>
···134 maintainers of this Nix expression. If
135 you would like to be a maintainer of a package, you may want to add
136 yourself to <link
137+ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix"><filename>nixpkgs/lib/maintainers.nix</filename></link>
138 and write something like <literal>[ stdenv.lib.maintainers.alice
139 stdenv.lib.maintainers.bob ]</literal>.</para></listitem>
140 </varlistentry>
···160meta.platforms = stdenv.lib.platforms.linux;
161</programlisting>
162163+ Attribute Set <varname>stdenv.lib.platforms</varname> in
164+ <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/platforms.nix">
165 <filename>nixpkgs/lib/platforms.nix</filename></link> defines various common
166 lists of platforms types.
167 </para></listitem>
···203204<section xml:id="sec-meta-license"><title>Licenses</title>
205206+<para>The <varname>meta.license</varname> attribute should preferrably contain
207+a value from <varname>stdenv.lib.licenses</varname> defined in
208+<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
209+<filename>nixpkgs/lib/licenses.nix</filename></link>,
210+or in-place license description of the same format if the license is
211+unlikely to be useful in another expression.
212213+A few generic options are available, although it's typically better
214+to indicate the specific license:
215<variablelist>
216217 <varlistentry>
···8081 package = mkOption {
82 type = types.package;
83- default = pulseaudio;
84- example = literalExample "pulseaudio.override { jackaudioSupport = true; }";
85 description = ''
86- The PulseAudio derivation to use. This can be used to enable
87- features (such as JACK support) that are not enabled in the
88- default PulseAudio in Nixpkgs.
89 '';
90 };
91
···8081 package = mkOption {
82 type = types.package;
83+ default = pulseaudioFull;
84+ example = literalExample "pulseaudioFull";
85 description = ''
86+ The PulseAudio derivation to use. This can be used to disable
87+ features (such as JACK support, Bluetooth) that are enabled in the
88+ pulseaudioFull package in Nixpkgs.
89 '';
90 };
91
+4
nixos/modules/misc/ids.nix
···139 polipo = 129;
140 mopidy = 130;
141 unifi = 131;
00142143 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
144···252 polipo = 129;
253 mopidy = 130;
254 docker = 131;
00255256 # When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!
257
···139 polipo = 129;
140 mopidy = 130;
141 unifi = 131;
142+ gdm = 132;
143+ dhcpd = 133;
144145 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
146···254 polipo = 129;
255 mopidy = 130;
256 docker = 131;
257+ gdm = 132;
258+ tss = 133;
259260 # When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!
261
···1+# tcsd daemon.
2+3+{ config, pkgs, ... }:
4+5+with pkgs.lib;
6+let
7+8+ cfg = config.services.tcsd;
9+10+ tcsdConf = pkgs.writeText "tcsd.conf" ''
11+ port = 30003
12+ num_threads = 10
13+ system_ps_file = ${cfg.stateDir}/system.data
14+ # This is the log of each individual measurement done by the system.
15+ # By re-calculating the PCR registers based on this information, even
16+ # finer details about the measured environment can be inferred than
17+ # what is available directly from the PCR registers.
18+ firmware_log_file = /sys/kernel/security/tpm0/binary_bios_measurements
19+ kernel_log_file = /sys/kernel/security/ima/binary_runtime_measurements
20+ #firmware_pcrs = 0,1,2,3,4,5,6,7
21+ #kernel_pcrs = 10,11
22+ platform_cred = ${cfg.platformCred}
23+ conformance_cred = ${cfg.conformanceCred}
24+ endorsement_cred = ${cfg.endorsementCred}
25+ #remote_ops = create_key,random
26+ #host_platform_class = server_12
27+ #all_platform_classes = pc_11,pc_12,mobile_12
28+ '';
29+30+in
31+{
32+33+ ###### interface
34+35+ options = {
36+37+ services.tcsd = {
38+39+ enable = mkOption {
40+ default = false;
41+ type = types.bool;
42+ description = ''
43+ Whether to enable tcsd, a Trusted Computing management service
44+ that provides TCG Software Stack (TSS). The tcsd daemon is
45+ the only portal to the Trusted Platform Module (TPM), a hardware
46+ chip on the motherboard.
47+ '';
48+ };
49+50+ user = mkOption {
51+ default = "tss";
52+ type = types.string;
53+ description = "User account under which tcsd runs.";
54+ };
55+56+ group = mkOption {
57+ default = "tss";
58+ type = types.string;
59+ description = "Group account under which tcsd runs.";
60+ };
61+62+ stateDir = mkOption {
63+ default = "/var/lib/tpm";
64+ type = types.path;
65+ description = ''
66+ The location of the system persistent storage file.
67+ The system persistent storage file holds keys and data across
68+ restarts of the TCSD and system reboots.
69+ '';
70+ };
71+72+ platformCred = mkOption {
73+ default = "${cfg.stateDir}/platform.cert";
74+ type = types.path;
75+ description = ''
76+ Path to the platform credential for your TPM. Your TPM
77+ manufacturer may have provided you with a set of credentials
78+ (certificates) that should be used when creating identities
79+ using your TPM. When a user of your TPM makes an identity,
80+ this credential will be encrypted as part of that process.
81+ See the 1.1b TPM Main specification section 9.3 for information
82+ on this process. '';
83+ };
84+85+ conformanceCred = mkOption {
86+ default = "${cfg.stateDir}/conformance.cert";
87+ type = types.path;
88+ description = ''
89+ Path to the conformance credential for your TPM.
90+ See also the platformCred option'';
91+ };
92+93+ endorsementCred = mkOption {
94+ default = "${cfg.stateDir}/endorsement.cert";
95+ type = types.path;
96+ description = ''
97+ Path to the endorsement credential for your TPM.
98+ See also the platformCred option'';
99+ };
100+ };
101+102+ };
103+104+ ###### implementation
105+106+ config = mkIf cfg.enable {
107+108+ environment.systemPackages = [ pkgs.trousers ];
109+110+# system.activationScripts.tcsd =
111+# ''
112+# chown ${cfg.user}:${cfg.group} ${tcsdConf}
113+# '';
114+115+ systemd.services.tcsd = {
116+ description = "TCSD";
117+ after = [ "systemd-udev-settle.service" ];
118+ wantedBy = [ "multi-user.target" ];
119+ path = [ pkgs.trousers ];
120+ preStart =
121+ ''
122+ mkdir -m 0700 -p ${cfg.stateDir}
123+ chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
124+ '';
125+ serviceConfig.ExecStart = "${pkgs.trousers}/sbin/tcsd -f -c ${tcsdConf}";
126+ };
127+128+ users.extraUsers = optionalAttrs (cfg.user == "tss") (singleton
129+ { name = "tss";
130+ group = "tss";
131+ uid = config.ids.uids.nginx;
132+ });
133+134+ users.extraGroups = optionalAttrs (cfg.group == "tss") (singleton
135+ { name = "tss";
136+ gid = config.ids.gids.nginx;
137+ });
138+ };
139+}
···1+{ fetchurl, stdenv, pkgconfig, python, file, bc
2+, qt4, hunspell, makeWrapper #, mythes, boost
3}:
45stdenv.mkDerivation rec {
6+ version = "2.1.1";
7 name = "lyx-${version}";
89 src = fetchurl {
10+ url = "ftp://ftp.lyx.org/pub/lyx/stable/2.1.x/${name}.tar.xz";
11+ sha256 = "1fir1dzzy7c92jf3a3psnd10c6widslk0852xk4svpl6phcg4nya";
12 };
1314 configureFlags = [
···18 #"--without-included-mythes" # such a small library isn't worth a separate package
19 ];
2021+ # LaTeX is used from $PATH, as people often want to have it with extra pkgs
22 buildInputs = [
23+ pkgconfig qt4 python file/*for libmagic*/ bc
24+ hunspell makeWrapper # enchant
25 ];
2627+ enableParallelBuilding = true;
28 doCheck = true;
2930+ # python is run during runtime to do various tasks
31+ postFixup = ''
32+ sed '1s:/usr/bin/python:${python}/bin/python:'
33+34+ wrapProgram "$out/bin/lyx" \
35+ --prefix PATH : '${python}/bin'
36+ '';
37+38+ meta = with stdenv.lib; {
39 description = "WYSIWYM frontend for LaTeX, DocBook";
40 homepage = "http://www.lyx.org";
41+ license = licenses.gpl2Plus;
42+ maintainers = [ maintainers.vcunat ];
43+ platforms = platforms.linux;
44 };
45}
46+
+1-1
pkgs/applications/misc/xfontsel/default.nix
···28 meta = {
29 homepage = http://www.x.org/;
30 description = "Allows testing the fonts available in an X server";
31- licesnse = "free";
32 maintainers = with stdenv.lib.maintainers; [viric];
33 platforms = with stdenv.lib.platforms; linux;
34 };
···28 meta = {
29 homepage = http://www.x.org/;
30 description = "Allows testing the fonts available in an X server";
31+ license = "free";
32 maintainers = with stdenv.lib.maintainers; [viric];
33 platforms = with stdenv.lib.platforms; linux;
34 };
+1-1
pkgs/applications/misc/xlsfonts/default.nix
···16 meta = {
17 homepage = http://www.x.org/;
18 description = "Lists the fonts available in the X server";
19- licesnse = "free";
20 maintainers = with stdenv.lib.maintainers; [viric];
21 platforms = with stdenv.lib.platforms; linux;
22 };
···16 meta = {
17 homepage = http://www.x.org/;
18 description = "Lists the fonts available in the X server";
19+ license = "free";
20 maintainers = with stdenv.lib.maintainers; [viric];
21 platforms = with stdenv.lib.platforms; linux;
22 };
+1-1
pkgs/applications/misc/xmobar/default.nix
···23 homepage = "http://xmobar.org";
24 description = "A Minimalistic Text Based Status Bar";
25 license = self.stdenv.lib.licenses.bsd3;
26- platforms = self.ghc.meta.platforms;
27 };
28})
···23 homepage = "http://xmobar.org";
24 description = "A Minimalistic Text Based Status Bar";
25 license = self.stdenv.lib.licenses.bsd3;
26+ platforms = self.stdenv.lib.platforms.linux;
27 };
28})
···23 --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules"
24 '';
2526- meta = {
27 homepage = http://portix.bitbucket.org/dwb/;
28 description = "A lightweight web browser based on the webkit web browser engine and the gtk toolkit";
29- platforms = stdenv.lib.platforms.mesaPlatforms;
30- maintainers = [ stdenv.lib.maintainers.pSub ];
31- license = "GPL";
32 };
33}
···23 --prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules"
24 '';
2526+ meta = with stdenv.lib; {
27 homepage = http://portix.bitbucket.org/dwb/;
28 description = "A lightweight web browser based on the webkit web browser engine and the gtk toolkit";
29+ platforms = platforms.mesaPlatforms;
30+ maintainers = with maintainers;[ pSub ];
31+ license = licenses.gpl3;
32 };
33}
···21 description = "backs up everything github knows about a repository, to the repository";
22 license = "GPL";
23 platforms = self.ghc.meta.platforms;
0024 };
25})
···21 description = "backs up everything github knows about a repository, to the repository";
22 license = "GPL";
23 platforms = self.ghc.meta.platforms;
24+ hydraPlatforms = self.stdenv.lib.platforms.none;
25+ broken = true;
26 };
27})
···19 libnotify isocodes gobjectIntrospection
20 ];
2122- preBuild = "patchShebangs ./scripts";
0002324 preFixup = ''
25 for f in "$out"/bin/*; do
···19 libnotify isocodes gobjectIntrospection
20 ];
2122+ preBuild = ''
23+ patchShebangs ./scripts
24+ substituteInPlace data/dconf/Makefile --replace "dconf update" "echo"
25+ '';
2627 preFixup = ''
28 for f in "$out"/bin/*; do
+3-3
pkgs/development/libraries/libtiff/default.nix
···4041 doCheck = true;
4243- meta = {
44 description = "Library and utilities for working with the TIFF image file format";
45 homepage = http://www.remotesensing.org/libtiff/;
46- license = "bsd";
47- platforms = stdenv.lib.platforms.unix;
48 };
49}
···4041 doCheck = true;
4243+ meta = with stdenv.lib; {
44 description = "Library and utilities for working with the TIFF image file format";
45 homepage = http://www.remotesensing.org/libtiff/;
46+ license = licenses.libtiff;
47+ platforms = platforms.unix;
48 };
49}
+1-1
pkgs/development/libraries/thrift/default.nix
···13 md5 = "466aca9e43e43df868f4385af50e32f6";
14 };
1516- enableParallelBuilding = true;
1718 # Fixes build error: <flex>/lib/libfl.so: undefined reference to `yylex'.
19 # Patch exists in upstream git repo, so it can be removed on the next version
···13 md5 = "466aca9e43e43df868f4385af50e32f6";
14 };
1516+ #enableParallelBuilding = true; problems on hydra
1718 # Fixes build error: <flex>/lib/libfl.so: undefined reference to `yylex'.
19 # Patch exists in upstream git repo, so it can be removed on the next version
···25 echo Removing jars and empty directories
26 find $out -name "*.a" -delete -o -name "*.jar" -delete -o -type d -empty -delete
27 '';
28+29 meta = with stdenv.lib; {
30 description = "SQL/RDF database used by, e.g., KDE-nepomuk";
31 homepage = http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/;
32+ #configure: The current version [...] can only be build on 64bit platforms
33+ platforms = [ "x86_64-linux" "x86_64-darwin" ];
34 maintainers = [ maintainers.urkud ];
35 };
36}
+18-7
pkgs/stdenv/generic/default.nix
···2930 allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
31000000000032 unsafeGetAttrPos = builtins.unsafeGetAttrPos or (n: as: null);
3334 # The stdenv that we are producing.
···76 in
77 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
78 throw ''
79- Package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate. You can set
80- { nixpkgs.config.allowUnfree = true; }
81- in configuration.nix to override this. If you use Nix standalone, you can add
82- { allowUnfree = true; }
83- to ~/.nixpkgs/config.nix.''
84 else if !allowBroken && attrs.meta.broken or false then
85- throw "you can't use package ‘${attrs.name}’ in ${pos'} because it has been marked as broken"
0086 else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem result.system attrs.meta.platforms then
87- throw "the package ‘${attrs.name}’ in ${pos'} is not supported on ‘${result.system}’"
0088 else
89 lib.addPassthru (derivation (
90 (removeAttrs attrs ["meta" "passthru" "crossAttrs"])
···2930 allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
3132+ forceEvalHelp = unfreeOrBroken:
33+ assert (unfreeOrBroken == "Unfree" || unfreeOrBroken == "Broken");
34+ ''
35+ You can set
36+ { nixpkgs.config.allow${unfreeOrBroken} = true; }
37+ in configuration.nix to override this. If you use Nix standalone, you can add
38+ { allow${unfreeOrBroken} = true; }
39+ to ~/.nixpkgs/config.nix.
40+ '';
41+42 unsafeGetAttrPos = builtins.unsafeGetAttrPos or (n: as: null);
4344 # The stdenv that we are producing.
···86 in
87 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
88 throw ''
89+ Package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate.
90+ ${forceEvalHelp "Unfree"}''
00091 else if !allowBroken && attrs.meta.broken or false then
92+ throw ''
93+ Package ‘${attrs.name}’ in ${pos'} is marked as broken, refusing to evaluate.
94+ ${forceEvalHelp "Broken"}''
95 else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem result.system attrs.meta.platforms then
96+ throw ''
97+ Package ‘${attrs.name}’ in ${pos'} is not supported on ‘${result.system}’, refusing to evaluate.
98+ ${forceEvalHelp "Broken"}''
99 else
100 lib.addPassthru (derivation (
101 (removeAttrs attrs ["meta" "passthru" "crossAttrs"])