···3030$ mkdir -p <replaceable>/my/sources</replaceable>
3131$ cd <replaceable>/my/sources</replaceable>
3232$ nix-env -i git
3333-$ git clone git://github.com/NixOS/nixos.git
3433$ git clone git://github.com/NixOS/nixpkgs.git
3534</screen>
36353736This will check out the latest NixOS sources to
3838-<filename><replaceable>/my/sources</replaceable>/nixos</filename> and
3737+<filename><replaceable>/my/sources</replaceable>/nixpkgs/nixos</filename> and
3938the Nixpkgs sources to
4039<filename><replaceable>/my/sources</replaceable>/nixpkgs</filename>.
4140If you want to rebuild your system using your (modified) sources, you
···4342<option>-I</option> flag:
44434544<screen>
4646-$ nixos-rebuild switch -I <replaceable>/my/sources</replaceable>
4545+$ nixos-rebuild switch -I <replaceable>/my/sources</replaceable>/nixpkgs
4746</screen>
48474948</para>
···250249in
251250252251{
253253- imports = [ /etc/nixos/nixos/modules/services/scheduling/cron.nix ];
252252+ imports = [ /path/to/nixpkgs/nixos/modules/services/scheduling/cron.nix ];
254253255254 options = {
256255 services.locate = {
···307306<para>
308307309308<screen>
310310-$ nix-build /etc/nixos/nixos -A <replaceable>attr</replaceable></screen>
309309+$ nix-build /path/to/nixpkgs/nixos -A <replaceable>attr</replaceable></screen>
311310312311where <replaceable>attr</replaceable> is an attribute in
313313-<filename>/etc/nixos/nixos/default.nix</filename>. Attributes of interest include:
312312+<filename>/path/to/nixpkgs/nixos/default.nix</filename>. Attributes of interest include:
314313315314<variablelist>
316315···344343attribute set. This attribute set allows you to have a view of the merged
345344option definitions and all its derivations. Important derivations are store
346345inside the option <option>system.build</option> and can be listed with the
347347-command <command>nix-instantiate --xml --eval-only /etc/nixos/nixos -A
346346+command <command>nix-instantiate --xml --eval-only /path/to/nixpkgs/nixos -A
348347config.system.build</command>
349348</para>
350349···368367running <command>nix-build</command> to build the ISO.
369368370369<screen>
371371-$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
372372-$ nix-build /etc/nixos/nixos -A config.system.build.isoImage</screen>
370370+$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
371371+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.isoImage</screen>
373372374373</para>
375374···413412properly:
414413415414<screen>
416416-$ export NIXOS_CONFIG=/etc/nixos/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
417417-$ nix-build /etc/nixos/nixos -A config.system.build.nixos-install
415415+$ export NIXOS_CONFIG=/path/to/nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix
416416+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.nixos-install
418417$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
419418$ yes | mke2fs -j diskimage
420419$ mount -o loop diskimage /mnt
···437436<option>-initrd</option> options:
438437439438<screen>
440440-$ nix-build /etc/nixos/nixos -A config.system.build.initialRamdisk -o initrd
441441-$ nix-build /etc/nixos/nixos -A config.system.build.kernel -o kernel
439439+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.initialRamdisk -o initrd
440440+$ nix-build /path/to/nixpkgs/nixos -A config.system.build.kernel -o kernel
442441$ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/null
443442</screen>
444443
···106106 points to the output of the top-level “system” derivation. This
107107 is essentially the same as doing
108108<screen>
109109-$ nix-build /etc/nixos/nixos -A system
109109+$ nix-build /path/to/nixpkgs/nixos -A system
110110</screen>
111111 Note that you do not need to be <literal>root</literal> to run
112112 <command>nixos-rebuild build</command>.</para>
+21
pkgs/applications/graphics/gpicview/default.nix
···11+{ stdenv, fetchurl, intltool, pkgconfig, gtk2 }:
22+33+stdenv.mkDerivation {
44+ name = "gpicview-0.2.4";
55+66+ src = fetchurl {
77+ url = "mirror://sourceforge/lxde/gpicview-0.2.4.tar.gz";
88+ sha256 = "1svcy1c8bgk0pl12yhyv16h2fl52x5vzzcv57z6qdcv5czgvgglr";
99+ };
1010+1111+ meta = with stdenv.lib; {
1212+ description = "A simple and fast image viewer for X";
1313+ homepage = http://lxde.sourceforge.net/gpicview/;
1414+ repositories.git = git://lxde.git.sourceforge.net/gitroot/lxde/gpicview;
1515+ license = licenses.gpl2;
1616+ maintainers = with maintainers; [ lovek323 ];
1717+ platforms = platforms.unix;
1818+ };
1919+2020+ buildInputs = [ intltool pkgconfig gtk2 ];
2121+}