Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into zalora
Browse files Browse the repository at this point in the history
From comments I added to lib/modules.nix:

> adding _file to modules breaks modularly declaring arguments, so we
> don't do it for now on our fork for non-attrs

This only affects generated module documentation, so shouldn't be a
problem before we can ditch the module system all together.

Fixes NixOS#6

Conflicts:
	lib/types.nix
	pkgs/top-level/haskell-packages.nix
  • Loading branch information
shlevy committed Sep 29, 2014
2 parents 21724d8 + f5aaefb commit 8943e39
Show file tree
Hide file tree
Showing 1,737 changed files with 45,152 additions and 17,520 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: python
python: "3.4"
script: ./maintainers/scripts/travis-nox-review-pr.sh
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if ! builtins ? nixVersion || builtins.compareVersions "1.6" builtins.nixVersion == 1 then
if ! builtins ? nixVersion || builtins.compareVersions "1.7" builtins.nixVersion == 1 then

abort "This version of Nixpkgs requires Nix >= 1.6, please upgrade!"
abort "This version of Nixpkgs requires Nix >= 1.7, please upgrade!"

else

Expand Down
64 changes: 64 additions & 0 deletions doc/language-support.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,22 @@ twisted = buildPythonPackage {
</section>


<section xml:id="ssec-language-ruby"><title>Ruby</title>
<para>For example, to package yajl-ruby package, use gem-nix:</para>

<screen>
$ nix-env -i gem-nix
$ gem-nix --no-user-install --nix-file=pkgs/development/interpreters/ruby/generated.nix yajl-ruby
$ nix-build -A rubyLibs.yajl-ruby
</screen>
</section>


<section xml:id="ssec-language-go"><title>Go</title>
<para>To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/cstrahan/go2nix">go2nix</link>.</para>
</section>


<section xml:id="ssec-language-java"><title>Java</title>

<para>Ant-based Java packages are typically built from source as follows:
Expand Down Expand Up @@ -314,6 +330,54 @@ Runtime) instead of the OpenJRE.</para>
</section>


<section xml:id="ssec-language-lua"><title>Lua</title>

<para>
Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is
implemented
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules/generic/default.nix">
<filename>pkgs/development/lua-modules/generic/default.nix</filename></link>
and works similarly to <varname>buildPerlPackage</varname>. (See
<xref linkend="ssec-language-perl"/> for details.)
</para>

<para>
Lua packages are defined
in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/lua-packages.nix"><filename>pkgs/top-level/lua-packages.nix</filename></link>.
Most of them are simple. For example:

<programlisting>
fileSystem = buildLuaPackage {
name = "filesystem-1.6.2";
src = fetchurl {
url = "https://github.com/keplerproject/luafilesystem/archive/v1_6_2.tar.gz";
sha256 = "1n8qdwa20ypbrny99vhkmx8q04zd2jjycdb5196xdhgvqzk10abz";
};
meta = {
homepage = "https://github.com/keplerproject/luafilesystem";
hydraPlatforms = stdenv.lib.platforms.linux;
maintainers = with maintainers; [ flosse ];
};
};
</programlisting>
</para>

<para>
Though, more complicated package should be placed in a seperate file in
<link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/lua-modules"><filename>pkgs/development/lua-modules</filename></link>.
</para>
<para>
Lua packages accept additional parameter <varname>disabled</varname>, which defines
the condition of disabling package from luaPackages. For example, if package has
<varname>disabled</varname> assigned to <literal>lua.luaversion != "5.1"</literal>,
it will not be included in any luaPackages except lua51Packages, making it
only be built for lua 5.1.
</para>

</section>


<!--
<section><title>Haskell</title>
Expand Down
28 changes: 24 additions & 4 deletions doc/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ hello-2.3 A program that produces a familiar, friendly greeting

<section><title>Standard meta-attributes</title>

<para>The following meta-attributes have a standard
interpretation:</para>
<para>It is expected that each meta-attribute is one of the following:</para>

<variablelist>

Expand All @@ -112,12 +111,23 @@ interpretation:</para>
package.</para></listitem>
</varlistentry>

<varlistentry>
<term><varname>version</varname></term>
<listitem><para>Package version.</para></listitem>
</varlistentry>

<varlistentry>
<term><varname>homepage</varname></term>
<listitem><para>The package’s homepage. Example:
<literal>http://www.gnu.org/software/hello/manual/</literal></para></listitem>
</varlistentry>

<varlistentry>
<term><varname>downloadPage</varname></term>
<listitem><para>The page where a link to the current version can be found. Example:
<literal>http://ftp.gnu.org/gnu/hello/</literal></para></listitem>
</varlistentry>

<varlistentry>
<term><varname>license</varname></term>
<listitem><para>The license for the package. One from the
Expand Down Expand Up @@ -195,6 +205,16 @@ meta.hydraPlatforms = [];
they are fixed.</para></listitem>
</varlistentry>

<varlistentry>
<term><varname>updateWalker</varname></term>
<listitem><para>If set to <literal>true</literal>, the package is
tested to be updated correctly by the <literal>update-walker.sh</literal>
script without additional settings. Such packages have
<varname>meta.version</varname> set and their homepage (or
the page specified by <varname>meta.downloadPage</varname>) contains
a direct link to the package tarball.</para></listitem>
</varlistentry>

</variablelist>


Expand Down Expand Up @@ -256,9 +276,9 @@ to indicate the specific license:
</variablelist>

</para>


</section>


</chapter>
11 changes: 0 additions & 11 deletions doc/quick-start.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,6 @@ $ git add pkgs/development/libraries/libfoo/default.nix</screen>
hackery.</para>
</listitem>

<listitem>
<para>BitTorrent (wxPython-based): <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/networking/p2p/bittorrent/default.nix"><filename>pkgs/tools/networking/p2p/bittorrent/default.nix</filename></link>.
Uses an external <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/networking/p2p/bittorrent/builder.sh">build
script</link>, which can be useful if you have lots of code
that you don’t want cluttering up the Nix expression. But
external builders are mostly obsolete.
</para>
</listitem>

<listitem>
<para>Thunderbird: <link
xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/networking/mailreaders/thunderbird/default.nix"><filename>pkgs/applications/networking/mailreaders/thunderbird/default.nix</filename></link>.
Expand Down
28 changes: 27 additions & 1 deletion lib/licenses.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,21 @@ rec {
fullName = ''BSD 4-clause "Original" or "Old" License'';
};

cc0 = spdx {
shortName = "CC0-1.0";
fullName = ''Creative Commons Zero v1.0 Universal'';
};

cc-by-30 = spdx {
shortName = "CC-BY-3.0";
fullName = "Creative Commons Attribution 3.0";
};

cc-by-40 = spdx {
shortName = "CC-BY-4.0";
fullName = "Creative Commons Attribution 4.0";
};

cddl = spdx {
shortName = "CDDL-1.0";
fullName = "Common Development and Distribution License 1.0";
Expand Down Expand Up @@ -172,6 +182,11 @@ rec {
fullName = "GNU Lesser General Public License v3.0 or later";
};

libpng = spdx {
shortName = "Libpng";
fullName = "libpng License";
};

libtiff = {
shortName = "libtiff";
fullName = "libtiff license";
Expand All @@ -189,6 +204,8 @@ rec {
fullName = "Lucent Public License v1.02";
};

# spdx.org does not (yet) differentiate between the X11 and Expat versions
# for details see http://en.wikipedia.org/wiki/MIT_License#Various_versions
mit = spdx {
shortName = "MIT";
fullName = "MIT License";
Expand All @@ -210,6 +227,11 @@ rec {
url = "http://research.microsoft.com/en-us/projects/pex/msr-la.txt";
};

ncsa = spdx {
shortName = "NCSA";
fullName = "University of Illinois/NCSA Open Source License";
};

ofl = spdx {
shortName = "OFL-1.1";
fullName = "SIL Open Font License 1.1";
Expand All @@ -220,6 +242,11 @@ rec {
fullName = "OpenSSL License";
};

postgresql = spdx {
shortName = "PostgreSQL";
fullName = "PostgreSQL License";
};

psfl = spdx {
shortName = "Python-2.0";
fullName = "Python Software Foundation License version 2";
Expand Down Expand Up @@ -270,4 +297,3 @@ rec {
};

}

4 changes: 4 additions & 0 deletions lib/lists.nix
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ in rec {
assert list != []; elemAt list (dec (length list));


# Return all elements but the last
init = list: assert list != []; take (length list - 1) list;


# Zip two lists together.
zipTwoLists = xs: ys:
let
Expand Down
25 changes: 24 additions & 1 deletion lib/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
akc = "Anders Claesson <akc@akc.is>";
algorith = "Dries Van Daele <dries_van_daele@telenet.be>";
all = "Nix Committers <nix-commits@lists.science.uu.nl>";
abbradar = "Nikolay Amiantov <nikoamia@gmail.com>";
amiddelk = "Arie Middelkoop <amiddelk@gmail.com>";
amorsillo = "Andrew Morsillo <andrew.morsillo@gmail.com>";
AndersonTorres = "Anderson Torres <torres.anderson.85@gmail.com>";
andres = "Andres Loeh <ksnixos@andres-loeh.de>";
antono = "Antono Vasiljev <self@antono.info>";
aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
arobyn = "Alexei Robyn <shados@shados.net>";
astsmtl = "Alexander Tsamutali <astsmtl@yandex.ru>";
aszlig = "aszlig <aszlig@redmoonstudios.org>";
Expand All @@ -27,24 +29,35 @@
bjg = "Brian Gough <bjg@gnu.org>";
bjornfor = "Bjørn Forsman <bjorn.forsman@gmail.com>";
bluescreen303 = "Mathijs Kwik <mathijs@bluescreen303.nl>";
bobvanderlinden = "Bob van der Linden <bobvanderlinden@gmail.com>";
bodil = "Bodil Stokke <nix@bodil.org>";
bosu = "Boris Sukholitko <boriss@gmail.com>";
calrama = "Moritz Maxeiner <moritz@ucworks.org>";
campadrenalin = "Philip Horger <campadrenalin@gmail.com>";
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
chaoflow = "Florian Friesdorf <flo@chaoflow.net>";
coconnor = "Corey O'Connor <coreyoconnor@gmail.com>";
copumpkin = "Dan Peebles <pumpkingod@gmail.com>";
coroa = "Jonas Hörsch <jonas@chaoflow.net>";
cstrahan = "Charles Strahan <charles.c.strahan@gmail.com>";
DamienCassou = "Damien Cassou <damien.cassou@gmail.com>";
DerGuteMoritz = "Moritz Heidkamp <moritz@twoticketsplease.de>";
dbohdan = "Danyil Bohdan <danyil.bohdan@gmail.com>";
dmalikov = "Dmitry Malikov <malikov.d.y@gmail.com>";
doublec = "Chris Double <chris.double@double.co.nz>";
ederoyd46 = "Matthew Brown <matt@ederoyd.co.uk>";
edwtjo = "Edward Tjörnhammar <ed@cflags.cc>";
eelco = "Eelco Dolstra <eelco.dolstra@logicblox.com>";
ellis = "Ellis Whitehead <nixos@ellisw.net>";
emery = "Emery Hemingway <emery@vfemail.net>";
ertes = "Ertugrul Söylemez <ertesx@gmx.de>";
falsifian = "James Cook <james.cook@utoronto.ca>";
flosse = "Markus Kohlhase <mail@markus-kohlhase.de>";
ftrvxmtrx = "Siarhei Zirukin <ftrvxmtrx@gmail.com>";
funfunctor = "Edward O'Callaghan <eocallaghan@alterapraxis.com>";
fuuzetsu = "Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>";
gal_bolle = "Florent Becker <florent.becker@ens-lyon.org>";
garbas = "Rok Garbas <rok@garbas.si>";
goibhniu = "Cillian de Róiste <cillian.deroiste@gmail.com>";
guibert = "David Guibert <david.guibert@gmail.com>";
Expand All @@ -59,21 +72,24 @@
joelteon = "Joel Taylor <me@joelt.io>";
jwiegley = "John Wiegley <johnw@newartisans.com>";
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
koral = "Koral <koral@mailoo.org>";
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
lethalman = "Luca Bruno <lucabru@src.gnome.org>";
lhvwb = "Nathaniel Baxter <nathaniel.baxter@gmail.com>";
linquize = "Linquize <linquize@yahoo.com.hk>";
lovek323 = "Jason O'Conal <jason@oconal.id.au>";
ludo = "Ludovic Courtès <ludo@gnu.org>";
madjar = "Georges Dubus <georges.dubus@compiletoi.net>";
manveru = "Michael Fellinger <m.fellinger@gmail.com>";
marcweber = "Marc Weber <marco-oweber@gmx.de>";
matejc = "Matej Cotman <cotman.matej@gmail.com>";
meisternu = "Matt Miemiec <meister@krutt.org>";
michelk = "Michel Kuhlmann <michel@kuhlmanns.info>";
modulistic = "Pablo Costa <modulistic@gmail.com>";
mornfall = "Petr Ročkai <me@mornfall.net>";
MP2E = "Cray Elliott <MP2E@archlinux.us>";
msackman = "Matthew Sackman <matthew@wellquite.org>";
nathan-gs = "Nathan Bijnens <nathan@nathan.gs>";
MP2E = "Cray Elliott <MP2E@archlinux.us>";
notthemessiah = "Brian Cohen <brian.cohen.88@gmail.com>";
ocharles = "Oliver Charles <ollie@ocharles.org.uk>";
offline = "Jaka Hudoklin <jakahudoklin@gmail.com>";
Expand All @@ -92,11 +108,14 @@
relrod = "Ricky Elrod <ricky@elrod.me>";
rickynils = "Rickard Nilsson <rickynils@gmail.com>";
rob = "Rob Vermaas <rob.vermaas@gmail.com>";
robberer = "Longrin Wischnewski <robberer@freakmail.de>";
roconnor = "Russell O'Connor <roconnor@theorem.ca>";
roelof = "Roelof Wobben <rwobben@hotmail.com>";
romildo = "José Romildo Malaquias <malaquias@gmail.com>";
rszibele = "Richard Szibele <richard_szibele@hotmail.com>";
rycee = "Robert Helgesson <robert@rycee.net>";
sander = "Sander van der Burg <s.vanderburg@tudelft.nl>";
sepi = "Raffael Mancini <raffael@mancini.lu>";
shlevy = "Shea Levy <shea@shealevy.com>";
simons = "Peter Simons <simons@cryp.to>";
skeidel = "Sven Keidel <svenkeidel@gmail.com>";
Expand All @@ -107,9 +126,12 @@
the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>";
thoughtpolice = "Austin Seipp <aseipp@pobox.com>";
tomberek = "Thomas Bereknyei <tomberek@gmail.com>";
tstrobel = "Thomas Strobel <ts468@cam.ac.uk>";
ttuegel = "Thomas Tuegel <ttuegel@gmail.com>";
tv = "Tomislav Viljetić <tv@shackspace.de>";
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
vandenoever = "Jos van den Oever <jos@vandenoever.info>";
vbgl = "Vincent Laporte <Vincent.Laporte@gmail.com>";
vbmithr = "Vincent Bernardoff <vb@luminar.eu.org>";
vcunat = "Vladimír Čunát <vcunat@gmail.com>";
viric = "Lluís Batlle i Rossell <viric@viric.name>";
Expand All @@ -120,6 +142,7 @@
wjlroe = "William Roe <willroe@gmail.com>";
wkennington = "William A. Kennington III <william@wkennington.com>";
wmertens = "Wout Mertens <Wout.Mertens@gmail.com>";
wyvie = "Elijah Rum <elijahrum@gmail.com>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zef = "Zef Hemel <zef@zef.me>";
zimbatm = "zimbatm <zimbatm@zimbatm.com>";
Expand Down
Loading

0 comments on commit 8943e39

Please sign in to comment.