···108108file used by <filename>Makefile.PL</filename>:
109109110110<programlisting>
111111-{buildPerlPackage, fetchurl, db}:
111111+{ buildPerlPackage, fetchurl, db }:
112112113113buildPerlPackage rec {
114114 name = "BerkeleyDB-0.36";
···191191</section>
192192193193194194-<section><title>Python</title>
194194+<section xml:id="python"><title>Python</title>
195195+196196+<para>
197197+ Currently supported interpreters are <varname>python26</varname>, <varname>python27</varname>,
198198+ <varname>python32</varname>, <varname>python33</varname>, <varname>python34</varname>
199199+ and <varname>pypy</varname>.
200200+</para>
201201+202202+<para>
203203+ <varname>python</varname> is an alias of <varname>python27</varname> and <varname>python3</varname> is an alias of <varname>python34</varname>.
204204+</para>
205205+206206+<para>
207207+ <varname>python26</varname> and <varname>python27</varname> do not include modules that require
208208+ external dependencies (to reduce dependency bloat). Following modules need to be added as
209209+ <varname>buildInput</varname> explicitly:
210210+</para>
211211+212212+<itemizedlist>
213213+ <listitem><para><varname>python.modules.bsddb</varname></para></listitem>
214214+ <listitem><para><varname>python.modules.curses</varname></para></listitem>
215215+ <listitem><para><varname>python.modules.curses_panel</varname></para></listitem>
216216+ <listitem><para><varname>python.modules.crypt</varname></para></listitem>
217217+ <listitem><para><varname>python.modules.gdbm</varname></para></listitem>
218218+ <listitem><para><varname>python.modules.sqlite3</varname></para></listitem>
219219+ <listitem><para><varname>python.modules.tkinter</varname></para></listitem>
220220+ <listitem><para><varname>python.modules.readline</varname></para></listitem>
221221+</itemizedlist>
222222+223223+<para>For convenience <varname>python27Full</varname> and <varname>python26Full</varname>
224224+are provided with all modules included.</para>
195225196226<para>
197227 Python packages that
198198- use <link xlink:href="http://pypi.python.org/pypi/setuptools/"><literal>setuptools</literal></link>,
199199- which many Python packages do nowadays, can be built very simply using
200200- the <varname>buildPythonPackage</varname> function. This function is
201201- implemented
202202- in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix"><filename>pkgs/development/python-modules/generic/default.nix</filename></link>
203203- and works similarly to <varname>buildPerlPackage</varname>. (See
204204- <xref linkend="ssec-language-perl"/> for details.)
228228+ use <link xlink:href="http://pypi.python.org/pypi/setuptools/"><literal>setuptools</literal></link> or <literal>distutils</literal>,
229229+ can be built using the <varname>buildPythonPackage</varname> function as documented below.
205230</para>
206231207232<para>
208208- Python packages that use <varname>buildPythonPackage</varname> are
209209- defined
210210- in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>.
211211- Most of them are simple. For example:
233233+ All packages depending on any Python interpreter get appended <varname>$out/${python.libPrefix}/site-packages</varname>
234234+ to <literal>$PYTHONPATH</literal> if such directory exists.
235235+</para>
236236+237237+<variablelist>
238238+ <title>
239239+ Useful attributes on interpreters packages:
240240+ </title>
241241+242242+ <varlistentry>
243243+ <term><varname>libPrefix</varname></term>
244244+ <listitem><para>
245245+ Name of the folder in <literal>${python}/lib/</literal> for corresponding interpreter.
246246+ </para></listitem>
247247+ </varlistentry>
248248+249249+ <varlistentry>
250250+ <term><varname>interpreter</varname></term>
251251+ <listitem><para>
252252+ Alias for <literal>${python}/bin/${executable}.</literal>
253253+ </para></listitem>
254254+ </varlistentry>
255255+256256+ <varlistentry>
257257+ <term><varname>buildEnv</varname></term>
258258+ <listitem><para>
259259+ Function to build python interpreter environments with extra packages bundled together.
260260+ See <xref linkend="python-build-env" /> for usage and documentation.
261261+ </para></listitem>
262262+ </varlistentry>
263263+264264+ <varlistentry>
265265+ <term><varname>sitePackages</varname></term>
266266+ <listitem><para>
267267+ Alias for <literal>lib/${libPrefix}/site-packages</literal>.
268268+ </para></listitem>
269269+ </varlistentry>
270270+271271+ <varlistentry>
272272+ <term><varname>executable</varname></term>
273273+ <listitem><para>
274274+ Name of the interpreter executable, ie <literal>python3.4</literal>.
275275+ </para></listitem>
276276+ </varlistentry>
277277+278278+</variablelist>
279279+<section xml:id="build-python-package"><title><varname>buildPythonPackage</varname> function</title>
280280+281281+ <para>
282282+ The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix">
283283+ <filename>pkgs/development/python-modules/generic/default.nix</filename></link>.
284284+ Example usage:
285285+286286+ <programlisting language="nix">
287287+ twisted = buildPythonPackage {
288288+ name = "twisted-8.1.0";
289289+290290+ src = pkgs.fetchurl {
291291+ url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
292292+ sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
293293+ };
294294+295295+ propagatedBuildInputs = [ self.ZopeInterface ];
296296+297297+ meta = {
298298+ homepage = http://twistedmatrix.com/;
299299+ description = "Twisted, an event-driven networking engine written in Python";
300300+ license = stdenv.lib.licenses.mit;
301301+ };
302302+ };
303303+ </programlisting>
304304+305305+ Most of Python packages that use <varname>buildPythonPackage</varname> are defined
306306+ in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>
307307+ and generated for each python interpreter separately into attribute sets <varname>python26Packages</varname>,
308308+ <varname>python27Packages</varname>, <varname>python32Packages</varname>, <varname>python33Packages</varname>,
309309+ <varname>python34Packages</varname> and <varname>pypyPackages</varname>.
310310+ </para>
311311+312312+ <para>
313313+ <function>buildPythonPackage</function> mainly does four things:
314314+315315+ <orderedlist>
316316+ <listitem><para>
317317+ In the <varname>configurePhase</varname>, it patches
318318+ <literal>setup.py</literal> to always include setuptools before
319319+ distutils for monkeypatching machinery to take place.
320320+ </para></listitem>
321321+322322+ <listitem><para>
323323+ In the <varname>buildPhase</varname>, it calls
324324+ <literal>${python.interpreter} setup.py build ...</literal>
325325+ </para></listitem>
326326+327327+ <listitem><para>
328328+ In the <varname>installPhase</varname>, it calls
329329+ <literal>${python.interpreter} setup.py install ...</literal>
330330+ </para></listitem>
331331+332332+ <listitem><para>
333333+ In the <varname>postFixup</varname> phase, <literal>wrapPythonPrograms</literal>
334334+ bash function is called to wrap all programs in <filename>$out/bin/*</filename>
335335+ directory to include <literal>$PYTHONPATH</literal> and <literal>$PATH</literal>
336336+ environment variables.
337337+ </para></listitem>
338338+ </orderedlist>
339339+ </para>
340340+341341+ <para>By default <varname>doCheck = true</varname> is set and tests are run with
342342+ <literal>${python.interpreter} setup.py test</literal> command in <varname>checkPhase</varname>.</para>
343343+344344+ <para><varname>propagatedBuildInputs</varname> packages are propagated to user environment.</para>
345345+346346+ <para>
347347+ By default <varname>meta.platforms</varname> is set to the same value
348348+ as the interpreter unless overriden otherwise.
349349+ </para>
350350+351351+ <variablelist>
352352+ <title>
353353+ <varname>buildPythonPackage</varname> parameters
354354+ (all parameters from <varname>mkDerivation</varname> function are still supported)
355355+ </title>
356356+357357+ <varlistentry>
358358+ <term><varname>namePrefix</varname></term>
359359+ <listitem><para>
360360+ Prepended text to <varname>${name}</varname> parameter.
361361+ Defaults to <literal>"python3.3-"</literal> for Python 3.3, etc. Set it to
362362+ <literal>""</literal>
363363+ if you're packaging an application or a command line tool.
364364+ </para></listitem>
365365+ </varlistentry>
366366+367367+ <varlistentry>
368368+ <term><varname>disabled</varname></term>
369369+ <listitem><para>
370370+ If <varname>true</varname>, package is not build for
371371+ particular python interpreter version. Grep around
372372+ <filename>pkgs/top-level/python-packages.nix</filename>
373373+ for examples.
374374+ </para></listitem>
375375+ </varlistentry>
376376+377377+ <varlistentry>
378378+ <term><varname>setupPyInstallFlags</varname></term>
379379+ <listitem><para>
380380+ List of flags passed to <command>setup.py install</command> command.
381381+ </para></listitem>
382382+ </varlistentry>
383383+384384+ <varlistentry>
385385+ <term><varname>setupPyBuildFlags</varname></term>
386386+ <listitem><para>
387387+ List of flags passed to <command>setup.py build</command> command.
388388+ </para></listitem>
389389+ </varlistentry>
390390+391391+ <varlistentry>
392392+ <term><varname>pythonPath</varname></term>
393393+ <listitem><para>
394394+ List of packages to be added into <literal>$PYTHONPATH</literal>.
395395+ Packages in <varname>pythonPath</varname> are not propagated into user environment
396396+ (contrary to <varname>propagatedBuildInputs</varname>).
397397+ </para></listitem>
398398+ </varlistentry>
399399+400400+ <varlistentry>
401401+ <term><varname>preShellHook</varname></term>
402402+ <listitem><para>
403403+ Hook to execute commands before <varname>shellHook</varname>.
404404+ </para></listitem>
405405+ </varlistentry>
406406+407407+ <varlistentry>
408408+ <term><varname>postShellHook</varname></term>
409409+ <listitem><para>
410410+ Hook to execute commands after <varname>shellHook</varname>.
411411+ </para></listitem>
412412+ </varlistentry>
413413+414414+ <varlistentry>
415415+ <term><varname>distutilsExtraCfg</varname></term>
416416+ <listitem><para>
417417+ Extra lines passed to <varname>[easy_install]</varname> section of
418418+ <filename>distutils.cfg</filename> (acts as global setup.cfg
419419+ configuration).
420420+ </para></listitem>
421421+ </varlistentry>
422422+423423+ </variablelist>
424424+425425+</section>
426426+427427+<section xml:id="python-build-env"><title><function>python.buildEnv</function> function</title>
428428+ <para>
429429+ Create Python envorinments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>:
430430+431431+ <programlisting language="nix">
432432+ <![CDATA[
433433+ with import <nixpkgs> {};
434434+435435+ python.buildEnv.override {
436436+ extraLibs = [ pkgs.pythonPackages.pyramid ];
437437+ ignoreCollisions = true;
438438+ }
439439+ ]]>
440440+ </programlisting>
441441+442442+ Running <command>nix-build</command> will create
443443+ <filename>/nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env</filename>
444444+ with wrapped binaries in <filename>bin/</filename>.
445445+ </para>
446446+447447+ <variablelist>
448448+ <title>
449449+ <function>python.buildEnv</function> arguments
450450+ </title>
451451+452452+ <varlistentry>
453453+ <term><varname>extraLibs</varname></term>
454454+ <listitem><para>
455455+ List of packages installed inside the environment.
456456+ </para></listitem>
457457+ </varlistentry>
458458+459459+ <varlistentry>
460460+ <term><varname>postBuild</varname></term>
461461+ <listitem><para>
462462+ Shell command executed after the build of environment.
463463+ </para></listitem>
464464+ </varlistentry>
465465+466466+ <varlistentry>
467467+ <term><varname>ignoreCollisions</varname></term>
468468+ <listitem><para>
469469+ Ignore file collisions inside the environment (default is <varname>false</varname>).
470470+ </para></listitem>
471471+ </varlistentry>
472472+ </variablelist>
473473+</section>
474474+475475+<section xml:id="python-tools"><title>Tools</title>
476476+477477+<para>Packages inside nixpkgs are written by hand. However many tools
478478+exist in community to help save time. No tool is prefered at the moment.
479479+</para>
480480+481481+<itemizedlist>
482482+483483+ <listitem><para>
484484+ <link xlink:href="https://github.com/proger/python2nix">python2nix</link>
485485+ by Vladimir Kirillov
486486+ </para></listitem>
487487+488488+ <listitem><para>
489489+ <link xlink:href="https://github.com/garbas/pypi2nix">pypi2nix</link>
490490+ by Rok Garbas
491491+ </para></listitem>
492492+493493+ <listitem><para>
494494+ <link xlink:href="https://github.com/offlinehacker/pypi2nix">pypi2nix</link>
495495+ by Jaka Hudoklin
496496+ </para></listitem>
497497+498498+</itemizedlist>
499499+500500+</section>
501501+502502+<section xml:id="python-development"><title>Development</title>
503503+504504+ <para>
505505+ To develop Python packages <function>bulidPythonPackage</function> has
506506+ additional logic inside <varname>shellPhase</varname> to run
507507+ <command>${python.interpreter} setup.py develop</command> for the package.
508508+ </para>
509509+510510+ <para>
511511+ Given a <filename>default.nix</filename>:
512512+513513+ <programlisting language="nix">
514514+ <![CDATA[
515515+ with import <nixpkgs> {};
516516+517517+ buildPythonPackage {
518518+ name = "myproject";
519519+520520+ buildInputs = with pkgs.pythonPackages; [ pyramid ];
521521+522522+ src = ./.;
523523+ }
524524+ ]]>
525525+ </programlisting>
526526+527527+ Running <command>nix-shell</command> with no arguments should give you
528528+ the environment in which the package would be build with
529529+ <command>nix-build</command>.
530530+ </para>
531531+532532+ <para>
533533+ Shortcut to setup environments with C headers/libraries and python packages:
534534+535535+ <programlisting language="bash">$ nix-shell -p pythonPackages.pyramid zlib libjpeg git</programlisting>
536536+ </para>
537537+538538+ <para>
539539+ Note: there is a boolean value <varname>lib.inNixShell</varname> set to
540540+ <varname>true</varname> if nix-shell is invoked.
541541+ </para>
212542213213- <programlisting>
214214-twisted = buildPythonPackage {
215215- name = "twisted-8.1.0";
543543+</section>
216544217217- src = fetchurl {
218218- url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2;
219219- sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl";
220220- };
545545+<section xml:id="python-faq"><title>FAQ</title>
221546222222- propagatedBuildInputs = [ pkgs.ZopeInterface ];
547547+<variablelist>
223548224224- meta = {
225225- homepage = http://twistedmatrix.com/;
226226- description = "Twisted, an event-driven networking engine written in Python";
227227- license = "MIT";
228228- };
229229-};
230230- </programlisting>
549549+ <varlistentry>
550550+ <term>How to solve circular dependencies?</term>
551551+ <listitem><para>
552552+ If you have packages <varname>A</varname> and <varname>B</varname> that
553553+ depend on each other, when packaging <varname>B</varname> override package
554554+ <varname>A</varname> not to depend on <varname>B</varname> as input
555555+ (and also the other way around).
556556+ </para></listitem>
557557+ </varlistentry>
558558+559559+ <varlistentry>
560560+ <term><varname>install_data / data_files</varname> problems resulting into <literal>error: could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': Permission denied</literal></term>
561561+ <listitem><para>
562562+ <link xlink:href="https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix">
563563+ Known bug in setuptools <varname>install_data</varname> does not respect --prefix</link>. Example of
564564+ such package using the feature is <filename>pkgs/tools/X11/xpra/default.nix</filename>. As workaround
565565+ install it as an extra <varname>preInstall</varname> step:
566566+567567+ <programlisting>${python.interpreter} setup.py install_data --install-dir=$out --root=$out
568568+sed -i '/ = data_files/d' setup.py</programlisting>
569569+ </para></listitem>
570570+ </varlistentry>
571571+572572+ <varlistentry>
573573+ <term>Rationale of non-existent global site-packages</term>
574574+ <listitem><para>
575575+ There is no need to have global site-packages in Nix. Each package has isolated
576576+ dependency tree and installing any python package will only populate <varname>$PATH</varname>
577577+ inside user environment. See <xref linkend="python-build-env" /> to create self-contained
578578+ interpreter with a set of packages.
579579+ </para></listitem>
580580+ </varlistentry>
581581+582582+</variablelist>
583583+584584+</section>
585585+586586+587587+<section xml:id="python-contrib"><title>Contributing guidelines</title>
588588+<para>
589589+ Following rules are desired to be respected:
231590</para>
591591+592592+<itemizedlist>
593593+594594+ <listitem><para>
595595+ Make sure package builds for all python interpreters. Use <varname>disabled</varname> argument to
596596+ <function>buildPythonPackage</function> to set unsupported interpreters.
597597+ </para></listitem>
598598+599599+ <listitem><para>
600600+ If tests need to be disabled for a package, make sure you leave a comment about reasoning.
601601+ </para></listitem>
602602+603603+ <listitem><para>
604604+ Packages in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/python-packages.nix"><filename>pkgs/top-level/python-packages.nix</filename></link>
605605+ are sorted quasi-alphabetically to avoid merge conflicts.
606606+ </para></listitem>
607607+608608+</itemizedlist>
609609+610610+</section>
232611233612</section>
234613
+2-5
doc/stdenv.xml
···11201120 <varlistentry>
11211121 <term>Python</term>
11221122 <listitem><para>Adds the
11231123- <filename>lib/python2.5/site-packages</filename> subdirectory of
11231123+ <filename>lib/${python.libPrefix}/site-packages</filename> subdirectory of
11241124 each build input to the <envar>PYTHONPATH</envar> environment
11251125- variable.</para>
11261126-11271127- <note><para>This should be generalised: the Python version
11281128- shouldn’t be hard-coded.</para></note></listitem>
11251125+ variable.</para></listitem>
11291126 </varlistentry>
1130112711311128 <varlistentry>
+10
lib/lists.nix
···223223224224 crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [f];
225225226226+ # Remove duplicate elements from the list
227227+ unique = list:
228228+ if list == [] then
229229+ []
230230+ else
231231+ let
232232+ x = head list;
233233+ xs = unique (drop 1 list);
234234+ in [x] ++ remove x xs;
235235+226236}
···4545 # Add support for cow filesystems and their utilities
4646 boot.supportedFilesystems = [ "zfs" "btrfs" ];
47474848+ # Configure host id for ZFS to work
4949+ networking.hostId = "8425e349";
5050+4851 # Allow the user to log in as root without a password.
4952 users.extraUsers.root.initialHashedPassword = "";
5053}
···476476EOF
477477 }
478478479479+ # Generate a random 32-bit value to use as the host id
480480+ open my $rnd, "<", "/dev/urandom" or die $!;
481481+ read $rnd, $hostIdBin, 4;
482482+ close $rnd;
483483+484484+ # Convert the 32-bit value to a hex string
485485+ my $hostIdHex = unpack("H*", $hostIdBin);
486486+479487 write_file($fn, <<EOF);
480488# Edit this configuration file to define what should be installed on
481489# your system. Help is available in the configuration.nix(5) man page
···491499492500$bootLoaderConfig
493501 # networking.hostName = "nixos"; # Define your hostname.
502502+ networking.hostId = "$hostIdHex";
494503 # networking.wireless.enable = true; # Enables wireless.
495504496505 # Select internationalisation properties.
+1
nixos/modules/misc/ids.nix
···158158 seeks = 148;
159159 prosody = 149;
160160 i2pd = 150;
161161+ dnscrypt-proxy = 151;
161162162163 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
163164
···9898 # Authorization: is the user allowed access?
9999 "authz_user" "authz_groupfile" "authz_host"
100100101101+ # For compatibility with old configurations, the new module mod_access_compat is provided.
102102+ (if version24 then "access_compat" else "")
103103+101104 # Other modules.
102105 "ext_filter" "include" "log_config" "env" "mime_magic"
103106 "cern_meta" "expires" "headers" "usertrack" /* "unique_id" */ "setenvif"
+4-1
nixos/modules/system/boot/stage-1-init.sh
···122122 esac
123123done
124124125125+# Set hostid before modules are loaded.
126126+# This is needed by the spl/zfs modules.
127127+@setHostId@
125128126129# Load the required kernel modules.
127130mkdir -p /lib
···398401# Start stage 2. `switch_root' deletes all files in the ramfs on the
399402# current root. Note that $stage2Init might be an absolute symlink,
400403# in which case "-e" won't work because we're not in the chroot yet.
401401-if ! test -e "$targetRoot/$stage2Init" -o -L "$targetRoot/$stage2Init"; then
404404+if ! test -e "$targetRoot/$stage2Init" -o ! -L "$targetRoot/$stage2Init"; then
402405 echo "stage 2 init script ($targetRoot/$stage2Init) not found"
403406 fail
404407fi
···139139 nlsSupport = config.vim.nls or false;
140140 tclSupport = config.vim.tcl or false;
141141 multibyteSupport = config.vim.multibyte or false;
142142- cscopeSupport = config.vim.cscope or false;
142142+ cscopeSupport = config.vim.cscope or true;
143143 netbeansSupport = config.netbeans or true; # eg envim is using it
144144145145 # by default, compile with darwin support if we're compiling on darwin, but
···11-{ stdenv, fetchurl, gcc, unzip, curl }:
11+{ stdenv, fetchurl, unzip, curl }:
2233stdenv.mkDerivation {
44- name = "dmd-2.064.2";
44+ name = "dmd-2.066.1";
5566 src = fetchurl {
77- url = http://downloads.dlang.org/releases/2013/dmd.2.064.2.zip;
88- sha256 = "1i0jdybigffwyb7c43j0c4aayxx3b93zzqrjxyw6zgp06yhi06pm";
77+ url = http://downloads.dlang.org/releases/2014/dmd.2.066.1.zip;
88+ sha256 = "1qifwgrl6h232zsnvcx3kmb5d0fsy7j9zv17r3b4vln7x5rvzc66";
99 };
10101111- buildInputs = [ gcc unzip curl ];
1111+ buildInputs = [ unzip curl ];
12121313- configurePhase = "";
1414- patchPhase = ''
1515- cp src/VERSION src/dmd/
1616- cp license.txt src/phobos/LICENSE_1_0.txt
1717- '';
1813 buildPhase = ''
1914 cd src/dmd
2015 make -f posix.mak INSTALL_DIR=$out
2116 export DMD=$PWD/dmd
2222- cd ../druntime
1717+ cd ../druntime
2318 make -f posix.mak INSTALL_DIR=$out DMD=$DMD
2419 cd ../phobos
2520 make -f posix.mak INSTALL_DIR=$out DMD=$DMD
···28232924 installPhase = ''
3025 cd src/dmd
3131- tee dmd.conf.default << EOF
3232- [Environment]
3333- DFLAGS=-I$out/import -L-L$out/lib
3434- EOF
2626+ mkdir $out
2727+ mkdir $out/bin
2828+ cp dmd $out/bin
35293636- make -f posix.mak INSTALL_DIR=$out install
3737- export DMD=$PWD/dmd
3838- cd ../druntime
3939- make -f posix.mak INSTALL_DIR=$out install
3030+ cd ../druntime
3131+ mkdir $out/include
3232+ mkdir $out/include/d2
3333+ cp -r import/* $out/include/d2
3434+4035 cd ../phobos
4141- make -f posix.mak INSTALL_DIR=$out install
4242- cd ../..
3636+ mkdir $out/lib
3737+ ${let bits = if stdenv.is64bit then "64" else "32"; in
3838+ "cp generated/linux/release/${bits}/libphobos2.a $out/lib"
3939+ }
4040+4141+ cp -r std $out/include/d2
4242+ cp -r etc $out/include/d2
4343+4444+ cd $out/bin
4545+ tee dmd.conf << EOF
4646+ [Environment]
4747+ DFLAGS=-I$out/include/d2 -L-L$out/lib -L--no-warn-search-mismatch -L--export-dynamic
4848+ EOF
4349 '';
44504545- meta = {
5151+ meta = with stdenv.lib; {
4652 description = "D language compiler";
4753 homepage = http://dlang.org/;
4848- license = "open source, see included files";
4949- maintainers = with stdenv.lib.maintainers; [ vlstill ];
5050- platforms = stdenv.lib.platforms.unix;
5454+ license = licenses.free; # parts under different licenses
5555+ platforms = platforms.unix;
5156 };
5257}
5858+
+9-3
pkgs/development/compilers/mozart/binary.nix
···22222323 meta = with stdenv.lib; {
2424 homepage = "http://www.mozart-oz.org/";
2525- description = "The Mozart Programming System combines ongoing research in programming language design and implementation, constraint logic programming, distributed computing, and human-computer interfaces. Mozart implements the Oz language and provides both expressive power and advanced functionality.";
2626-2525+ description = "Multiplatform implementation of the Oz programming language";
2626+ longDescription = ''
2727+ The Mozart Programming System combines ongoing research in
2828+ programming language design and implementation, constraint logic
2929+ programming, distributed computing, and human-computer
3030+ interfaces. Mozart implements the Oz language and provides both
3131+ expressive power and advanced functionality.
3232+ '';
2733 license = licenses.mit;
2828- platforms = ["x86_64-linux"];
3434+ platforms = [ "x86_64-linux" ];
2935 };
3036}
···11-{ stdenv, fetchurl, cairo, file, pango, glib, gtk
22-, which, libtool, makeWrapper, libjpeg, libpng
33-, fontconfig, liberation_ttf, sqlite, openssl } :
11+{ stdenv, fetchurl, cairo, file, fontconfig, glib, gtk, freefont_ttf
22+, libjpeg, libpng, libtool, makeWrapper, openssl, pango, sqlite, which } :
4354stdenv.mkDerivation rec {
65 pname = "racket";
77- version = "6.1";
66+ version = "6.1.1";
87 name = "${pname}-${version}";
98109 src = fetchurl {
1110 url = "http://mirror.racket-lang.org/installers/${version}/${name}-src.tgz";
1212- sha256 = "fde283bf5899bb9266ce721db44631c9bac4a4864a7c3211de413fd9503178c6";
1111+ sha256 = "090269522d20e7a5ce85d2251a126745746ebf5e87554c05efe03f3b7173da75";
1312 };
14131515- # Various racket executables do run-time searches for these.
1616- ffiSharedLibs = "${glib}/lib:${cairo}/lib:${pango}/lib:${gtk}/lib:${libjpeg}/lib:${libpng}/lib:${sqlite}/lib:${openssl}/lib";
1414+ # Various Racket executables do runtime searches for these.
1515+ ffiSharedLibs = "${cairo}/lib:${fontconfig}/lib:${glib}/lib:${gtk}/lib:${libjpeg}/lib:"
1616+ + "${libpng}/lib:${openssl}/lib:${pango}/lib:${sqlite}/lib";
17171818- buildInputs = [ file libtool which makeWrapper fontconfig liberation_ttf sqlite ];
1818+ buildInputs = [ file fontconfig freefont_ttf libtool makeWrapper sqlite which ];
19192020 preConfigure = ''
2121 export LD_LIBRARY_PATH=${ffiSharedLibs}:$LD_LIBRARY_PATH
22222323- # Chroot builds do not have access to /etc/fonts/fonts.conf, but the Racket bootstrap
2424- # needs a working fontconfig, so here a simple standin is used.
2323+ # Chroot builds do not have access to /etc/fonts/fonts.conf,
2424+ # but the Racket bootstrap needs a working fontconfig,
2525+ # so here a simple temporary stand-in is used.
2526 mkdir chroot-fontconfig
2627 cat ${fontconfig}/etc/fonts/fonts.conf > chroot-fontconfig/fonts.conf
2728 sed -e 's@</fontconfig>@@' -i chroot-fontconfig/fonts.conf
2828- echo "<dir>${liberation_ttf}</dir>" >> chroot-fontconfig/fonts.conf
2929+ echo "<dir>${freefont_ttf}</dir>" >> chroot-fontconfig/fonts.conf
2930 echo "</fontconfig>" >> chroot-fontconfig/fonts.conf
30313232+ # remove extraneous directories from temporary fonts.conf
3333+ sed -e 's@<dir></dir>@@g' \
3434+ -e 's@<dir prefix="xdg">fonts</dir>@@g' \
3535+ -e 's@<dir>~/.fonts</dir>@@g' \
3636+ -e 's@<cachedir prefix="xdg">fontconfig</cachedir>@@g' \
3737+ -e 's@<cachedir>~/.fontconfig</cachedir>@@g' \
3838+ -i chroot-fontconfig/fonts.conf
3939+3140 export FONTCONFIG_FILE=$(pwd)/chroot-fontconfig/fonts.conf
32413342 cd src
3443 sed -e 's@/usr/bin/uname@'"$(which uname)"'@g' -i configure
3535- sed -e 's@/usr/bin/file@'"$(which file)"'@g' -i foreign/libffi/configure
4444+ sed -e 's@/usr/bin/file@'"$(which file)"'@g' -i foreign/libffi/configure
3645 '';
37463847 configureFlags = [ "--enable-shared" "--enable-lt=${libtool}/bin/libtool" ];
···41504251 postInstall = ''
4352 for p in $(ls $out/bin/) ; do
4444- wrapProgram $out/bin/$p --prefix LD_LIBRARY_PATH ":" "${ffiSharedLibs}" ;
5353+ wrapProgram $out/bin/$p --prefix LD_LIBRARY_PATH ":" "${ffiSharedLibs}";
4554 done
4655 '';
47564857 meta = {
4949- description = "Programming language derived from Scheme (formerly called PLT Scheme)";
5858+ description = "A programmable programming language";
5059 longDescription = ''
5151- Racket (formerly called PLT Scheme) is a programming language derived
5252- from Scheme. The Racket project has four primary components: the
5353- implementation of Racket, a JIT compiler; DrRacket, the Racket program
5454- development environment; the TeachScheme! outreach, an attempt to turn
5555- Computing and Programming into "an indispensable part of the liberal
5656- arts curriculum"; and PLaneT, Racket's web-based package
5757- distribution system for user-contributed packages.
6060+ Racket is a full-spectrum programming language. It goes beyond
6161+ Lisp and Scheme with dialects that support objects, types,
6262+ laziness, and more. Racket enables programmers to link
6363+ components written in different dialects, and it empowers
6464+ programmers to create new, project-specific dialects. Racket's
6565+ libraries support applications from web servers and databases to
6666+ GUIs and charts.
5867 '';
59686069 homepage = http://racket-lang.org/;
6161- license = stdenv.lib.licenses.lgpl2Plus; # and licenses of contained libraries
6262- maintainers = [ stdenv.lib.maintainers.kkallio ];
7070+ license = stdenv.lib.licenses.lgpl3;
7171+ maintainers = with stdenv.lib.maintainers; [ kkallio henrytill ];
6372 platforms = stdenv.lib.platforms.linux;
6473 };
6574}
···11+22+Context:
33+44+[make the #L reader macro standard conformant by not assuming anything about the representation of quasiquoted forms.
55+Douglas Katzman <dougk@google.com>**20140423044759
66+ Ignore-this: ccdda48acdf7b2033ac0f51ed48582fc
77+]
88+99+[fix for test for.previous.var-with-type-declaration
1010+Jan Moringen <jmoringe@techfak.uni-bielefeld.de>**20140129144214
1111+ Ignore-this: a617d046d90816827d370d3bbf38d2df
1212+]
1313+1414+[housekeeping
1515+attila.lendvai@gmail.com**20140129143709
1616+ Ignore-this: a05c5fbace98b282a464b829711e064f
1717+]
1818+1919+[added test for.previous.var-with-type-declaration
2020+attila.lendvai@gmail.com**20140129143435
2121+ Ignore-this: 6e9f419e118724c660d519c3fa9f8dd2
2222+]
2323+2424+[added a restart to remove conflicting clauses
2525+Russ Tyndall <russ@acceleration.net>**20120508185107
2626+ Ignore-this: b7c4c6eec565dd435b8e9e5403fcb0a8
2727+]
2828+2929+[added new failing test bug/collect-at-beginning, as reported by Paul Sexton
3030+attila.lendvai@gmail.com**20121218144220
3131+ Ignore-this: d55e7c22deeaf89b90d03d7ef01179d6
3232+]
3333+3434+[Fix: If both AT BEGINNING and RESULT-TYPE are specified, RESULT-TYPE was ignored.
3535+attila.lendvai@gmail.com**20120509225435
3636+ Ignore-this: 20cf116df585ffedfbe63ce7a4092249
3737+3838+ Patched by Ilya Perminov
3939+]
4040+4141+[fix package nickname in case sensitive mode
4242+attila.lendvai@gmail.com**20110927152614
4343+ Ignore-this: fb1ba1d418b4a20a0cd4e697d943a0e6
4444+]
4545+4646+[move list-of-forms? out of the #L eval-when, because it's also used by other parts of iterate
4747+attila.lendvai@gmail.com**20110119161133
4848+ Ignore-this: 97545988c4a3eab02434f222120b1a1
4949+]
5050+5151+[added bug/walk.2
5252+attila.lendvai@gmail.com**20100603093335
5353+ Ignore-this: faa1bd48d0450e76652552bb47bcff02
5454+]
5555+5656+[first-time-p bugfix: return-code :body must return list of forms
5757+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070525141533
5858+ if-first-time not declared obsolete
5959+ documentation strings for (iter:display-iterate-clauses) complete
6060+]
6161+6262+[fix defmacro-driver example in manual
6363+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070525081443]
6464+6565+[Use @:, @. and two spaces between sentences
6666+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070525080932
6767+ Move section on predicate (first-time-p) outside of gathering clauses
6868+ Various typos and some clarifications
6969+]
7070+7171+[document *list-end-test* removal in FOR...IN+ON
7272+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070525074338]
7373+7474+[Renamed back to sharpL-reader
7575+attila.lendvai@gmail.com**20070506100744]
7676+7777+[Fix sharpL reader, add :execute to the eval-when to make (load "iterate" :compiling t) work on clisp
7878+attila.lendvai@gmail.com**20070506100704]
7979+8080+[Convert manual to Texinfo.
8181+Luis Oliveira <loliveira@common-lisp.net>**20060713142915]
8282+8383+[make FOR...IN/ON with dotted lists work like LOOP
8484+hoehle@users.sourceforge.net**20070503130604
8585+ More precisely, FOR ON accepts dotted lists, FOR IN errors out.
8686+ As a result, iterate::*list-end-test* was eliminated.
8787+ Behaviour is now constant and does not depend on some special variable.
8888+ Note: Documentation not yet updated, pending move to Texinfo.
8989+]
9090+9191+[walk-tagbody: more testcases
9292+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070503095309]
9393+9494+[walk-tagbody must not macroexpand symbol/tags among its statements
9595+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070404124132]
9696+9797+[add ELSE test cases, remove GNU Arch tag
9898+Joerg-Cyril Hoehle <hoehle@users.sourceforge.net>**20070503093008]
9999+100100+[Clean up #L stuff, do not leave #L enabled after loading iterate
101101+attila.lendvai@gmail.com**20070426153431]
102102+103103+[Set *list-end-test* to 'endp instead of 'atom, so (iter (for foo :in something-non-list)) fails instead of silently exists
104104+attila.lendvai@gmail.com**20070215151652]
105105+106106+[wrap code in progns, to avoid possiblity of multiple nil tags in tagbody
107107+ Henrik Hjelte <henrik@evahjelte.com>**20061025145324]
108108+109109+[test to detect bug, more than one nil tag in tagbody
110110+ Henrik Hjelte <henrik@evahjelte.com>**20061025145128]
111111+112112+[Added release.sh
113113+attila.lendvai@gmail.com**20060506155953]
114114+115115+[TAG 1.4.3
116116+attila.lendvai@gmail.com**20060505134701]
···11+diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
22+index 33f9e0e..2f55e56 100644
33+--- a/module/zfs/zfs_vnops.c
44++++ b/module/zfs/zfs_vnops.c
55+@@ -474,15 +474,6 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
66+ }
77+88+ /*
99+- * Check for mandatory locks
1010+- */
1111+- if (mandatory_lock(ip) &&
1212+- !lock_may_read(ip, uio->uio_loffset, uio->uio_resid)) {
1313+- ZFS_EXIT(zsb);
1414+- return (SET_ERROR(EAGAIN));
1515+- }
1616+-
1717+- /*
1818+ * If we're in FRSYNC mode, sync out this znode before reading it.
1919+ */
2020+ if (ioflag & FRSYNC || zsb->z_os->os_sync == ZFS_SYNC_ALWAYS)
2121+@@ -651,15 +642,6 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
2222+ }
2323+2424+ /*
2525+- * Check for mandatory locks before calling zfs_range_lock()
2626+- * in order to prevent a deadlock with locks set via fcntl().
2727+- */
2828+- if (mandatory_lock(ip) && !lock_may_write(ip, woff, n)) {
2929+- ZFS_EXIT(zsb);
3030+- return (SET_ERROR(EAGAIN));
3131+- }
3232+-
3333+- /*
3434+ * Pre-fault the pages to ensure slow (eg NFS) pages
3535+ * don't hold up txg.
3636+ * Skip this if uio contains loaned arc_buf.
3737+diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
3838+index 90dbfd3..f02c021 100644
3939+--- a/module/zfs/zfs_znode.c
4040++++ b/module/zfs/zfs_znode.c
4141+@@ -1546,7 +1546,6 @@ zfs_trunc(znode_t *zp, uint64_t end)
4242+ int
4343+ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
4444+ {
4545+- struct inode *ip = ZTOI(zp);
4646+ dmu_tx_t *tx;
4747+ zfs_sb_t *zsb = ZTOZSB(zp);
4848+ zilog_t *zilog = zsb->z_log;
4949+@@ -1567,15 +1566,6 @@ zfs_freesp(znode_t *zp, uint64_t off, uint64_t len, int flag, boolean_t log)
5050+ goto out;
5151+ }
5252+5353+- /*
5454+- * Check for any locks in the region to be freed.
5555+- */
5656+- if (ip->i_flock && mandatory_lock(ip)) {
5757+- uint64_t length = (len ? len : zp->z_size - off);
5858+- if (!lock_may_write(ip, off, length))
5959+- return (SET_ERROR(EAGAIN));
6060+- }
6161+-
6262+ if (len == 0) {
6363+ error = zfs_trunc(zp, off);
6464+ } else {
+29
pkgs/servers/zeromq/default.nix
···11+{ stdenv, fetchurl }:
22+33+stdenv.mkDerivation rec {
44+ name = "zeromq";
55+ version = "4.1.0-rc1";
66+77+ src = fetchurl {
88+ url = "http://download.zeromq.org/${name}-${version}.tar.gz";
99+ sha256 = "e8e6325abe2ede0a9fb3d1abbe425d8a7911f6ac283652ee49b36afbb0164d60";
1010+ };
1111+1212+ doCheck = true;
1313+1414+ meta = {
1515+ description = "0MQ is a lightweight messaging kernel";
1616+ longDescription = ''
1717+ The 0MQ lightweight messaging kernel is a library which extends
1818+ the standard socket interfaces with features traditionally provided
1919+ by specialised messaging middleware products. 0MQ sockets provide
2020+ an abstraction of asynchronous message queues, multiple messaging patterns,
2121+ message filtering (subscriptions), seamless access to multiple transport protocols
2222+ and more.
2323+ '';
2424+ homepage = http://zeromq.org/;
2525+ license = stdenv.lib.licenses.gpl3;
2626+ maintainers = [ stdenv.lib.maintainers.gavin ];
2727+ platforms = stdenv.lib.platforms.all;
2828+ };
2929+}
+1
pkgs/stdenv/generic/default.nix
···183183 isArm = system == "armv5tel-linux"
184184 || system == "armv6l-linux"
185185 || system == "armv7l-linux";
186186+ isBigEndian = system == "powerpc-linux";
186187187188 # Whether we should run paxctl to pax-mark binaries.
188189 needsPax = isLinux;