diff --git a/.gitignore b/.gitignore index 16aaf68b70b..74de941b768 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,9 @@ result-* /doc/manual.pdf .version-suffix -.DS_Store \ No newline at end of file +.DS_Store + +/pkgs/applications/kde-apps-*/tmp/ +/pkgs/development/libraries/kde-frameworks-*/tmp/ +/pkgs/development/libraries/qt-5/*/tmp/ +/pkgs/desktops/plasma-*/tmp/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..dbb04e29ee0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: python +python: "3.4" +sudo: required +before_install: ./maintainers/scripts/travis-nox-review-pr.sh nix +install: ./maintainers/scripts/travis-nox-review-pr.sh nox +script: ./maintainers/scripts/travis-nox-review-pr.sh build diff --git a/.version b/.version index d3a61dbd830..7bc03e791d4 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -14.10 \ No newline at end of file +15.05 \ No newline at end of file diff --git a/README.md b/README.md index e59b15425e9..86a5568727e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,26 @@ -Nixpkgs is a collection of packages for [Nix](http://nixos.org/nix/) package -manager. Nixpkgs also includes [NixOS](http://nixos.org/nixos/) linux distribution source code. +[logo +](https://nixos.org/nixos) + +[![Build Status](https://travis-ci.org/NixOS/nixpkgs.svg?branch=master)](https://travis-ci.org/NixOS/nixpkgs) [![Issue Stats](http://www.issuestats.com/github/nixos/nixpkgs/badge/pr)](http://www.issuestats.com/github/nixos/nixpkgs) [![Issue Stats](http://www.issuestats.com/github/nixos/nixpkgs/badge/issue)](http://www.issuestats.com/github/nixos/nixpkgs) + +Nixpkgs is a collection of packages for [Nix](https://nixos.org/nix/) package +manager. + +[NixOS](https://nixos.org/nixos/) linux distribution source code is located inside `nixos/` folder. + +* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation) +* [Documentation (Nix Expression Language chapter)](https://nixos.org/nix/manual/#ch-expression-language) +* [Manual (How to write packages for Nix)](https://nixos.org/nixpkgs/manual/) +* [Manual (NixOS)](https://nixos.org/nixos/manual/) +* [Continuous package builds for unstable/master](https://hydra.nixos.org/jobset/nixos/trunk-combined) +* [Continuous package builds for 14.12 release](https://hydra.nixos.org/jobset/nixos/release-14.12) +* [Tests for unstable/master](https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents) +* [Tests for 14.12 release](https://hydra.nixos.org/job/nixos/release-14.12/tested#tabs-constituents) + +Communication: -* [NixOS installation instructions](http://nixos.org/nixos/manual/#ch-installation) -* [Manual (How to write packages for Nix)](http://nixos.org/nixpkgs/manual/) -* [Manual (NixOS)](http://nixos.org/nixos/manual/) -* [Continuous build](http://hydra.nixos.org/jobset/nixos/trunk-combined) -* [Tests](http://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents) * [Mailing list](http://lists.science.uu.nl/mailman/listinfo/nix-dev) * [IRC - #nixos on freenode.net](irc://irc.freenode.net/#nixos) + +--- +[![Throughput Graph](https://graphs.waffle.io/nixos/nixpkgs/throughput.svg)](https://waffle.io/nixos/nixpkgs/metrics) diff --git a/default.nix b/default.nix index c1b9bfd39f9..bdbe13b3ea2 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,6 @@ -if ! builtins ? nixVersion || builtins.compareVersions "1.6" builtins.nixVersion == 1 then +if ! builtins ? nixVersion || builtins.compareVersions "1.8" builtins.nixVersion == 1 then - abort "This version of Nixpkgs requires Nix >= 1.6, please upgrade!" + abort "This version of Nixpkgs requires Nix >= 1.8, please upgrade! See https://nixos.org/wiki/How_to_update_when_nix_is_too_old_to_evaluate_nixpkgs" else diff --git a/doc/contributing.xml b/doc/contributing.xml index bcea404baee..f622845bf1a 100644 --- a/doc/contributing.xml +++ b/doc/contributing.xml @@ -10,9 +10,7 @@ $ git clone git://github.com/NixOS/nixpkgs.git - $ cd nixpkgs/pkgs/top-level - - $ nix-build -A tarball release.nix + $ nix-build -A manual nixpkgs/pkgs/top-level/release.nix Inside the built derivation you shall see manual/index.html file. diff --git a/doc/language-support.xml b/doc/language-support.xml index f5e89df57fc..f2b64c93d22 100644 --- a/doc/language-support.xml +++ b/doc/language-support.xml @@ -108,7 +108,7 @@ a preConfigure hook to generate a configuration file used by Makefile.PL: -{buildPerlPackage, fetchurl, db}: +{ buildPerlPackage, fetchurl, db }: buildPerlPackage rec { name = "BerkeleyDB-0.36"; @@ -191,45 +191,548 @@ you need it. -
Python +
Python - Python packages that - use setuptools, - which many Python packages do nowadays, can be built very simply using - the buildPythonPackage function. This function is - implemented - in pkgs/development/python-modules/generic/default.nix - and works similarly to buildPerlPackage. (See - for details.) + Currently supported interpreters are python26, python27, + python32, python33, python34 + and pypy. - Python packages that use buildPythonPackage are - defined - in pkgs/top-level/python-packages.nix. - Most of them are simple. For example: + python is an alias of python27 and python3 is an alias of python34. + - + + python26 and python27 do not include modules that require + external dependencies (to reduce dependency bloat). Following modules need to be added as + buildInput explicitly: + + + + python.modules.bsddb + python.modules.curses + python.modules.curses_panel + python.modules.crypt + python.modules.gdbm + python.modules.sqlite3 + python.modules.tkinter + python.modules.readline + + +For convenience python27Full and python26Full +are provided with all modules included. + + + Python packages that + use setuptools or distutils, + can be built using the buildPythonPackage function as documented below. + + + + All packages depending on any Python interpreter get appended $out/${python.libPrefix}/site-packages + to $PYTHONPATH if such directory exists. + + + + + Useful attributes on interpreters packages: + + + + libPrefix + + Name of the folder in ${python}/lib/ for corresponding interpreter. + + + + + interpreter + + Alias for ${python}/bin/${executable}. + + + + + buildEnv + + Function to build python interpreter environments with extra packages bundled together. + See for usage and documentation. + + + + + sitePackages + + Alias for lib/${libPrefix}/site-packages. + + + + + executable + + Name of the interpreter executable, ie python3.4. + + + + +
<varname>buildPythonPackage</varname> function + + + The function is implemented in + pkgs/development/python-modules/generic/default.nix. + Example usage: + + twisted = buildPythonPackage { name = "twisted-8.1.0"; - src = fetchurl { + src = pkgs.fetchurl { url = http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/Twisted-8.1.0.tar.bz2; sha256 = "0q25zbr4xzknaghha72mq57kh53qw1bf8csgp63pm9sfi72qhirl"; }; - propagatedBuildInputs = [ pkgs.ZopeInterface ]; + propagatedBuildInputs = [ self.ZopeInterface ]; meta = { homepage = http://twistedmatrix.com/; description = "Twisted, an event-driven networking engine written in Python"; - license = "MIT"; + license = stdenv.lib.licenses.mit; }; }; - + + + Most of Python packages that use buildPythonPackage are defined + in pkgs/top-level/python-packages.nix + and generated for each python interpreter separately into attribute sets python26Packages, + python27Packages, python32Packages, python33Packages, + python34Packages and pypyPackages. + + + + buildPythonPackage mainly does four things: + + + + In the configurePhase, it patches + setup.py to always include setuptools before + distutils for monkeypatching machinery to take place. + + + + In the buildPhase, it calls + ${python.interpreter} setup.py build ... + + + + In the installPhase, it calls + ${python.interpreter} setup.py install ... + + + + In the postFixup phase, wrapPythonPrograms + bash function is called to wrap all programs in $out/bin/* + directory to include $PYTHONPATH and $PATH + environment variables. + + + + + By default doCheck = true is set and tests are run with + ${python.interpreter} setup.py test command in checkPhase. + + propagatedBuildInputs packages are propagated to user environment. + + + By default meta.platforms is set to the same value + as the interpreter unless overriden otherwise. + + + + + <varname>buildPythonPackage</varname> parameters + (all parameters from <varname>mkDerivation</varname> function are still supported) + + + + namePrefix + + Prepended text to ${name} parameter. + Defaults to "python3.3-" for Python 3.3, etc. Set it to + "" + if you're packaging an application or a command line tool. + + + + + disabled + + If true, package is not build for + particular python interpreter version. Grep around + pkgs/top-level/python-packages.nix + for examples. + + + + + setupPyInstallFlags + + List of flags passed to setup.py install command. + + + + + setupPyBuildFlags + + List of flags passed to setup.py build command. + + + + + pythonPath + + List of packages to be added into $PYTHONPATH. + Packages in pythonPath are not propagated into user environment + (contrary to propagatedBuildInputs). + + + + + preShellHook + + Hook to execute commands before shellHook. + + + + + postShellHook + + Hook to execute commands after shellHook. + + + + + distutilsExtraCfg + + Extra lines passed to [easy_install] section of + distutils.cfg (acts as global setup.cfg + configuration). + + + + + +
+ +
<function>python.buildEnv</function> function + + Create Python environments using low-level pkgs.buildEnv function. Example default.nix: + + + {}; + +python.buildEnv.override { + extraLibs = [ pkgs.pythonPackages.pyramid ]; + ignoreCollisions = true; +}]]> + + + Running nix-build will create + /nix/store/cf1xhjwzmdki7fasgr4kz6di72ykicl5-python-2.7.8-env + with wrapped binaries in bin/. + + + + + <function>python.buildEnv</function> arguments + + + + extraLibs + + List of packages installed inside the environment. + + + + + postBuild + + Shell command executed after the build of environment. + + + + + ignoreCollisions + + Ignore file collisions inside the environment (default is false). + + + +
+ +
Tools + +Packages inside nixpkgs are written by hand. However many tools +exist in community to help save time. No tool is preferred at the moment. + + + + python2nix + by Vladimir Kirillov + + + + pypi2nix + by Rok Garbas + + + + pypi2nix + by Jaka Hudoklin + + + + +
+ +
Development + + + To develop Python packages buildPythonPackage has + additional logic inside shellPhase to run + ${python.interpreter} setup.py develop for the package. + + + shellPhase is executed only if setup.py + exists. + + + Given a default.nix: + + + {}; + +buildPythonPackage { + name = "myproject"; + + buildInputs = with pkgs.pythonPackages; [ pyramid ]; + + src = ./.; +}]]> + + + Running nix-shell with no arguments should give you + the environment in which the package would be build with + nix-build. + + + + Shortcut to setup environments with C headers/libraries and python packages: + + $ nix-shell -p pythonPackages.pyramid zlib libjpeg git + + + + There is a boolean value lib.inNixShell set to + true if nix-shell is invoked. + + +
+ +
FAQ + + + + + How to solve circular dependencies? + + If you have packages A and B that + depend on each other, when packaging B override package + A not to depend on B as input + (and also the other way around). + + + + + install_data / data_files problems resulting into error: could not create '/nix/store/6l1bvljpy8gazlsw2aw9skwwp4pmvyxw-python-2.7.8/etc': Permission denied + + + Known bug in setuptools install_data does not respect --prefix. Example of + such package using the feature is pkgs/tools/X11/xpra/default.nix. As workaround + install it as an extra preInstall step: + + ${python.interpreter} setup.py install_data --install-dir=$out --root=$out +sed -i '/ = data_files/d' setup.py + + + + + Rationale of non-existent global site-packages + + There is no need to have global site-packages in Nix. Each package has isolated + dependency tree and installing any python package will only populate $PATH + inside user environment. See to create self-contained + interpreter with a set of packages. + + + + + +
+ + +
Contributing guidelines + + Following rules are desired to be respected: + + + + + + Make sure package builds for all python interpreters. Use disabled argument to + buildPythonPackage to set unsupported interpreters. + + + + If tests need to be disabled for a package, make sure you leave a comment about reasoning. + + + + Packages in pkgs/top-level/python-packages.nix + are sorted quasi-alphabetically to avoid merge conflicts. + + + + +
+ +
+ + +
Ruby + There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a Gemfile, let bundler create a Gemfile.lock, and then convert + this into a nix expression that contains all Gem dependencies automatically. + + For example, to package sensu, we did: + + + Gemfile +source 'https://rubygems.org' +gem 'sensu' +$ bundler package --path /tmp/vendor/bundle +$ $(nix-build '&nixpkgs>' -A bundix)/bin/bundix +$ cat > default.nix +{ lib, bundlerEnv, ruby }: + +bundlerEnv { + name = "sensu-0.17.1"; + + inherit ruby; + gemfile = ./Gemfile; + lockfile = ./Gemfile.lock; + gemset = ./gemset.nix; + + meta = with lib; { + description = "A monitoring framework that aims to be simple, malleable, +and scalable."; + homepage = http://sensuapp.org/; + license = with licenses; mit; + maintainers = with maintainers; [ theuni ]; + platforms = platforms.unix; + }; +}]]> + + +Please check in the Gemfile, Gemfile.lock and the gemset.nix so future updates can be run easily. + + +
+ +
Go + +The function buildGoPackage builds +standard Go packages. + + +buildGoPackage + +net = buildGoPackage rec { + name = "go.net-${rev}"; + goPackagePath = "code.google.com/p/go.net"; + subPackages = [ "ipv4" "ipv6" ]; + rev = "28ff664507e4"; + src = fetchhg { + inherit rev; + url = "https://${goPackagePath}"; + sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav"; + }; + propagatedBuildInputs = [ goPackages.text ]; +}; + + + + is an example expression using buildGoPackage, +the following arguments are of special significance to the function: + + + + + + goPackagePath specifies the package's canonical Go import path. + + + + + + subPackages limits the builder from building child packages that + have not been listed. If subPackages is not specified, all child + packages will be built. + + + In this example only code.google.com/p/go.net/ipv4 and + code.google.com/p/go.net/ipv4 will be built. + + + + + + propagatedBuildInputs is where the dependencies of a Go library are + listed. Only libraries should list propagatedBuildInputs. If a standalone + program is being build instead, use buildInputs. If a library's tests require + additional dependencies that are not propagated, they should be listed in buildInputs. + + + + + + + + +Reusable Go libraries may be found in the goPackages set. You can test +build a Go package as follows: + + +$ nix-build -A goPackages.net + + + + + +You may use Go packages installed into the active Nix profiles by adding +the following to your ~/.bashrc: + + +for p in $NIX_PROFILES; do + GOPATH="$p/share/go:$GOPATH" +done + + + + To extract dependency information from a Go package in automated way use go2nix.
@@ -314,6 +817,90 @@ Runtime) instead of the OpenJRE.
+
Lua + + + Lua packages are built by the buildLuaPackage function. This function is + implemented + in + pkgs/development/lua-modules/generic/default.nix + and works similarly to buildPerlPackage. (See + for details.) + + + + Lua packages are defined + in pkgs/top-level/lua-packages.nix. + Most of them are simple. For example: + + +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 ]; + }; +}; + + + + + Though, more complicated package should be placed in a seperate file in + pkgs/development/lua-modules. + + + Lua packages accept additional parameter disabled, which defines + the condition of disabling package from luaPackages. For example, if package has + disabled assigned to lua.luaversion != "5.1", + it will not be included in any luaPackages except lua51Packages, making it + only be built for lua 5.1. + + +
+ +
Coq + + Coq libraries should be installed in + $(out)/lib/coq/${coq.coq-version}/user-contrib/. + Such directories are automatically added to the + $COQPATH environment variable by the hook defined + in the Coq derivation. + + + Some libraries require OCaml and sometimes also Camlp5. The exact + versions that were used to build Coq are saved in the + coq.ocaml and coq.camlp5 + attributes. + + + Here is a simple package example. It is a pure Coq library, thus it + only depends on Coq. Its makefile has been + generated using coq_makefile so we only have to + set the $COQLIB variable at install time. + + +{stdenv, fetchurl, coq}: +stdenv.mkDerivation { + src = fetchurl { + url = http://coq.inria.fr/pylons/contribs/files/Karatsuba/v8.4/Karatsuba.tar.gz; + sha256 = "0ymfpv4v49k4fm63nq6gcl1hbnnxrvjjp7yzc4973n49b853c5b1"; + }; + + name = "coq-karatsuba"; + + buildInputs = [ coq ]; + + installFlags = "COQLIB=$(out)/lib/coq/${coq.coq-version}/"; +} + +
+ - \ No newline at end of file + diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index b140c56fbee..c21759bc926 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -11,14 +11,9 @@ Boot from the CD. The CD contains a basic NixOS installation. (It - also contains Memtest86+, useful if you want to test new hardware.) + also contains Memtest86+, useful if you want to test new hardware). When it’s finished booting, it should have detected most of your - hardware and brought up networking (check - ifconfig). Networking is necessary for the - installer, since it will download lots of stuff (such as source - tarballs or Nixpkgs channel binaries). It’s best if you have a DHCP - server on your network. Otherwise configure networking manually - using ifconfig. + hardware. The NixOS manual is available on virtual console 8 (press Alt+F8 to access). @@ -29,6 +24,16 @@ If you downloaded the graphical ISO image, you can run start display-manager to start KDE. + The boot process should have brought up networking (check + ip a). Networking is necessary for the + installer, since it will download lots of stuff (such as source + tarballs or Nixpkgs channel binaries). It’s best if you have a DHCP + server on your network. Otherwise configure networking manually + using ifconfig. + To manually configure the network on the graphical installer, + first disable network-manager with + systemctl stop network-manager. + The NixOS installer doesn’t do any partitioning or formatting yet, so you need to that yourself. Use the following commands: diff --git a/nixos/doc/manual/installation/obtaining.xml b/nixos/doc/manual/installation/obtaining.xml index ceeeb5c0ac0..afd6c9543f7 100644 --- a/nixos/doc/manual/installation/obtaining.xml +++ b/nixos/doc/manual/installation/obtaining.xml @@ -8,9 +8,14 @@ NixOS ISO images can be downloaded from the NixOS -homepage. These can be burned onto a CD. It is also possible -to copy them onto a USB stick and install NixOS from there. For -details, see the . There are a number of installation options. If +you happen to have an optical drive and a spare CD, burning the +image to CD and booting from that is probably the easiest option. +Most people will need to prepare a USB stick to boot from. +Unetbootin is recommended and the process is described in brief below. +Note that systems which use UEFI require some additional manual steps. +If you run into difficulty a number of alternative methods are presented +in the NixOS Wiki. @@ -22,7 +27,7 @@ running NixOS system through several other means: Using virtual appliances in Open Virtualization Format (OVF) that can be imported into VirtualBox. These are available from the NixOS - homepage. + download page. Using AMIs for Amazon’s EC2. To find one for your region diff --git a/nixos/doc/manual/installation/upgrading.xml b/nixos/doc/manual/installation/upgrading.xml index ed71a7e23a3..5a9d1f24f7c 100644 --- a/nixos/doc/manual/installation/upgrading.xml +++ b/nixos/doc/manual/installation/upgrading.xml @@ -14,8 +14,8 @@ been built. These channels are: - Stable channels, such as nixos-14.04. + Stable channels, such as nixos-14.12. These only get conservative bug fixes and package upgrades. For instance, a channel update may cause the Linux kernel on your system to be upgraded from 3.4.66 to 3.4.67 (a minor bug fix), but @@ -23,26 +23,40 @@ been built. These channels are: 3.11.x (a major change that has the potential to break things). Stable channels are generally maintained until the next stable branch is created. + - The unstable channel, nixos-unstable. + The unstable channel, nixos-unstable. This corresponds to NixOS’s main development branch, and may thus see radical changes between channel updates. It’s not recommended for production systems. + + Small channels, such as nixos-14.12-small + or nixos-unstable-small. These + are identical to the stable and unstable channels described above, + except that they contain fewer binary packages. This means they + get updated faster than the regular channels (for instance, when a + critical security patch is committed to NixOS’s source tree), but + may require more packages to be built from source than + usual. They’re mostly intended for server environments and as such + contain few GUI applications. + To see what channels are available, go to . (Note that the URIs of the +xlink:href="https://nixos.org/channels"/>. (Note that the URIs of the various channels redirect to a directory that contains the channel’s latest version and includes ISO images and VirtualBox appliances.) When you first install NixOS, you’re automatically subscribed to the NixOS channel that corresponds to your installation source. For -instance, if you installed from a 14.04 ISO, you will be subscribed to -the nixos-14.04 channel. To see which NixOS +instance, if you installed from a 14.12 ISO, you will be subscribed to +the nixos-14.12 channel. To see which NixOS channel you’re subscribed to, run the following as root: @@ -53,20 +67,26 @@ nixos https://nixos.org/channels/nixos-unstable To switch to a different NixOS channel, do -$ nix-channel --add http://nixos.org/channels/channel-name nixos +$ nix-channel --add https://nixos.org/channels/channel-name nixos (Be sure to include the nixos parameter at the -end.) For instance, to use the NixOS 14.04 stable channel: +end.) For instance, to use the NixOS 14.12 stable channel: -$ nix-channel --add http://nixos.org/channels/nixos-14.04 nixos +$ nix-channel --add https://nixos.org/channels/nixos-14.12 nixos -But it you want to live on the bleeding edge: +If you have a server, you may want to use the “small” channel instead: -$ nix-channel --add http://nixos.org/channels/nixos-unstable nixos +$ nix-channel --add https://nixos.org/channels/nixos-14.12-small nixos + + +And if you want to live on the bleeding edge: + + +$ nix-channel --add https://nixos.org/channels/nixos-unstable nixos diff --git a/nixos/doc/manual/man-nixos-install.xml b/nixos/doc/manual/man-nixos-install.xml index 0ebee7d23f9..7ad1be1ec10 100644 --- a/nixos/doc/manual/man-nixos-install.xml +++ b/nixos/doc/manual/man-nixos-install.xml @@ -11,12 +11,45 @@ nixos-install - install NixOS + install bootloader and NixOS nixos-install + + + path + + + + root + + + + + + + number + + + + number + + + + name + value + + + + + + + + + + @@ -55,6 +88,87 @@ it. +Options + +This command accepts the following options: + + + + + + + Defaults to /mnt. If this option is given, treat the directory + root as the root of the NixOS installation. + + + + + + + + Add a path to the Nix expression search path. This option may be given multiple times. + See the NIX_PATH environment variable for information on the semantics of the Nix search path. + Paths added through -I take precedence over NIX_PATH. + + + + + + + Sets the maximum number of build jobs that Nix will + perform in parallel to the specified number. The default is 1. + A higher value is useful on SMP systems or to exploit I/O latency. + + + + + + + Sets the value of the NIX_BUILD_CORES + environment variable in the invocation of builders. Builders can + use this variable at their discretion to control the maximum amount + of parallelism. For instance, in Nixpkgs, if the derivation + attribute enableParallelBuilding is set to + true, the builder passes the + flag to GNU Make. + The value 0 means that the builder should use all + available CPU cores in the system. + + + + name value + + Set the Nix configuration option + name to value. + + + + + + + Causes Nix to print out a stack trace in case of Nix expression evaluation errors. + + + + + + + Chroot into given installation. Any additional arguments passed are going to be executed inside the chroot. + + + + + + + + Synonym for man nixos-install. + + + + + + + Examples @@ -72,6 +186,7 @@ $ mount /dev/sda1 /mnt $ nixos-generate-config --root /mnt $ # edit /mnt/etc/nixos/configuration.nix $ nixos-install +$ reboot diff --git a/nixos/doc/manual/man-nixos-option.xml b/nixos/doc/manual/man-nixos-option.xml index 7952847d4db..2875336c67e 100644 --- a/nixos/doc/manual/man-nixos-option.xml +++ b/nixos/doc/manual/man-nixos-option.xml @@ -17,11 +17,6 @@ nixos-option - - - - - option.name @@ -31,50 +26,13 @@ This command evaluates the configuration specified in /etc/nixos/configuration.nix and returns the properties -of the option name given as argument. By default, it returns the value of -the option. +of the option name given as argument. When the option name is not an option, the command prints the list of attributes contained in the attribute set. -Options - -This command accepts the following options: - - - - - , - - Returns the value of the option. This is the default operation - if no other options are defined. - - - - - , - - Return the default value, the example and the description of the - option when available. - - - - - , - - Return the locations where the option is declared and where it - is defined. This is extremely useful to find sources of errors in - your configuration. - - - - - - - - Environment @@ -103,27 +61,21 @@ grub initScript $ nixos-option boot.loader.grub.enable -true +Value: +true -Prints option information: +Default: +true -$ nixos-option -d networking.hostName -Default: "nixos" Description: -The name of the machine. Leave it empty if you want to obtain -it from a DHCP server (if using DHCP). +Whether to enable the GNU GRUB boot loader. -Find the locations which are declaring and defining an option: - -$ nixos-option -l hardware.firmware Declared by: - /mnt/data/nix-sources/nixos/modules/services/hardware/udev.nix + "/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix" Defined by: - /path/to/nixpkgs/nixos/modules/system/boot/kernel.nix - /path/to/nixpkgs/nixos/modules/hardware/network/rt73.nix - /path/to/nixpkgs/nixos/modules/hardware/network/intel-3945abg.nix - /path/to/nixpkgs/nixos/modules/hardware/network/intel-2200bg.nix + "/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix" + diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index afc159dbd5d..c529737c3bf 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -1,7 +1,7 @@ - + nixos-rebuild 8 @@ -22,7 +22,8 @@ - + + @@ -114,10 +115,22 @@ $ nix-build /path/to/nixpkgs/nixos -A system - + - Simply show what store paths would be built or downloaded - by any of the operations above. + Show what store paths would be built or downloaded by any + of the operations above, but otherwise do nothing. + + + + + + + Build the new configuration, but instead of activating it, + show what changes would be performed by the activation (i.e. by + nixos-rebuild test). For + instance, this command will print which systemd units would be + restarted. The list of changes is not guaranteed to be + complete. diff --git a/nixos/doc/manual/man-pages.xml b/nixos/doc/manual/man-pages.xml index 467864e208b..97a2c16d406 100644 --- a/nixos/doc/manual/man-pages.xml +++ b/nixos/doc/manual/man-pages.xml @@ -15,7 +15,7 @@ - 2007-2013 + 2007-2015 Eelco Dolstra diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml index a3ad76209ac..f6aedfd6b66 100644 --- a/nixos/doc/manual/manual.xml +++ b/nixos/doc/manual/manual.xml @@ -32,6 +32,7 @@ + diff --git a/nixos/doc/manual/options-to-docbook.xsl b/nixos/doc/manual/options-to-docbook.xsl index e81a1dc356e..af9eb0e48fb 100644 --- a/nixos/doc/manual/options-to-docbook.xsl +++ b/nixos/doc/manual/options-to-docbook.xsl @@ -34,6 +34,14 @@ select="attr[@name = 'description']/string/@value" /> + + + Type: + + + + + Default: diff --git a/nixos/doc/manual/release-notes/release-notes.xml b/nixos/doc/manual/release-notes/release-notes.xml index fb82d5adcef..a988a5b0199 100644 --- a/nixos/doc/manual/release-notes/release-notes.xml +++ b/nixos/doc/manual/release-notes/release-notes.xml @@ -7,10 +7,12 @@ Release Notes -This section lists the release notes for each stable version of NixOS. +This section lists the release notes for each stable version of NixOS +and current unstable revision. - + + diff --git a/nixos/doc/manual/release-notes/rl-1410.xml b/nixos/doc/manual/release-notes/rl-1410.xml deleted file mode 100644 index 09da15ce236..00000000000 --- a/nixos/doc/manual/release-notes/rl-1410.xml +++ /dev/null @@ -1,22 +0,0 @@ - - -Release 14.10 (“Caterpillar”, 2014/10/??) - -When upgrading from a previous release, please be aware of the -following incompatible changes: - - - - The host side of a container virtual Ethernet pair - is now called ve-container-name - rather than c-container-name. - - - - - - \ No newline at end of file diff --git a/nixos/doc/manual/release-notes/rl-1412.xml b/nixos/doc/manual/release-notes/rl-1412.xml new file mode 100644 index 00000000000..36ae48af759 --- /dev/null +++ b/nixos/doc/manual/release-notes/rl-1412.xml @@ -0,0 +1,177 @@ + + +Release 14.12 (“Caterpillar”, 2014/12/30) + +In addition to numerous new and upgraded packages, this release has the following highlights: + + + +Systemd has been updated to version 217, which has numerous +improvements. + + +Nix has been updated to 1.8. + +NixOS is now based on Glibc 2.20. + +KDE has been updated to 4.14. + +The default Linux kernel has been updated to 3.14. + +If is enabled (the +default), changes made to the declaration of a user or group will be +correctly realised when running nixos-rebuild. For +instance, removing a user specification from +configuration.nix will cause the actual user +account to be deleted. If is +disabled, it is no longer necessary to specify UIDs or GIDs; if +omitted, they are allocated dynamically. + + + +Following new services were added since the last release: + + +atftpd +bosun +bspwm +chronos +collectd +consul +cpuminer-cryptonight +crashplan +dnscrypt-proxy +docker-registry +docker +etcd +fail2ban +fcgiwrap +fleet +fluxbox +gdm +geoclue2 +gitlab +gitolite +gnome3.gnome-documents +gnome3.gnome-online-miners +gnome3.gvfs +gnome3.seahorse +hbase +i2pd +influxdb +kubernetes +liquidsoap +lxc +mailpile +mesos +mlmmj +monetdb +mopidy +neo4j +nsd +openntpd +opentsdb +openvswitch +parallels-guest +peerflix +phd +polipo +prosody +radicale +redmine +riemann +scollector +seeks +siproxd +strongswan +tcsd +teamspeak3 +thermald +torque/mrom +torque/server +uhub +unifi +znc +zookeeper + + + +When upgrading from a previous release, please be aware of the +following incompatible changes: + + + +The default version of Apache httpd is now 2.4. If +you use the option to pass literal +Apache configuration text, you may need to update it — see Apache’s +documentation for details. If you wish to continue to use +httpd 2.2, add the following line to your NixOS configuration: + + +services.httpd.package = pkgs.apacheHttpd_2_2; + + + + +PHP 5.3 has been removed because it is no longer +supported by the PHP project. A migration guide is +available. + +The host side of a container virtual Ethernet pair +is now called ve-container-name +rather than c-container-name. + +GNOME 3.10 support has been dropped. The default GNOME version is now 3.12. + +VirtualBox has been upgraded to 4.3.20 release. Users +may be required to run rm -rf /tmp/.vbox*. The line +imports = [ <nixpkgs/nixos/modules/programs/virtualbox.nix> ] is +no longer necessary, use services.virtualboxHost.enable = +true instead. + +Also, hardening mode is now enabled by default, which means that unless you want to use +USB support, you no longer need to be a member of the vboxusers group. + + +Chromium has been updated to 39.0.2171.65. is now enabled by default. +chromium*Wrapper packages no longer exist, because upstream removed NSAPI support. +chromium-stable has been renamed to chromium. + + +Python packaging documentation is now part of nixpkgs manual. To override +the python packages available to a custom python you now use pkgs.pythonFull.buildEnv.override +instead of pkgs.pythonFull.override. + + +boot.resumeDevice = "8:6" is no longer supported. Most users will +want to leave it undefined, which takes the swap partitions automatically. There is an evaluation +assertion to ensure that the string starts with a slash. + + +The system-wide default timezone for NixOS installations +changed from CET to UTC. To choose +a different timezone for your system, configure +time.timeZone in +configuration.nix. A fairly complete list of possible +values for that setting is available at . + +GNU screen has been updated to 4.2.1, which breaks +the ability to connect to sessions created by older versions of +screen. + +The Intel GPU driver was updated to the 3.x prerelease +version (used by most distributions) and supports DRI3 +now. + + + + + + diff --git a/nixos/doc/manual/release-notes/rl-unstable.xml b/nixos/doc/manual/release-notes/rl-unstable.xml new file mode 100644 index 00000000000..34ffe1d6d32 --- /dev/null +++ b/nixos/doc/manual/release-notes/rl-unstable.xml @@ -0,0 +1,41 @@ + + +Unstable revision + +In addition to numerous new and upgraded packages, this release has the following highlights: + + + + +Following new services were added since the last release: + + + + +When upgrading from a previous release, please be aware of the +following incompatible changes: + + + +Steam now doesn't need root rights to work. Instead of using +*-steam-chrootenv, you should now just run steam. +steamChrootEnv package was renamed to steam, +and old steam package -- to steamOriginal. + + +CMPlayer has been renamed to bomi upstream. Package cmplayer +was accordingly renamed to bomi + + + + + + diff --git a/nixos/gui/README b/nixos/gui/README deleted file mode 100644 index c038314a0dc..00000000000 --- a/nixos/gui/README +++ /dev/null @@ -1,16 +0,0 @@ -This file should become a nix expression. (see modules/installer/tools/tools.nix) - -you need to: -- download the latest jQuery from and copy it to chrome/content: - http://code.jquery.com/jquery-1.5.2.js - -- install 'xulrunner' with nix: - nix-env -Ai nixpkgs_sys.firefox40Pkgs.xulrunner - -- make sure nixos-option in your path - -- have /etc/nixos/nixpkgs -- have /etc/nixos/nixos - -run it: -- xulrunner /etc/nixos/nixos/gui/application.ini -jsconsole diff --git a/nixos/gui/application.ini b/nixos/gui/application.ini deleted file mode 100644 index d2494a1a5cd..00000000000 --- a/nixos/gui/application.ini +++ /dev/null @@ -1,36 +0,0 @@ -[App] -; -; This field specifies your organization's name. This field is recommended, -; but optional. -Vendor=NixOS -; -; This field specifies your application's name. This field is required. -Name=NixOS-gui -; -; This field specifies your application's version. This field is optional. -Version=0.1 -; -; This field specifies your application's build ID (timestamp). This field is -; required. -BuildID=20110424 -; -; This field specifies a compact copyright notice for your application. This -; field is optional. -;Copyright= - -; -; This ID is just an example. Every XUL app ought to have it's own unique ID. -; You can use the microsoft "guidgen" or "uuidgen" tools, or go on -; irc.mozilla.org and /msg botbot uuid. This field is optional. -;ID= - -[Gecko] -; -; This field is required. It specifies the minimum Gecko version that this -; application requires. -MinVersion=1.9a5 -; -; This field is optional. It specifies the maximum Gecko version that this -; application requires. It should be specified if your application uses -; unfrozen interfaces. -MaxVersion=2.* diff --git a/nixos/gui/chrome.manifest b/nixos/gui/chrome.manifest deleted file mode 100644 index 865d6a88fb4..00000000000 --- a/nixos/gui/chrome.manifest +++ /dev/null @@ -1 +0,0 @@ -manifest chrome/chrome.manifest diff --git a/nixos/gui/chrome/chrome.manifest b/nixos/gui/chrome/chrome.manifest deleted file mode 100644 index 775445ee17b..00000000000 --- a/nixos/gui/chrome/chrome.manifest +++ /dev/null @@ -1 +0,0 @@ -content nixos-gui content/ diff --git a/nixos/gui/chrome/content/io.js b/nixos/gui/chrome/content/io.js deleted file mode 100644 index 8d9c8c17365..00000000000 --- a/nixos/gui/chrome/content/io.js +++ /dev/null @@ -1,137 +0,0 @@ - -function inspect(obj, maxLevels, level) -{ - var str = '', type, msg; - - // Start Input Validations - // Don't touch, we start iterating at level zero - if(level == null) level = 0; - - // At least you want to show the first level - if(maxLevels == null) maxLevels = 1; - if(maxLevels < 1) - return 'Error: Levels number must be > 0'; - - // We start with a non null object - if(obj == null) - return 'Error: Object NULL'; - // End Input Validations - - // Each Iteration must be indented - str += '
    '; - - // Start iterations for all objects in obj - for(property in obj) - { - try - { - // Show "property" and "type property" - type = typeof(obj[property]); - str += '
  • (' + type + ') ' + property + - ( (obj[property]==null)?(': null'):('')) + '
  • '; - - // We keep iterating if this property is an Object, non null - // and we are inside the required number of levels - if((type == 'object') && (obj[property] != null) && (level+1 < maxLevels)) - str += inspect(obj[property], maxLevels, level+1); - } - catch(err) - { - // Is there some properties in obj we can't access? Print it red. - if(typeof(err) == 'string') msg = err; - else if(err.message) msg = err.message; - else if(err.description) msg = err.description; - else msg = 'Unknown'; - - str += '
  • (Error) ' + property + ': ' + msg +'
  • '; - } - } - - // Close indent - str += '
'; - - return str; -} - -// Run xulrunner application.ini -jsconsole -console, to see messages. -function log(str) -{ - Components.classes['@mozilla.org/consoleservice;1'] - .getService(Components.interfaces.nsIConsoleService) - .logStringMessage(str); -} - -function makeTempFile(prefix) -{ - var file = Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("TmpD", Components.interfaces.nsIFile); - file.append(prefix || "xulrunner"); - file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0664); - return file; -} - -function writeToFile(file, data) -{ - // file is nsIFile, data is a string - var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"] - .createInstance(Components.interfaces.nsIFileOutputStream); - - // use 0x02 | 0x10 to open file for appending. - foStream.init(file, 0x02 | 0x08 | 0x20, 0664, 0); // write, create, truncate - foStream.write(data, data.length); - foStream.close(); -} - -function readFromFile(file) -{ - // |file| is nsIFile - var data = ""; - var fstream = Components.classes["@mozilla.org/network/file-input-stream;1"] - .createInstance(Components.interfaces.nsIFileInputStream); - var sstream = Components.classes["@mozilla.org/scriptableinputstream;1"] - .createInstance(Components.interfaces.nsIScriptableInputStream); - fstream.init(file, -1, 0, 0); - sstream.init(fstream); - - var str = sstream.read(4096); - while (str.length > 0) { - data += str; - str = sstream.read(4096); - } - - sstream.close(); - fstream.close(); - - return data; -} - -function runProgram(commandLine) -{ - // create an nsILocalFile for the executable - var file = Components.classes["@mozilla.org/file/local;1"] - .createInstance(Components.interfaces.nsILocalFile); - file.initWithPath("/bin/sh"); - - // create an nsIProcess - var process = Components.classes["@mozilla.org/process/util;1"] - .createInstance(Components.interfaces.nsIProcess); - process.init(file); - - // Run the process. - // If first param is true, calling thread will be blocked until - // called process terminates. - // Second and third params are used to pass command-line arguments - // to the process. - var args = ["-c", commandLine]; - process.run(true, args, args.length); -} - -// only for testing... -function testIO() -{ - var f = makeTempFile(); - writeToFile(f, "essai\ntest"); - alert(readFromFile(f)); - runProgram("zenity --info"); -} diff --git a/nixos/gui/chrome/content/main.js b/nixos/gui/chrome/content/main.js deleted file mode 100644 index ecfc5a8c5c9..00000000000 --- a/nixos/gui/chrome/content/main.js +++ /dev/null @@ -1,70 +0,0 @@ -// global variables. -var gNixOS; -var gOptionView; - -/* -var gProgressBar; -function setProgress(current, max) -{ - if (gProgressBar) { - gProgressBar.value = 100 * current / max; - log("progress: " + gProgressBar.value + "%"); - } - else - log("unknow progress bar"); -} -*/ - -function updateTextbox(id, value) -{ - // setting the height cause an overflow which resize the textbox to its - // content due to its onoverflow attribute. - $(id).attr("value", value).attr("height", 1); -}; - -function updatePanel(options) -{ - log("updatePanel: " + options.length); - if (options.length == 0) - return; - // FIXME: ignore the rest of the selection for now. - var o = options[0]; - $("#name").attr("label", o.path); - - if (o.typename != null) - $("#typename").attr("label", o.typename); - else - $("#typename").attr("label", ""); - - $("#desc").text(o.description); - - if (o.value != null) - updateTextbox("#val", o.value); - else - updateTextbox("#val", ""); - - if (o.defaultValue != null) - updateTextbox("#def", o.defaultValue); - else - updateTextbox("#def", ""); - - if (o.example != null) - updateTextbox("#exp", o.example); - else - updateTextbox("#exp", ""); - - updateTextbox("#decls", o.declarations.join("\n")); - updateTextbox("#defs", o.definitions.join("\n")); -} - - -function onload() -{ - var optionTree = document.getElementById("option-tree"); - // gProgressBar = document.getElementById("progress-bar"); - // setProgress(0, 1); - - gNixOS = new NixOS(); - gOptionView = new OptionView(gNixOS.option, updatePanel); - optionTree.view = gOptionView; -} diff --git a/nixos/gui/chrome/content/myviewer.xul b/nixos/gui/chrome/content/myviewer.xul deleted file mode 100644 index 2aeb9391d07..00000000000 --- a/nixos/gui/chrome/content/myviewer.xul +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - + +