···30$ mkdir -p <replaceable>/my/sources</replaceable>
31$ cd <replaceable>/my/sources</replaceable>
32$ nix-env -i git
33-$ git clone git://github.com/NixOS/nixos.git
34$ git clone git://github.com/NixOS/nixpkgs.git
35</screen>
3637This will check out the latest NixOS sources to
38-<filename><replaceable>/my/sources</replaceable>/nixos</filename> and
39the Nixpkgs sources to
40<filename><replaceable>/my/sources</replaceable>/nixpkgs</filename>.
41If you want to rebuild your system using your (modified) sources, you
···43<option>-I</option> flag:
4445<screen>
46-$ nixos-rebuild switch -I <replaceable>/my/sources</replaceable>
47</screen>
4849</para>
···250in
251252{
253- imports = [ /etc/nixos/nixos/modules/services/scheduling/cron.nix ];
254255 options = {
256 services.locate = {
···307<para>
308309<screen>
310-$ nix-build /etc/nixos/nixos -A <replaceable>attr</replaceable></screen>
311312where <replaceable>attr</replaceable> is an attribute in
313-<filename>/etc/nixos/nixos/default.nix</filename>. Attributes of interest include:
314315<variablelist>
316···344attribute set. This attribute set allows you to have a view of the merged
345option definitions and all its derivations. Important derivations are store
346inside the option <option>system.build</option> and can be listed with the
347-command <command>nix-instantiate --xml --eval-only /etc/nixos/nixos -A
348config.system.build</command>
349</para>
350···368running <command>nix-build</command> to build the ISO.
369370<screen>
371-$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
372-$ nix-build /etc/nixos/nixos -A config.system.build.isoImage</screen>
373374</para>
375···413properly:
414415<screen>
416-$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
417-$ nix-build /etc/nixos/nixos -A config.system.build.nixos-install
418$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
419$ yes | mke2fs -j diskimage
420$ mount -o loop diskimage /mnt
···437<option>-initrd</option> options:
438439<screen>
440-$ nix-build /etc/nixos/nixos -A config.system.build.initialRamdisk -o initrd
441-$ nix-build /etc/nixos/nixos -A config.system.build.kernel -o kernel
442$ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
443</screen>
444
···30$ mkdir -p <replaceable>/my/sources</replaceable>
31$ cd <replaceable>/my/sources</replaceable>
32$ nix-env -i git
033$ git clone git://github.com/NixOS/nixpkgs.git
34</screen>
3536This will check out the latest NixOS sources to
37+<filename><replaceable>/my/sources</replaceable>/nixpkgs/nixos</filename> and
38the Nixpkgs sources to
39<filename><replaceable>/my/sources</replaceable>/nixpkgs</filename>.
40If you want to rebuild your system using your (modified) sources, you
···42<option>-I</option> flag:
4344<screen>
45+$ nixos-rebuild switch -I <replaceable>/my/sources</replaceable>/nixpkgs
46</screen>
4748</para>
···249in
250251{
252+ imports = [ /path/to/nixpkgs/nixos/modules/services/scheduling/cron.nix ];
253254 options = {
255 services.locate = {
···306<para>
307308<screen>
309+$ nix-build /path/to/nixpkgs/nixos -A <replaceable>attr</replaceable></screen>
310311where <replaceable>attr</replaceable> is an attribute in
312+<filename>/path/to/nixpkgs/nixos/default.nix</filename>. Attributes of interest include:
313314<variablelist>
315···343attribute set. This attribute set allows you to have a view of the merged
344option definitions and all its derivations. Important derivations are store
345inside the option <option>system.build</option> and can be listed with the
346+command <command>nix-instantiate --xml --eval-only /path/to/nixpkgs/nixos -A
347config.system.build</command>
348</para>
349···367running <command>nix-build</command> to build the ISO.
368369<screen>
370+$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
371+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.isoImage</screen>
372373</para>
374···412properly:
413414<screen>
415+$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
416+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.nixos-install
417$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
418$ yes | mke2fs -j diskimage
419$ mount -o loop diskimage /mnt
···436<option>-initrd</option> options:
437438<screen>
439+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.initialRamdisk -o initrd
440+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.kernel -o kernel
441$ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
442</screen>
443
···106 points to the output of the top-level “system” derivation. This
107 is essentially the same as doing
108<screen>
109-$ nix-build /etc/nixos/nixos -A system
110</screen>
111 Note that you do not need to be <literal>root</literal> to run
112 <command>nixos-rebuild build</command>.</para>
···106 points to the output of the top-level “system” derivation. This
107 is essentially the same as doing
108<screen>
109+$ nix-build /path/to/nixpkgs/nixos -A system
110</screen>
111 Note that you do not need to be <literal>root</literal> to run
112 <command>nixos-rebuild build</command>.</para>
+21
pkgs/applications/graphics/gpicview/default.nix
···000000000000000000000
···1+{ stdenv, fetchurl, intltool, pkgconfig, gtk2 }:
2+3+stdenv.mkDerivation {
4+ name = "gpicview-0.2.4";
5+6+ src = fetchurl {
7+ url = "mirror://sourceforge/lxde/gpicview-0.2.4.tar.gz";
8+ sha256 = "1svcy1c8bgk0pl12yhyv16h2fl52x5vzzcv57z6qdcv5czgvgglr";
9+ };
10+11+ meta = with stdenv.lib; {
12+ description = "A simple and fast image viewer for X";
13+ homepage = http://lxde.sourceforge.net/gpicview/;
14+ repositories.git = git://lxde.git.sourceforge.net/gitroot/lxde/gpicview;
15+ license = licenses.gpl2;
16+ maintainers = with maintainers; [ lovek323 ];
17+ platforms = platforms.unix;
18+ };
19+20+ buildInputs = [ intltool pkgconfig gtk2 ];
21+}
+26-10
pkgs/applications/misc/redshift/default.nix
···1-{ fetchurl, stdenv,
2- libX11, libXrandr, libXxf86vm, libxcb, pkgconfig, python,
3- randrproto, xcbutil, xf86vidmodeproto }:
45stdenv.mkDerivation rec {
6- pname = "redshift";
7- version = "1.7";
8- name = "${pname}-${version}";
9 src = fetchurl {
10- url = "http://launchpad.net/${pname}/trunk/${version}/+download/${pname}-${version}.tar.bz2";
11- sha256 = "1j0hs0vnlic90cf4bryn11n4ani1x2s5l8z6ll3fmrlw98ykrylv";
12 };
1314- buildInputs = [ libX11 libXrandr libXxf86vm libxcb pkgconfig python
15- randrproto xcbutil xf86vidmodeproto ];
000000000000000001617 meta = {
18 description = "changes the color temperature of your screen gradually";