···1[<img src="http://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
23[](https://travis-ci.org/NixOS/nixpkgs)
4-[](http://www.issuestats.com/github/nixos/nixpkgs)
5-[](http://www.issuestats.com/github/nixos/nixpkgs)
67Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
8manager. It is periodically built and tested by the [hydra](http://hydra.nixos.org/)
···1[<img src="http://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />](https://nixos.org/nixos)
23[](https://travis-ci.org/NixOS/nixpkgs)
4+[](http://www.issuestats.com/github/nixos/nixpkgs)
5+[](http://www.issuestats.com/github/nixos/nixpkgs)
67Nixpkgs is a collection of packages for the [Nix](https://nixos.org/nix/) package
8manager. It is periodically built and tested by the [hydra](http://hydra.nixos.org/)
···281 </listitem>
282 </varlistentry>
283000000000000000000000000000000000000000000000284</variablelist>
285286<para>In addition, <command>nixos-rebuild</command> accepts various
···303 <para>Path to the main NixOS configuration module. Defaults to
304 <filename>/etc/nixos/configuration.nix</filename>.</para>
305 </listitem>
0000000306 </varlistentry>
307308</variablelist>
···281 </listitem>
282 </varlistentry>
283284+ <varlistentry>
285+ <term><option>--build-host</option></term>
286+ <listitem>
287+ <para>Instead of building the new configuration locally, use the
288+ specified host to perform the build. The host needs to be accessible
289+ with ssh, and must be able to perform Nix builds. If the option
290+ <option>--target-host</option> is not set, the build will be copied back
291+ to the local machine when done.</para>
292+293+ <para>Note that, if <option>--no-build-nix</option> is not specified,
294+ Nix will be built both locally and remotely. This is because the
295+ configuration will always be evaluated locally even though the building
296+ might be performed remotely.</para>
297+298+ <para>You can include a remote user name in
299+ the host name (<replaceable>user@host</replaceable>). You can also set
300+ ssh options by defining the <envar>NIX_SSHOPTS</envar> environment
301+ variable.</para>
302+ </listitem>
303+ </varlistentry>
304+305+ <varlistentry>
306+ <term><option>--target-host</option></term>
307+ <listitem>
308+ <para>Specifies the NixOS target host. By setting this to something other
309+ than <replaceable>localhost</replaceable>, the system activation will
310+ happen on the remote host instead of the local machine. The remote host
311+ needs to be accessible over ssh, and for the commands
312+ <option>switch</option>, <option>boot</option> and <option>test</option>
313+ you need root access.</para>
314+315+ <para>If <option>--build-host</option> is not explicitly
316+ specified, <option>--build-host</option> will implicitly be set to the
317+ same value as <option>--target-host</option>. So, if you only specify
318+ <option>--target-host</option> both building and activation will take
319+ place remotely (and no build artifacts will be copied to the local
320+ machine).</para>
321+322+ <para>You can include a remote user name in
323+ the host name (<replaceable>user@host</replaceable>). You can also set
324+ ssh options by defining the <envar>NIX_SSHOPTS</envar> environment
325+ variable.</para>
326+ </listitem>
327+ </varlistentry>
328+329</variablelist>
330331<para>In addition, <command>nixos-rebuild</command> accepts various
···348 <para>Path to the main NixOS configuration module. Defaults to
349 <filename>/etc/nixos/configuration.nix</filename>.</para>
350 </listitem>
351+ </varlistentry>
352+353+ <varlistentry><term><envar>NIX_SSHOPTS</envar></term>
354+355+ <listitem><para>Additional options to be passed to
356+ <command>ssh</command> on the command line.</para></listitem>
357+358 </varlistentry>
359360</variablelist>
+1-1
nixos/modules/config/users-groups.nix
···26 '';
2728 hashedPasswordDescription = ''
29- To generate hashed password install <literal>mkpassword</literal>
30 package and run <literal>mkpasswd -m sha-512</literal>.
31 '';
32
···26 '';
2728 hashedPasswordDescription = ''
29+ To generate hashed password install <literal>mkpasswd</literal>
30 package and run <literal>mkpasswd -m sha-512</literal>.
31 '';
32
···239 bepasty = 215;
240 pumpio = 216;
241 nm-openvpn = 217;
0242243 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
244···455 bepasty = 215;
456 pumpio = 216;
457 nm-openvpn = 217;
0458459 # When adding a gid, make sure it doesn't match an existing
460 # uid. Users and groups with the same name should have equal
···239 bepasty = 215;
240 pumpio = 216;
241 nm-openvpn = 217;
242+ mathics = 218;
243244 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
245···456 bepasty = 215;
457 pumpio = 216;
458 nm-openvpn = 217;
459+ mathics = 218;
460461 # When adding a gid, make sure it doesn't match an existing
462 # uid. Users and groups with the same name should have equal
···16 isExecutable = true;
17 inherit (pkgs) perl;
18 perlFlags = concatStrings (map (path: "-I ${path}/lib/perl5/site_perl ")
19- [ pkgs.perlPackages.DBI pkgs.perlPackages.DBDSQLite ]);
20 };
2122in
···30 local p=/run/current-system/sw/bin/command-not-found
31 if [ -x $p -a -f /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite ]; then
32 # Run the helper program.
33- $p "$1"
34 # Retry the command if we just installed it.
35 if [ $? = 126 ]; then
36 "$@"
···51 local p=/run/current-system/sw/bin/command-not-found
52 if [ -x $p -a -f /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite ]; then
53 # Run the helper program.
54- $p "$1"
5556 # Retry the command if we just installed it.
57 if [ $? = 126 ]; then
···16 isExecutable = true;
17 inherit (pkgs) perl;
18 perlFlags = concatStrings (map (path: "-I ${path}/lib/perl5/site_perl ")
19+ [ pkgs.perlPackages.DBI pkgs.perlPackages.DBDSQLite pkgs.perlPackages.StringShellQuote ]);
20 };
2122in
···30 local p=/run/current-system/sw/bin/command-not-found
31 if [ -x $p -a -f /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite ]; then
32 # Run the helper program.
33+ $p "$@"
34 # Retry the command if we just installed it.
35 if [ $? = 126 ]; then
36 "$@"
···51 local p=/run/current-system/sw/bin/command-not-found
52 if [ -x $p -a -f /nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite ]; then
53 # Run the helper program.
54+ $p "$@"
5556 # Retry the command if we just installed it.
57 if [ $? = 126 ]; then
···3use strict;
4use DBI;
5use DBD::SQLite;
06use Config;
78my $program = $ARGV[0];
···31EOF
32 ;
33 exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
0034 } else {
35 print STDERR <<EOF;
36The program ‘$program’ is currently not installed. You can install it by typing:
···3use strict;
4use DBI;
5use DBD::SQLite;
6+use String::ShellQuote;
7use Config;
89my $program = $ARGV[0];
···32EOF
33 ;
34 exit 126 if system("nix-env", "-iA", "nixos.$package") == 0;
35+ } elsif ($ENV{"NIX_AUTO_RUN"} // "") {
36+ exec("nix-shell", "-p", $package, "--run", shell_quote("exec", @ARGV));
37 } else {
38 print STDERR <<EOF;
39The program ‘$program’ is currently not installed. You can install it by typing:
···43 # into thinking they're running interactively.
44 environment.variables.PAGER = "";
450000046 boot.initrd.postDeviceCommands =
47 ''
48 # Using acpi_pm as a clock source causes the guest clock to
···43 # into thinking they're running interactively.
44 environment.variables.PAGER = "";
4546+ boot.initrd.preDeviceCommands =
47+ ''
48+ echo 600 > /proc/sys/kernel/hung_task_timeout_secs
49+ '';
50+51 boot.initrd.postDeviceCommands =
52 ''
53 # Using acpi_pm as a clock source causes the guest clock to
···20 desktop_file_utils hicolor_icon_theme
21 ];
220000023 configureFlags = [ "--enable-shm" "--enable-textfe" ];
2425 meta = with stdenv.lib; {
···20 desktop_file_utils hicolor_icon_theme
21 ];
2223+ #hexchat and heachat-text loads enchant spell checking library at run time and so it needs to have route to the path
24+ patchPhase = ''
25+ sed -i "s,libenchant.so.1,${enchant}/lib/libenchant.so.1,g" src/fe-gtk/sexy-spell-entry.c
26+ '';
27+28 configureFlags = [ "--enable-shm" "--enable-textfe" ];
2930 meta = with stdenv.lib; {
···1-source $stdenv/setup
2-3-mkdir -p $out/bin
4-for i in $binaries
5-do
6- ln -s "/usr/bin/$i" "$out/bin/"
7-done
8-9-# MIG assumes the standard Darwin core utilities (e.g., `rm -d'), so
10-# let it see the impure directories.
11-cat > "$out/bin/mig" <<EOF
12-#!/bin/sh
13-export PATH="/usr/bin:/bin:\$PATH"
14-exec /usr/bin/mig "\$@"
15-EOF
16-chmod +x "$out/bin/mig"
···1+update-walker is an imperative semiautomated update helper.
2+3+It runs the X.upstream file to find the freshest version of the package in
4+the specified upstream source and updates the corresponding X.nix file.
5+6+7+8+The simplest available commands:
9+10+url: set the upstream source list URL equal to $1; the default is
11+meta.downloadPage with meta.homepage fallback
12+13+dl_url_re: set the regular expression used to select download links to $1; the
14+default is meta.downloadURLRegexp or '[.]tar[.]([^./])+\$' if it is not set
15+16+target: specify target expression; default is to replace .upstream extension
17+with .nix extension
18+19+name: specify the derivation name; default is the basename of the dirname
20+of the .upstream file
21+22+attribute_name: specify the attribute name to evaluate for getting the current
23+version from meta.version; default is to use the derivation name
24+25+minimize_overwrite: set config options that mean that only version= and
26+sha256= have to be replaced; the default is to regenerate a full upstream
27+description block with url, name, version, hash etc.
28+29+30+31+A lot of packages can be updated in a pseudo-declarative style using only
32+the commands from the previous paragraph.
33+34+Some packages do not need any non-default settings, in these case just setting
35+meta.updateWalker to true is enough, you can run update-walker directly on the
36+.nix file afterwards. In this case minimize_overwrite it implied unless
37+meta.fullRegenerate is set.
38+39+40+41+The packages that require more fine-grained control than the described options
42+allow, you need to take into account the default control flow of the tool.
43+44+First, the definitions from update-walker script and additional definitions
45+from update-walker-service-specific.sh are loaded. Then the config is executed
46+as a shell script. Some of the commands it can use do remember whether they
47+have been used. Afterwards the following steps happen:
48+49+attribute_name is set to name unless it has been already set
50+51+meta.version is read from the NixPkgs package called attribute_name
52+53+download URL regexp is set to default unless it has been already set in the
54+updater script
55+56+the download page URL gets set to default value unless it has been set
57+previously
58+59+if the action of getting the download page and choosing the freshest link by
60+version has not yet been taken, it happens
61+62+if the version has not yet been extracted from the URL, it gets extracted
63+64+target nix expression to update gets set to the default value unless it has
65+been set explicitly
66+67+if the URL version is fresher than the packaged version, the new file gets
68+downloaded and its hash is calculated
69+70+do_overwrite function is called; the default calculates a big upstream data
71+block and puts it after the '# Generated upstream information' marker (the
72+marker can be changed by the command marker)
73+74+75+76+If the update needs some special logic, it is put into the updater script and
77+the corresponding steps are skipped because the needed action has already been
78+performed.
79+80+For example:
81+82+minimize_overwrite is exactly the same as
83+84+do_overwrite() { do_overwrite_just_version; }
85+86+redefinition. You can do a more complex do_overwrite redifinition, if needed.
87+It can probably use ensure_hash to download the source and calculate the hash
88+and set_var_value.
89+90+set_var_value alters the $3-th instance of assigning the $1 name in the
91+expression to the value $2. $3 defaults to 1. It can modify $4 instead of the
92+current target, it can put the value without quotes if $5 is 1.
93+94+95+96+Typical steps include:
97+98+ensure_choice: download current URL and find the freshest version link on the
99+page, it is now the new URL
100+101+ensure_hash: download current URL and calculate the source package hash
102+103+ensure_version: extract version from the URL
104+105+SF_redirect: replace the current URL with a SourceForge.net mirror:// URL
106+107+SF_version_dir: assume SourceForge.net layout and choose the freshest
108+version-named subdirectory in the file catalog; you can optionally specify $1
109+as a directory name regexp (digits and periods will be required after it)
110+111+SF_version_tarball: assume SourceForge.net layout and choose the freshest
112+tarball download link
113+114+version: apply replacement of $1 with $2 (extended regexp format) to extract
115+the version from URL
116+117+version_link: choose the freshest versioned link, $1 is the regexp of
118+acceptable links
···1-{ stdenv, kde, kdelibs, saneBackends }:
23kde {
4- buildInputs = [ kdelibs saneBackends ];
56 meta = {
7 description = "An image scanning library that provides a QWidget that contains all the logic needed to interface a sacanner";
···1+{ stdenv, kde, kdelibs, sane-backends }:
23kde {
4+ buildInputs = [ kdelibs sane-backends ];
56 meta = {
7 description = "An image scanning library that provides a QWidget that contains all the logic needed to interface a sacanner";
···77 sed -i '/TestCgoLookupIP/areturn' src/net/cgo_unix_test.go
78 sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
79 sed -i '/TestRead0/areturn' src/os/os_test.go
080 sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
8182 sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
···77 sed -i '/TestCgoLookupIP/areturn' src/net/cgo_unix_test.go
78 sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
79 sed -i '/TestRead0/areturn' src/os/os_test.go
80+ sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
81 sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
8283 sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go
···14 NIX_CFLAGS_COMPILE = "-include stdio.h";
1516 meta = {
17+ description = "CUPS back-end for Canon printers";
18+ longDescription = ''
19+ CUPS back-end for the canon printers using the proprietary USB over IP
20+ BJNP protocol. This back-end allows Cups to print over the network to a
21+ Canon printer. The design is based on reverse engineering of the protocol.
22+ '';
23 homepage = http://cups-bjnp.sourceforge.net;
24 };
25}
···1+diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish
2+index c3864a8..a12ac4d 100644
3+--- a/share/functions/__fish_config_interactive.fish
4++++ b/share/functions/__fish_config_interactive.fish
5+@@ -230,7 +230,7 @@ function __fish_config_interactive -d "Initializations that should be performed
6+ # Check for NixOS handler
7+ else if test -f /run/current-system/sw/bin/command-not-found
8+ function __fish_command_not_found_handler --on-event fish_command_not_found
9+- /run/current-system/sw/bin/command-not-found $argv[1]
10++ /run/current-system/sw/bin/command-not-found $argv
11+ end
12+ # Ubuntu Feisty places this command in the regular path instead
13+ else if type -q -p command-not-found
···38 # Linux standard environment.
39 stdenvLinux = (import ./linux { inherit system allPackages platform config lib; }).stdenvLinux;
4041- # Darwin standard environment.
42 stdenvDarwin = (import ./darwin { inherit system allPackages platform config;}).stdenvDarwin;
43-44- # Pure Darwin standard environment. Allows building with the sandbox enabled. To use,
45- # you can add this to your nixpkgs config:
46- #
47- # replaceStdenv = {pkgs}: pkgs.allStdenvs.stdenvDarwinPure
48- stdenvDarwinPure = (import ./pure-darwin { inherit system allPackages platform config;}).stage5;
4950 # Select the appropriate stdenv for the platform `system'.
51 stdenv =
···56 if system == "armv7l-linux" then stdenvLinux else
57 if system == "mips64el-linux" then stdenvLinux else
58 if system == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
59- if system == "x86_64-darwin" then stdenvDarwinPure else
60 if system == "x86_64-solaris" then stdenvNix else
61 if system == "i686-cygwin" then stdenvNative else
62 if system == "x86_64-cygwin" then stdenvNative else
···38 # Linux standard environment.
39 stdenvLinux = (import ./linux { inherit system allPackages platform config lib; }).stdenvLinux;
40041 stdenvDarwin = (import ./darwin { inherit system allPackages platform config;}).stdenvDarwin;
0000004243 # Select the appropriate stdenv for the platform `system'.
44 stdenv =
···49 if system == "armv7l-linux" then stdenvLinux else
50 if system == "mips64el-linux" then stdenvLinux else
51 if system == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
52+ if system == "x86_64-darwin" then stdenvDarwin else
53 if system == "x86_64-solaris" then stdenvNix else
54 if system == "i686-cygwin" then stdenvNative else
55 if system == "x86_64-cygwin" then stdenvNative else
···1{ stdenv, fetchgit, autoconf, automake, libtool, pkgconfig, openconnect, file,
2+ openvpn, vpnc, glib, dbus, iptables, gnutls, polkit,
3 wpa_supplicant, readline6, pptp, ppp, tree }:
45stdenv.mkDerivation rec {
···12 };
1314 buildInputs = [ autoconf automake libtool pkgconfig openconnect polkit
15+ file openvpn vpnc glib dbus iptables gnutls
16 wpa_supplicant readline6 pptp ppp tree ];
1718 preConfigure = ''
···49 cp ./client/connmanctl $out/sbin/connmanctl
50 '';
5152+ meta = with stdenv.lib; {
53 description = "Provides a daemon for managing internet connections";
54 homepage = "https://connman.net/";
55+ maintainers = [ maintainers.matejc ];
56 # tested only on linux, might work on others also
57+ platforms = platforms.linux;
58+ license = licenses.gpl2;
59 };
60}
+34
pkgs/tools/networking/dhcping/default.nix
···0000000000000000000000000000000000
···1+{ stdenv, fetchurl }:
2+3+let version = "1.2"; in
4+stdenv.mkDerivation {
5+ name = "dhcping-${version}";
6+7+ src = fetchurl {
8+ sha256 = "0sk4sg3hn88n44dxikipf3ggfj3ixrp22asb7nry9p0bkfaqdvrj";
9+ url = "http://www.mavetju.org/download/dhcping-${version}.tar.gz";
10+ };
11+12+ enableParallelBuilding = true;
13+14+ doCheck = true;
15+16+ meta = with stdenv.lib; {
17+ inherit version;
18+ description = "Send DHCP request to find out if a DHCP server is running";
19+ longDescription = ''
20+ dhcping sends either a DHCPREQUEST or DHCPINFORM packet to the server
21+ and waits for an answer. Then, if a DHCPREQUEST was send, it will send
22+ a DHCPRELEASE back to the server.
23+24+ This program should be installed setuid root or ran by root only, as it
25+ requires the privileges to bind itself to port 68 (bootpc). Root
26+ privileges are dropped as soon as the program has bound itself to that
27+ port.
28+ '';
29+ homepage = http://www.mavetju.org/unix/general.php;
30+ license = licenses.bsd2;
31+ platforms = platforms.linux;
32+ maintainers = with maintainers; [ nckx ];
33+ };
34+ }