3
0
Fork 0
forked from mirrors/nixpkgs

Merge remote-tracking branch 'origin/master' into staging

This commit is contained in:
Eelco Dolstra 2014-07-07 13:16:26 +02:00
commit 95b828de42
224 changed files with 1831 additions and 665 deletions
doc
lib
nixos
pkgs
applications
editors/emacs-modes/writegood
inferno
misc
networking
browsers/dwb
instant-messengers/telepathy/gabble
mailreaders/mutt
p2p/transmission
science
math/sloane
misc/boinc
version-management/vcprompt
build-support
data/fonts/anonymous-pro
desktops/gnome-3/3.12
apps/gnome-music
core
empathy
evolution-data-server
gnome-shell
development

View file

@ -21,18 +21,18 @@ all: NEWS.html NEWS.txt manual.html manual.pdf
NEWS.html: release-notes.xml NEWS.html: release-notes.xml
$(XSLTPROC) --nonet --xinclude --output $@ $(NEWS_OPTS) \ $(XSLTPROC) --nonet --xinclude --output $@ $(NEWS_OPTS) \
$(docbookxsl)/html/docbook.xsl release-notes.xml $(docbookxsl)/xhtml/docbook.xsl release-notes.xml
NEWS.txt: release-notes.xml NEWS.txt: release-notes.xml
$(XSLTPROC) --nonet --xinclude quote-literals.xsl release-notes.xml | \ $(XSLTPROC) --nonet --xinclude quote-literals.xsl release-notes.xml | \
$(XSLTPROC) --nonet --output $@.tmp.html $(NEWS_OPTS) \ $(XSLTPROC) --nonet --output $@.tmp.html $(NEWS_OPTS) \
$(docbookxsl)/html/docbook.xsl - $(docbookxsl)/xhtml/docbook.xsl -
LANG=en_US w3m -dump $@.tmp.html > $@ LANG=en_US w3m -dump $@.tmp.html > $@
rm $@.tmp.html rm $@.tmp.html
manual.html: *.xml manual.html: *.xml
$(XSLTPROC) --nonet --xinclude --output manual.html \ $(XSLTPROC) --nonet --xinclude --output manual.html \
$(docbookxsl)/html/docbook.xsl manual.xml $(docbookxsl)/xhtml/docbook.xsl manual.xml
manual.pdf: *.xml manual.pdf: *.xml
$(dblatex) \ $(dblatex) \

View file

@ -48,6 +48,7 @@
iElectric = "Domen Kozar <domen@dev.si>"; iElectric = "Domen Kozar <domen@dev.si>";
iyzsong = "Song Wenwu <iyzsong@gmail.com>"; iyzsong = "Song Wenwu <iyzsong@gmail.com>";
jcumming = "Jack Cummings <jack@mudshark.org>"; jcumming = "Jack Cummings <jack@mudshark.org>";
jgeerds = "Jascha Geerds <jg@ekby.de>";
joamaki = "Jussi Maki <joamaki@gmail.com>"; joamaki = "Jussi Maki <joamaki@gmail.com>";
joelteon = "Joel Taylor <me@joelt.io>"; joelteon = "Joel Taylor <me@joelt.io>";
jwiegley = "John Wiegley <johnw@newartisans.com>"; jwiegley = "John Wiegley <johnw@newartisans.com>";

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
with pkgs; with pkgs;
with lib;
let let

View file

@ -14,7 +14,7 @@ in
options = { options = {
networking.extraHosts = pkgs.lib.mkOption { networking.extraHosts = lib.mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
example = "192.168.0.1 lanlocalhost"; example = "192.168.0.1 lanlocalhost";
@ -23,7 +23,7 @@ in
''; '';
}; };
networking.dnsSingleRequest = pkgs.lib.mkOption { networking.dnsSingleRequest = lib.mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = '' description = ''

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
with pkgs; with pkgs;
with lib;
let let

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, utils, ... }: { config, lib, pkgs, utils, ... }:
with lib;
with utils; with utils;
with lib;
{ {

View file

@ -27,7 +27,7 @@ with lib;
environment.etc."odbcinst.ini".text = environment.etc."odbcinst.ini".text =
let inis = config.environment.unixODBCDrivers; let inis = config.environment.unixODBCDrivers;
in pkgs.lib.concatStringsSep "\n" inis; in lib.concatStringsSep "\n" inis;
}; };

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
@ -6,9 +6,9 @@
options = { options = {
networking.enableIntel2100BGFirmware = pkgs.lib.mkOption { networking.enableIntel2100BGFirmware = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
Turn on this option if you want firmware for the Intel Turn on this option if you want firmware for the Intel
PRO/Wireless 2100BG to be loaded automatically. This is PRO/Wireless 2100BG to be loaded automatically. This is
@ -21,7 +21,7 @@
###### implementation ###### implementation
config = pkgs.lib.mkIf config.networking.enableIntel2100BGFirmware { config = lib.mkIf config.networking.enableIntel2100BGFirmware {
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
@ -6,9 +6,9 @@
options = { options = {
networking.enableIntel2200BGFirmware = pkgs.lib.mkOption { networking.enableIntel2200BGFirmware = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
Turn on this option if you want firmware for the Intel Turn on this option if you want firmware for the Intel
PRO/Wireless 2200BG to be loaded automatically. This is PRO/Wireless 2200BG to be loaded automatically. This is
@ -21,7 +21,7 @@
###### implementation ###### implementation
config = pkgs.lib.mkIf config.networking.enableIntel2200BGFirmware { config = lib.mkIf config.networking.enableIntel2200BGFirmware {
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
@ -6,9 +6,9 @@
options = { options = {
networking.enableIntel3945ABGFirmware = pkgs.lib.mkOption { networking.enableIntel3945ABGFirmware = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
This option enables automatic loading of the firmware for the Intel This option enables automatic loading of the firmware for the Intel
PRO/Wireless 3945ABG. PRO/Wireless 3945ABG.
@ -20,7 +20,7 @@
###### implementation ###### implementation
config = pkgs.lib.mkIf config.networking.enableIntel3945ABGFirmware { config = lib.mkIf config.networking.enableIntel3945ABGFirmware {
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;

View file

@ -1,4 +1,4 @@
{pkgs, config, ...}: {pkgs, config, lib, ...}:
{ {
@ -6,9 +6,9 @@
options = { options = {
networking.enableRalinkFirmware = pkgs.lib.mkOption { networking.enableRalinkFirmware = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
Turn on this option if you want firmware for the RT73 NIC. Turn on this option if you want firmware for the RT73 NIC.
''; '';
@ -19,7 +19,7 @@
###### implementation ###### implementation
config = pkgs.lib.mkIf config.networking.enableRalinkFirmware { config = lib.mkIf config.networking.enableRalinkFirmware {
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
}; };

View file

@ -1,4 +1,4 @@
{pkgs, config, ...}: {pkgs, config, lib, ...}:
{ {
@ -6,9 +6,9 @@
options = { options = {
networking.enableRTL8192cFirmware = pkgs.lib.mkOption { networking.enableRTL8192cFirmware = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
Turn on this option if you want firmware for the RTL8192c (and related) NICs. Turn on this option if you want firmware for the RTL8192c (and related) NICs.
''; '';
@ -19,7 +19,7 @@
###### implementation ###### implementation
config = pkgs.lib.mkIf config.networking.enableRTL8192cFirmware { config = lib.mkIf config.networking.enableRTL8192cFirmware {
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
}; };

View file

@ -1,9 +1,9 @@
{pkgs, config, ...}: {lib, config, ...}:
{ {
hardware = { hardware = {
pcmcia = { pcmcia = {
firmware = [ (pkgs.lib.cleanSource ./firmware) ]; firmware = [ (lib.cleanSource ./firmware) ];
}; };
}; };
} }

View file

@ -84,7 +84,7 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = pkgs.lib.singleton { assertions = lib.singleton {
assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64; assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
message = "Option driSupport32Bit only makes sense on a 64-bit system."; message = "Option driSupport32Bit only makes sense on a 64-bit system.";
}; };

View file

@ -152,7 +152,7 @@ in
# default root password is empty. # default root password is empty.
services.openssh.enable = true; services.openssh.enable = true;
jobs.openssh.startOn = pkgs.lib.mkOverride 50 ""; jobs.openssh.startOn = lib.mkOverride 50 "";
boot.loader.grub.enable = false; boot.loader.grub.enable = false;
boot.loader.generationsDir.enable = false; boot.loader.generationsDir.enable = false;

View file

@ -109,7 +109,7 @@ in
# not be started by default on the installation CD because the # not be started by default on the installation CD because the
# default root password is empty. # default root password is empty.
services.openssh.enable = true; services.openssh.enable = true;
jobs.openssh.startOn = pkgs.lib.mkOverride 50 ""; jobs.openssh.startOn = lib.mkOverride 50 "";
# To be able to use the systemTarball to catch troubles. # To be able to use the systemTarball to catch troubles.
boot.crashDump = { boot.crashDump = {

View file

@ -165,7 +165,7 @@ in
# not be started by default on the installation CD because the # not be started by default on the installation CD because the
# default root password is empty. # default root password is empty.
services.openssh.enable = true; services.openssh.enable = true;
jobs.openssh.startOn = pkgs.lib.mkOverride 50 ""; jobs.openssh.startOn = lib.mkOverride 50 "";
# cpufrequtils fails to build on non-pc # cpufrequtils fails to build on non-pc
powerManagement.enable = false; powerManagement.enable = false;

View file

@ -1,7 +1,7 @@
# This module generates nixos-install, nixos-rebuild, # This module generates nixos-install, nixos-rebuild,
# nixos-generate-config, etc. # nixos-generate-config, etc.
{ config, pkgs, modulesPath, ... }: { config, pkgs, modulesPath, lib, ... }:
let let
@ -65,7 +65,7 @@ let
test -e "$out/chrome/content/jquery-1.5.2.js" || test -e "$out/chrome/content/jquery-1.5.2.js" ||
cp -f "$jquery" "$out/chrome/content/jquery-1.5.2.js" cp -f "$jquery" "$out/chrome/content/jquery-1.5.2.js"
''; '';
gui = pkgs.lib.cleanSource "${modulesPath}/../gui"; gui = lib.cleanSource "${modulesPath}/../gui";
jquery = pkgs.fetchurl { jquery = pkgs.fetchurl {
url = http://code.jquery.com/jquery-1.5.2.min.js; url = http://code.jquery.com/jquery-1.5.2.min.js;
sha256 = "8f0a19ee8c606b35a10904951e0a27da1896eafe33c6e88cb7bcbe455f05a24a"; sha256 = "8f0a19ee8c606b35a10904951e0a27da1896eafe33c6e88cb7bcbe455f05a24a";

View file

@ -1,19 +1,19 @@
# This module defines the global list of uids and gids. We keep a # This module defines the global list of uids and gids. We keep a
# central list to prevent id collisions. # central list to prevent id collisions.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
options = { options = {
ids.uids = pkgs.lib.mkOption { ids.uids = lib.mkOption {
internal = true; internal = true;
description = '' description = ''
The user IDs used in NixOS. The user IDs used in NixOS.
''; '';
}; };
ids.gids = pkgs.lib.mkOption { ids.gids = lib.mkOption {
internal = true; internal = true;
description = '' description = ''
The group IDs used in NixOS. The group IDs used in NixOS.
@ -135,6 +135,7 @@
influxdb = 125; influxdb = 125;
nsd = 126; nsd = 126;
gitolite = 127; gitolite = 127;
znc = 128;
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399! # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
@ -243,6 +244,7 @@
teamspeak = 124; teamspeak = 124;
influxdb = 125; influxdb = 125;
nsd = 126; nsd = 126;
znc = 128;
# When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399! # When adding a gid, make sure it doesn't match an existing uid. And don't use gids above 399!

View file

@ -1,11 +1,11 @@
{ config, pkgs, ... }: { config, lib, ... }:
{ {
options = { options = {
lib = pkgs.lib.mkOption { lib = lib.mkOption {
default = {}; default = {};
type = pkgs.lib.types.attrsOf pkgs.lib.types.attrs; type = lib.types.attrsOf lib.types.attrs;
description = '' description = ''
This option allows modules to define helper functions, constants, etc. This option allows modules to define helper functions, constants, etc.

View file

@ -1,11 +1,11 @@
# This module allows you to export something from configuration # This module allows you to export something from configuration
# Use case: export kernel source expression for ease of configuring # Use case: export kernel source expression for ease of configuring
{ config, pkgs, ... }: { config, lib, ... }:
{ {
options = { options = {
passthru = pkgs.lib.mkOption { passthru = lib.mkOption {
visible = false; visible = false;
description = '' description = ''
This attribute set will be exported as a system attribute. This attribute set will be exported as a system attribute.

View file

@ -237,6 +237,7 @@
./services/networking/wicd.nix ./services/networking/wicd.nix
./services/networking/wpa_supplicant.nix ./services/networking/wpa_supplicant.nix
./services/networking/xinetd.nix ./services/networking/xinetd.nix
./services/networking/znc.nix
./services/printing/cupsd.nix ./services/printing/cupsd.nix
./services/scheduling/atd.nix ./services/scheduling/atd.nix
./services/scheduling/cron.nix ./services/scheduling/cron.nix

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, lib, ... }:
let let
inherit (pkgs.lib) mkOption mkIf; inherit (lib) mkOption mkIf;
cfg = config.environment.blcr; cfg = config.environment.blcr;
blcrPkg = config.boot.kernelPackages.blcr; blcrPkg = config.boot.kernelPackages.blcr;
in in

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, lib, ... }:
let let
inherit (pkgs.lib) mkOption mkIf types; inherit (lib) mkOption mkIf types;
cfg = config.programs.screen; cfg = config.programs.screen;
in in

View file

@ -40,7 +40,7 @@ in
options = { options = {
users.defaultUserShell = pkgs.lib.mkOption { users.defaultUserShell = lib.mkOption {
description = '' description = ''
This option defines the default shell assigned to user This option defines the default shell assigned to user
accounts. This must not be a store path, since the path is accounts. This must not be a store path, since the path is
@ -60,7 +60,7 @@ in
config = { config = {
environment.systemPackages = environment.systemPackages =
pkgs.lib.optional config.users.mutableUsers pkgs.shadow; lib.optional config.users.mutableUsers pkgs.shadow;
environment.etc = environment.etc =
[ { # /etc/login.defs: global configuration for pwdutils. You [ { # /etc/login.defs: global configuration for pwdutils. You

View file

@ -14,6 +14,7 @@ let virtualbox = config.boot.kernelPackages.virtualbox; in
services.udev.extraRules = services.udev.extraRules =
'' ''
KERNEL=="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660", TAG+="systemd" KERNEL=="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660", TAG+="systemd"
KERNEL=="vboxdrvu", OWNER="root", GROUP="root", MODE="0666", TAG+="systemd"
KERNEL=="vboxnetctl", OWNER="root", GROUP="root", MODE="0600", TAG+="systemd" KERNEL=="vboxnetctl", OWNER="root", GROUP="root", MODE="0600", TAG+="systemd"
SUBSYSTEM=="usb_device", ACTION=="add", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" SUBSYSTEM=="usb_device", ACTION=="add", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}" SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="${virtualbox}/libexec/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
with pkgs; with pkgs;
with lib;
let let

View file

@ -73,7 +73,7 @@ in
touch ${stateDir}/sitecopy.secrets touch ${stateDir}/sitecopy.secrets
chown root ${stateDir}/sitecopy.secrets chown root ${stateDir}/sitecopy.secrets
${pkgs.lib.concatStrings (map ( b: '' ${lib.concatStrings (map ( b: ''
unset secrets unset secrets
unset secret unset secret
secrets=`grep '^${b.server}' ${stateDir}/sitecopy.secrets | head -1` secrets=`grep '^${b.server}' ${stateDir}/sitecopy.secrets | head -1`

View file

@ -85,7 +85,7 @@ in
Defines how users authenticate themselves to the server. By Defines how users authenticate themselves to the server. By
default, "trust" access to local users will always be granted default, "trust" access to local users will always be granted
along with any other custom options. If you do not want this, along with any other custom options. If you do not want this,
set this option using "pkgs.lib.mkForce" to override this set this option using "lib.mkForce" to override this
behaviour. behaviour.
''; '';
}; };

View file

@ -1,8 +1,8 @@
# GNOME Documents daemon. # GNOME Documents daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# GNOME Keyring daemon. # GNOME Keyring daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# GNOME Online Accounts daemon. # GNOME Online Accounts daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# GNOME Online Miners daemon. # GNOME Online Miners daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# GNOME User Share daemon. # GNOME User Share daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# gvfs backends # gvfs backends
{ config, pkgs, ... }: { config, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# Seahorse daemon. # Seahorse daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -1,8 +1,8 @@
# Tracker daemon. # Tracker daemon.
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
gnome3 = config.environment.gnome3.packageSet; gnome3 = config.environment.gnome3.packageSet;

View file

@ -16,7 +16,7 @@ let
echo "event=${event.event}" > $fn echo "event=${event.event}" > $fn
echo "action=${pkgs.writeScript "${event.name}.sh" event.action}" >> $fn echo "action=${pkgs.writeScript "${event.name}.sh" event.action}" >> $fn
''; '';
in pkgs.lib.concatMapStrings f events in lib.concatMapStrings f events
} }
''; '';

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
@ -6,9 +6,9 @@
options = { options = {
hardware.amdHybridGraphics.disable = pkgs.lib.mkOption { hardware.amdHybridGraphics.disable = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
Completely disable the AMD graphics card and use the Completely disable the AMD graphics card and use the
integrated graphics processor instead. integrated graphics processor instead.
@ -20,7 +20,7 @@
###### implementation ###### implementation
config = pkgs.lib.mkIf config.hardware.amdHybridGraphics.disable { config = lib.mkIf config.hardware.amdHybridGraphics.disable {
systemd.services."amd-hybrid-graphics" = { systemd.services."amd-hybrid-graphics" = {
path = [ pkgs.bash ]; path = [ pkgs.bash ];
description = "Disable AMD Card"; description = "Disable AMD Card";

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let kernel = config.boot.kernelPackages; in let kernel = config.boot.kernelPackages; in
@ -8,9 +8,9 @@ let kernel = config.boot.kernelPackages; in
options = { options = {
hardware.nvidiaOptimus.disable = pkgs.lib.mkOption { hardware.nvidiaOptimus.disable = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
Completely disable the NVIDIA graphics card and use the Completely disable the NVIDIA graphics card and use the
integrated graphics processor instead. integrated graphics processor instead.
@ -22,7 +22,7 @@ let kernel = config.boot.kernelPackages; in
###### implementation ###### implementation
config = pkgs.lib.mkIf config.hardware.nvidiaOptimus.disable { config = lib.mkIf config.hardware.nvidiaOptimus.disable {
boot.blacklistedKernelModules = ["nouveau" "nvidia" "nvidiafb"]; boot.blacklistedKernelModules = ["nouveau" "nvidia" "nvidiafb"];
boot.kernelModules = [ "bbswitch" ]; boot.kernelModules = [ "bbswitch" ];
boot.extraModulePackages = [ kernel.bbswitch ]; boot.extraModulePackages = [ kernel.bbswitch ];

View file

@ -1,9 +1,9 @@
# Monit system watcher # Monit system watcher
# http://mmonit.org/monit/ # http://mmonit.org/monit/
{config, pkgs, ...}: {config, pkgs, lib, ...}:
let inherit (pkgs.lib) mkOption mkIf; let inherit (lib) mkOption mkIf;
in in
{ {

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let let
inherit (pkgs.lib) mkOption mkEnableOption mkIf mkMerge types optionalAttrs optional; inherit (lib) mkOption mkEnableOption mkIf mkMerge types optionalAttrs optional;
cfg = config.services.uptime; cfg = config.services.uptime;

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let let
inherit (pkgs.lib) mkOption mkIf; inherit (lib) mkOption mkIf;
cfg = config.services.openafsClient; cfg = config.services.openafsClient;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
@ -136,4 +136,4 @@ in
networking.firewall.allowedTCPPorts = [ cfg.port ]; networking.firewall.allowedTCPPorts = [ cfg.port ];
}; };
} }

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
with pkgs; with pkgs;
with lib;
let let
cfg = config.networking.connman; cfg = config.networking.connman;

View file

@ -1,8 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let let
inherit (pkgs.lib) mkOption mkIf singleton; inherit (lib) mkOption mkIf singleton;
inherit (pkgs) ddclient; inherit (pkgs) ddclient;

View file

@ -18,7 +18,7 @@ let
${cfg.extraConfig} ${cfg.extraConfig}
${pkgs.lib.concatMapStrings ${lib.concatMapStrings
(machine: '' (machine: ''
host ${machine.hostName} { host ${machine.hostName} {
hardware ethernet ${machine.ethernetAddress}; hardware ethernet ${machine.ethernetAddress};

View file

@ -1,9 +1,9 @@
# GNU Virtual Private Ethernet # GNU Virtual Private Ethernet
{config, pkgs, ...}: {config, pkgs, lib, ...}:
let let
inherit (pkgs.lib) mkOption mkIf; inherit (lib) mkOption mkIf;
cfg = config.services.gvpe; cfg = config.services.gvpe;

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with lib;
with pkgs; with pkgs;
with lib;
let let
cfg = config.networking.networkmanager; cfg = config.networking.networkmanager;
@ -151,7 +151,7 @@ in {
{ source = "${networkmanager_pptp}/etc/NetworkManager/VPN/nm-pptp-service.name"; { source = "${networkmanager_pptp}/etc/NetworkManager/VPN/nm-pptp-service.name";
target = "NetworkManager/VPN/nm-pptp-service.name"; target = "NetworkManager/VPN/nm-pptp-service.name";
} }
] ++ pkgs.lib.optional (cfg.appendNameservers == [] || cfg.insertNameservers == []) ] ++ optional (cfg.appendNameservers == [] || cfg.insertNameservers == [])
{ source = overrideNameserversScript; { source = overrideNameserversScript;
target = "NetworkManager/dispatcher.d/02overridedns"; target = "NetworkManager/dispatcher.d/02overridedns";
}; };

View file

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
with pkgs.lib; with lib;
let let
cfg = config.services.notbit; cfg = config.services.notbit;
varDir = "/var/lib/notbit"; varDir = "/var/lib/notbit";

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
cfg = config.services.nsd; cfg = config.services.nsd;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
with pkgs.lib; with lib;
let let
ts3 = pkgs.teamspeak_server; ts3 = pkgs.teamspeak_server;

View file

@ -0,0 +1,294 @@
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.services.znc;
defaultUser = "znc"; # Default user to own process.
# Default user and pass:
# un=znc
# pw=nixospass
defaultUserName = "znc";
defaultPassBlock = "
<Pass password>
Method = sha256
Hash = e2ce303c7ea75c571d80d8540a8699b46535be6a085be3414947d638e48d9e93
Salt = l5Xryew4g*!oa(ECfX2o
</Pass>
";
confOptions = { ... }: {
options = {
modules = mkOption {
type = types.listOf types.string;
default = [ "partyline" "webadmin" "adminlog" "log" ];
example = [ "partyline" "webadmin" "adminlog" "log" ];
description = ''
A list of modules to include in the `znc.conf` file.
'';
};
userName = mkOption {
default = defaultUserName;
example = "johntron";
type = types.string;
description = ''
The user name to use when generating the `znc.conf` file.
This is the user name used by the user logging into the ZNC web admin.
'';
};
nick = mkOption {
default = "znc-user";
example = "john";
type = types.string;
description = ''
The IRC nick to use when generating the `znc.conf` file.
'';
};
passBlock = mkOption {
default = defaultPassBlock;
example = "Must be the block generated by the `znc --makepass` command.";
type = types.string;
description = ''
The pass block to use when generating the `znc.conf` file.
This is the password used by the user logging into the ZNC web admin.
This is the block generated by the `znc --makepass` command.
!!! If not specified, please change this after starting the service. !!!
'';
};
port = mkOption {
default = "5000";
example = "5000";
type = types.string;
description = ''
Specifies the port on which to listen.
'';
};
useSSL = mkOption {
default = true;
example = true;
type = types.bool;
description = ''
Indicates whether the ZNC server should use SSL when listening on the specified port.
'';
};
};
};
# Keep znc.conf in nix store, then symlink or copy into `dataDir`, depending on `mutable`.
mkZncConf = confOpts: ''
// Also check http://en.znc.in/wiki/Configuration
AnonIPLimit = 10
ConnectDelay = 5
# Add `LoadModule = x` for each module...
${concatMapStrings (n: "LoadModule = ${n}\n") confOpts.modules}
MaxBufferSize = 500
ProtectWebSessions = true
SSLCertFile = ${cfg.dataDir}/znc.pem
ServerThrottle = 30
Skin = dark-clouds
StatusPrefix = *
Version = 1.2
<Listener listener0>
AllowIRC = true
AllowWeb = true
IPv4 = true
IPv6 = false
Port = ${if confOpts.useSSL then "+" else ""}${confOpts.port}
SSL = ${if confOpts.useSSL then "true" else "false"}
</Listener>
<User ${confOpts.userName}>
Admin = true
Allow = *
AltNick = ${confOpts.nick}_
AppendTimestamp = false
AutoClearChanBuffer = false
Buffer = 150
ChanModes = +stn
DenyLoadMod = false
DenySetBindHost = false
Ident = ident
JoinTries = 10
MaxJoins = 0
MaxNetworks = 1
MultiClients = true
Nick = ${confOpts.nick}
PrependTimestamp = true
QuitMsg = Quit
RealName = ${confOpts.nick}
TimestampFormat = [%H:%M:%S]
${confOpts.passBlock}
</User>
'';
zncConfFile = pkgs.writeTextFile {
name = "znc.conf";
text = if cfg.zncConf != ""
then cfg.zncConf
else mkZncConf cfg.confOptions;
};
in
{
###### Interface
options = {
services.znc = {
enable = mkOption {
default = false;
example = true;
type = types.bool;
description = ''
Enable a ZNC service for a user.
'';
};
user = mkOption {
default = "znc";
example = "john";
type = types.string;
description = ''
The name of an existing user account to use to own the ZNC server process.
If not specified, a default user will be created to own the process.
'';
};
dataDir = mkOption {
default = "/home/${cfg.user}/.znc";
example = "/home/john/.znc";
type = types.string;
description = ''
The data directory. Used for configuration files and modules.
'';
};
zncConf = mkOption {
default = "";
example = "See: http://wiki.znc.in/Configuration";
type = types.string;
description = ''
The contents of the `znc.conf` file to use when creating it.
If specified, `confOptions` will be ignored, and this value, as-is, will be used.
If left empty, a conf file with default values will be used.
Recommended to generate with `znc --makeconf` command.
'';
};
confOptions = mkOption {
default = {};
example = {
modules = [ "log" ];
userName = "john";
nick = "johntron";
};
type = types.optionSet;
description = ''
Values to use when creating a `znc.conf` file.
'';
options = confOptions;
};
mutable = mkOption {
default = false;
example = true;
type = types.bool;
description = ''
Indicates whether to allow the contents of the `dataDir` directory to be changed
by the user at run-time.
If true, modifications to the ZNC configuration after its initial creation are not
overwritten by a NixOS system rebuild.
If false, the ZNC configuration is rebuilt by every system rebuild.
If the user wants to manage the ZNC service using the web admin interface, this value
should be set to true.
'';
};
extraFlags = mkOption {
default = "";
example = "--debug";
type = types.string;
description = ''
Extra flags to use when executing znc command.
'';
};
};
};
###### Implementation
config = mkIf cfg.enable {
systemd.services."znc-${cfg.user}" = {
description = "ZNC Server of ${cfg.user}.";
wantedBy = [ "multi-user.target" ];
after = [ "network.service" ];
path = [ pkgs.znc ];
serviceConfig = {
User = "${cfg.user}";
Restart = "always";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
};
preStart = ''
${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}
${pkgs.coreutils}/bin/chown ${cfg.user} ${cfg.dataDir} -R
${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}/configs
# If mutable, regenerate conf file every time.
${optionalString (!cfg.mutable) ''
${pkgs.coreutils}/echo "znc-${cfg.user} is set to be system-managed. Now deleting old znc.conf file to be regenerated."
${pkgs.coreutils}/rm -f ${cfg.dataDir}/configs/znc.conf
''}
# Ensure essential files exist.
if [[ ! -f ${cfg.dataDir}/configs/znc.conf ]]; then
${pkgs.coreutils}/bin/echo "No znc.conf file found in ${cfg.dataDir}. Creating one now."
${if (!cfg.mutable)
then "${pkgs.coreutils}/bin/ln --force -s ${zncConfFile} ${cfg.dataDir}/configs/znc.conf"
else ''
${pkgs.coreutils}/bin/cp --no-clobber ${zncConfFile} ${cfg.dataDir}/configs/znc.conf
${pkgs.coreutils}/bin/chmod u+rw ${cfg.dataDir}/configs/znc.conf
${pkgs.coreutils}/bin/chown ${cfg.user} ${cfg.dataDir}/configs/znc.conf
''}
fi
if [[ ! -f ${cfg.dataDir}/znc.pem ]]; then
${pkgs.coreutils}/bin/echo "No znc.pem file found in ${cfg.dataDir}. Creating one now."
${pkgs.znc}/bin/znc --makepem
fi
'';
script = "${pkgs.znc}/bin/znc --foreground --datadir ${cfg.dataDir} ${cfg.extraFlags}";
};
users.extraUsers = optional (cfg.user == defaultUser)
{ name = defaultUser;
description = "ZNC server daemon owner";
group = defaultUser;
uid = config.ids.uids.znc;
createHome = true;
createUser = true;
};
users.extraGroups = optional (cfg.user == defaultUser)
{ name = defaultUser;
gid = config.ids.gids.znc;
members = [ defaultUser ];
};
};
}

View file

@ -15,7 +15,7 @@ let
MAILTO="${config.services.cron.mailto}" MAILTO="${config.services.cron.mailto}"
''} ''}
NIX_CONF_DIR=/etc/nix NIX_CONF_DIR=/etc/nix
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)} ${lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
''; '';
# Vixie cron requires build-time configuration for the sendmail path. # Vixie cron requires build-time configuration for the sendmail path.

View file

@ -17,7 +17,7 @@ let
MAILTO="${config.services.cron.mailto}" MAILTO="${config.services.cron.mailto}"
''} ''}
NIX_CONF_DIR=/etc/nix NIX_CONF_DIR=/etc/nix
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)} ${lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
''; '';
allowdeny = target: users: allowdeny = target: users:

View file

@ -1,4 +1,4 @@
{pkgs, config, ...}: {lib, config, ...}:
let kernel = config.boot.kernelPackages; let kernel = config.boot.kernelPackages;
in in
@ -9,9 +9,9 @@ in
options = { options = {
services.frandom.enable = pkgs.lib.mkOption { services.frandom.enable = lib.mkOption {
default = false; default = false;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = '' description = ''
enable the /dev/frandom device (a very fast random number generator) enable the /dev/frandom device (a very fast random number generator)
''; '';
@ -22,7 +22,7 @@ in
###### implementation ###### implementation
config = pkgs.lib.mkIf config.services.frandom.enable { config = lib.mkIf config.services.frandom.enable {
boot.kernelModules = [ "frandom" ]; boot.kernelModules = [ "frandom" ];
boot.extraModulePackages = [ kernel.frandom ]; boot.extraModulePackages = [ kernel.frandom ];
services.udev.packages = [ kernel.frandom ]; services.udev.packages = [ kernel.frandom ];

View file

@ -1,8 +1,8 @@
{pkgs, config, ...}: {pkgs, config, lib, ...}:
let let
inherit (pkgs.lib) mkOption mkIf singleton; inherit (lib) mkOption mkIf singleton;
inherit (pkgs) heimdal; inherit (pkgs) heimdal;
@ -36,7 +36,7 @@ in
environment.systemPackages = [ heimdal ]; environment.systemPackages = [ heimdal ];
services.xinetd.enable = true; services.xinetd.enable = true;
services.xinetd.services = pkgs.lib.singleton services.xinetd.services = lib.singleton
{ name = "kerberos-adm"; { name = "kerberos-adm";
flags = "REUSE NAMEINARGS"; flags = "REUSE NAMEINARGS";
protocol = "tcp"; protocol = "tcp";

View file

@ -7,7 +7,7 @@ let
nssModulesPath = config.system.nssModules.path; nssModulesPath = config.system.nssModules.path;
cfg = config.services.nscd; cfg = config.services.nscd;
inherit (pkgs.lib) singleton; inherit (lib) singleton;
cfgFile = pkgs.writeText "nscd.conf" cfg.config; cfgFile = pkgs.writeText "nscd.conf" cfg.config;

View file

@ -1,8 +1,8 @@
{pkgs, config, ...}: {pkgs, config, lib, ...}:
let let
inherit (pkgs.lib) mkOption mkIf singleton; inherit (lib) mkOption mkIf singleton;
inherit (pkgs) uptimed; inherit (pkgs) uptimed;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let let
inherit (pkgs.lib) mkOption types mkIf optionalString; inherit (lib) mkOption types mkIf optionalString;
cfg = config.services.kmscon; cfg = config.services.kmscon;

View file

@ -72,11 +72,11 @@ let
# Unpack Mediawiki and put the config file in its root directory. # Unpack Mediawiki and put the config file in its root directory.
mediawikiRoot = pkgs.stdenv.mkDerivation rec { mediawikiRoot = pkgs.stdenv.mkDerivation rec {
name= "mediawiki-1.20.8"; name= "mediawiki-1.23.1";
src = pkgs.fetchurl { src = pkgs.fetchurl {
url = "http://download.wikimedia.org/mediawiki/1.20/${name}.tar.gz"; url = "http://download.wikimedia.org/mediawiki/1.23/${name}.tar.gz";
sha256 = "0yfmh5vnfbgpvicfqh7nh4hwdk4qbc6gfniv02vchkg5al0nn7ag"; sha256 = "07z5j8d988cdg4ml4n0vs9fwmj0p594ibbqdid16faxwqm52dkhl";
}; };
skins = config.skins; skins = config.skins;
@ -93,9 +93,10 @@ let
mkdir -p $out mkdir -p $out
cp -r * $out cp -r * $out
cp ${mediawikiConfig} $out/LocalSettings.php cp ${mediawikiConfig} $out/LocalSettings.php
sed -i 's|/bin/bash|${pkgs.stdenv.shell}|' \ sed -i \
$out/maintenance/fuzz-tester.php \ -e 's|/bin/bash|${pkgs.bash}/bin/bash|g' \
$out/bin/ulimit.sh \ -e 's|/usr/bin/timeout|${pkgs.coreutils}/bin/timeout|g' \
$out/includes/limit.sh \
$out/includes/GlobalFunctions.php $out/includes/GlobalFunctions.php
''; '';
}; };

View file

@ -1,8 +1,8 @@
{ config, pkgs, serverInfo, ... }: { config, pkgs, serverInfo, lib, ... }:
let let
inherit (pkgs) mercurial; inherit (pkgs) mercurial;
inherit (pkgs.lib) mkOption; inherit (lib) mkOption;
urlPrefix = config.urlPrefix; urlPrefix = config.urlPrefix;

View file

@ -1,7 +1,7 @@
{ config, pkgs, serverInfo, ... }: { config, pkgs, serverInfo, lib, ... }:
let let
extraWorkersProperties = pkgs.lib.optionalString (config ? extraWorkersProperties) config.extraWorkersProperties; extraWorkersProperties = lib.optionalString (config ? extraWorkersProperties) config.extraWorkersProperties;
workersProperties = pkgs.writeText "workers.properties" '' workersProperties = pkgs.writeText "workers.properties" ''
# Define list of workers that will be used # Define list of workers that will be used

View file

@ -1,7 +1,7 @@
{pkgs, config, ...}: {lib, pkgs, config, ...}:
let let
inherit (pkgs.lib) mkOption mkIf; inherit (lib) mkOption mkIf;
cfg = config.services.xserver.windowManager.openbox; cfg = config.services.xserver.windowManager.openbox;
in in

View file

@ -1,7 +1,7 @@
{pkgs, config, ...}: {pkgs, lib, config, ...}:
let let
inherit (pkgs.lib) mkOption mkIf optionals literalExample; inherit (lib) mkOption mkIf optionals literalExample;
cfg = config.services.xserver.windowManager.xmonad; cfg = config.services.xserver.windowManager.xmonad;
xmonadEnv = cfg.haskellPackages.ghcWithPackages(self: [ xmonadEnv = cfg.haskellPackages.ghcWithPackages(self: [
self.xmonad self.xmonad
@ -48,7 +48,7 @@ in
enableContribAndExtras = mkOption { enableContribAndExtras = mkOption {
default = false; default = false;
example = true; example = true;
type = pkgs.lib.types.bool; type = lib.types.bool;
description = "Enable xmonad-{contrib,extras} in Xmonad."; description = "Enable xmonad-{contrib,extras} in Xmonad.";
}; };
}; };

View file

@ -1,6 +1,6 @@
{ config, pkgs, modulesPath, ... }: { config, lib, ... }:
with pkgs.lib; with lib;
let let
fileSystems = attrValues config.fileSystems ++ config.swapDevices; fileSystems = attrValues config.fileSystems ++ config.swapDevices;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
with pkgs.lib; with lib;
let let
inInitrd = any (fs: fs == "f2fs") config.boot.initrd.supportedFilesystems; inInitrd = any (fs: fs == "f2fs") config.boot.initrd.supportedFilesystems;

View file

@ -1,8 +1,8 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
{ {
config = pkgs.lib.mkMerge [ config = lib.mkMerge [
(pkgs.lib.mkIf (pkgs.lib.any (fs: fs == "unionfs-fuse") config.boot.initrd.supportedFilesystems) { (lib.mkIf (lib.any (fs: fs == "unionfs-fuse") config.boot.initrd.supportedFilesystems) {
boot.initrd.kernelModules = [ "fuse" ]; boot.initrd.kernelModules = [ "fuse" ];
boot.initrd.extraUtilsCommands = '' boot.initrd.extraUtilsCommands = ''
@ -17,7 +17,7 @@
ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin ln -s $(which umount) /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.utillinux.name}/bin
''; '';
}) })
(pkgs.lib.mkIf (pkgs.lib.any (fs: fs == "unionfs-fuse") config.boot.supportedFilesystems) { (lib.mkIf (lib.any (fs: fs == "unionfs-fuse") config.boot.supportedFilesystems) {
system.fsPackages = [ pkgs.unionfs-fuse ]; system.fsPackages = [ pkgs.unionfs-fuse ];
}) })
]; ];

View file

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, lib, ... }:
let let
configfile = builtins.storePath (builtins.toFile "config" (pkgs.lib.concatStringsSep "\n" configfile = builtins.storePath (builtins.toFile "config" (lib.concatStringsSep "\n"
(map (builtins.getAttr "configLine") config.system.requiredKernelConfig)) (map (builtins.getAttr "configLine") config.system.requiredKernelConfig))
); );

View file

@ -11,7 +11,6 @@ let
in in
optionalAttrs (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) # ugly...
{ {
###### interface ###### interface
@ -33,6 +32,10 @@ optionalAttrs (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) # ugly...
###### implementation ###### implementation
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ {
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
message = "Virtualbox not currently supported on ${pkgs.stdenv.system}";
} ];
environment.systemPackages = [ kernel.virtualboxGuestAdditions ]; environment.systemPackages = [ kernel.virtualboxGuestAdditions ];

View file

@ -370,7 +370,7 @@ in {
# Rebuild the CD configuration with a little modification. # Rebuild the CD configuration with a little modification.
rebuildCD = makeTest rebuildCD = makeTest
{ inherit iso; { inherit iso;
name = "rebuild-CD"; name = "rebuild-cd";
nodes = { }; nodes = { };
testScript = testScript =
'' ''

View file

@ -30,21 +30,21 @@ in
$client1->execute("mumble mumble://client1\@server/test &"); $client1->execute("mumble mumble://client1\@server/test &");
$client2->execute("mumble mumble://client2\@server/test &"); $client2->execute("mumble mumble://client2\@server/test &");
$client1->waitForWindow(qr/Mumble/);
$client2->waitForWindow(qr/Mumble/);
$server->sleep(3); # Wait some more for the Mumble UI
# cancel client audio configuration # cancel client audio configuration
$client1->waitForWindow(qr/Audio Tuning Wizard/);
$client2->waitForWindow(qr/Audio Tuning Wizard/);
$client1->sendKeys("esc"); $client1->sendKeys("esc");
$client2->sendKeys("esc"); $client2->sendKeys("esc");
$server->sleep(1);
# cancel client cert configuration # cancel client cert configuration
$client1->waitForWindow(qr/Certificate Management/);
$client2->waitForWindow(qr/Certificate Management/);
$client1->sendKeys("esc"); $client1->sendKeys("esc");
$client2->sendKeys("esc"); $client2->sendKeys("esc");
$server->sleep(1);
# accept server certificate # accept server certificate
$client1->waitForWindow(qr/^Mumble$/);
$client2->waitForWindow(qr/^Mumble$/);
$client1->sendChars("y"); $client1->sendChars("y");
$client2->sendChars("y"); $client2->sendChars("y");

View file

@ -1,5 +1,5 @@
import ./make-test.nix { import ./make-test.nix {
name = "simple" name = "simple";
machine = { config, pkgs, ... }: { }; machine = { config, pkgs, ... }: { };

View file

@ -1,12 +1,12 @@
{stdenv, fetchurl, emacs}: {stdenv, fetchurl, emacs}:
let version = "1.3"; let version = "2.0";
in stdenv.mkDerivation { in stdenv.mkDerivation {
name = "writegood-mode-${version}"; name = "writegood-mode-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz"; url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz";
sha256 = "0p34rgawnqg94vk4lcw14x99rrvsd23dmbwkxz2vax5kq6l8y5yf"; sha256 = "0wf7bj9d00ggy3xigym885a3njfr98i3aqrrawf8x6lgbfc56dgp";
}; };
buildInputs = [ emacs ]; buildInputs = [ emacs ];

View file

@ -0,0 +1,64 @@
{ fetchurl, fetchhg, stdenv, xlibs, gcc46, makeWrapper }:
stdenv.mkDerivation rec {
# Inferno is a rolling release from a mercurial repository. For the verison number
# of the package I'm using the mercurial commit number.
version = "645";
name = "inferno-${version}";
# The mercurial repository does not contain all the components needed for the
# runtime system. The 'base' package contains these. For this package I download
# the base, extract the elements required from that, and add them to the source
# pulled from the mercurial repository.
srcBase = fetchurl {
url = "http://www.vitanuova.com/dist/4e/inferno-20100120.tgz";
sha256 = "0msvy3iwl4n5k0ry0xiyysjkq0qsawmwn3hvg67hbi5y8g7f7l88";
};
src = fetchhg {
url = "https://inferno-os.googlecode.com/hg";
rev = "7ab390b860ca";
sha256 = "09y0iclb3yy10gw1p0182sddg64xh60q2fx4ai7lxyfb65i76qbh";
};
# Fails with gcc48 due to inferno triggering an optimisation issue with floating point.
buildInputs = [ gcc46 xlibs.libX11 xlibs.libXpm xlibs.libXext xlibs.xextproto makeWrapper ];
infernoWrapper = ./inferno;
configurePhase = ''
tar --strip-components=1 -xvf $srcBase inferno/fonts inferno/Mkdirs inferno/empties
sed -e 's@^ROOT=.*$@ROOT='"$out"'/share/inferno@g' -e 's@^OBJTYPE=.*$@OBJTYPE=386@g' -e 's@^SYSHOST=.*$@SYSHOST=Linux@g' -i mkconfig
mkdir prof
sh Mkdirs
'';
buildPhase = ''
export PATH=$PATH:$out/share/inferno/Linux/386/bin
mkdir -p $out/share/inferno
cp -r . $out/share/inferno
./makemk.sh
mk nuke
mk
'';
installPhase = ''
mk install
mkdir -p $out/bin
makeWrapper $out/share/inferno/Linux/386/bin/emu $out/bin/emu \
--suffix LD_LIBRARY_PATH ':' "${gcc46.gcc}/lib" \
--suffix PATH ':' "$out/share/inferno/Linux/386/bin"
makeWrapper $infernoWrapper $out/bin/inferno \
--suffix LD_LIBRARY_PATH ':' "${gcc46.gcc}/lib" \
--suffix PATH ':' "$out/share/inferno/Linux/386/bin" \
--set INFERNO_ROOT "$out/share/inferno"
'';
meta = {
description = "A compact distributed operating system for building cross-platform distributed systems";
homepage = "http://inferno-os.org/";
license = stdenv.lib.licenses.gpl2;
maintainer = [ "Chris Double <chris.double@double.co.nz>" ];
platforms = with stdenv.lib.platforms; linux;
};
}

View file

@ -0,0 +1,31 @@
#! /usr/bin/env bash
export INFERNO_HOME="$HOME/.local/share/inferno"
if [ -n "$XDG_DATA_HOME" ]
then export INFERNO_HOME="$XDG_DATA_HOME/inferno"
fi
if [ ! -d $INFERNO_HOME ]; then
mkdir -p $INFERNO_HOME
fi
if [ ! -d $INFERNO_HOME/tmp ]; then
mkdir -p $INFERNO_HOME/tmp
fi
for d in $INFERNO_HOME/{acme,appl,dis,lib,man,module,usr/inferno}; do
if [ ! -d $d ]; then
mkdir -p $d
cp --no-preserve=all -r $INFERNO_ROOT/${d#$INFERNO_HOME/}/* $d/
chmod -R +w $d
fi
done
if [ ! -d $INFERNO_HOME/usr/$USER ]; then
mkdir -p $INFERNO_HOME/usr/$USER
cp -r $INFERNO_ROOT/usr/inferno/* $INFERNO_HOME/usr/$USER/
chmod -R +w $INFERNO_HOME/usr/$USER
fi
exec emu "$@" /dis/sh.dis -c "bind -b -c '#U*$INFERNO_HOME/' /; /dis/sh.dis"

View file

@ -6,8 +6,8 @@
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "arbtt"; pname = "arbtt";
version = "0.8"; version = "0.8.1";
sha256 = "0anjcg8ikd3jxc5rb3k215wj7ar4kg2plv8sdr8hv64758xkc5q9"; sha256 = "1qzmqjm8pfj59h0hrm28pp6qhzz2am5xq81mirnnchsgg52wrfn0";
isLibrary = false; isLibrary = false;
isExecutable = true; isExecutable = true;
buildDepends = [ buildDepends = [

View file

@ -6,8 +6,8 @@
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "xmobar"; pname = "xmobar";
version = "0.20.1"; version = "0.21";
sha256 = "16jfgn6ciqxrwj6qjhbcpms7mzlbxfaxyxfxp64xvnw626xlpjvk"; sha256 = "1h0gsb808zm4j4kmw7fl4339wllc16ldy1ki96l8w3fvj30bcxpm";
isLibrary = false; isLibrary = false;
isExecutable = true; isExecutable = true;
buildDepends = [ buildDepends = [
@ -18,7 +18,7 @@ cabal.mkDerivation (self: {
extraLibraries = [ libXrandr wirelesstools ]; extraLibraries = [ libXrandr wirelesstools ];
configureFlags = "-fall_extensions"; configureFlags = "-fall_extensions";
meta = { meta = {
homepage = "http://projects.haskell.org/xmobar/"; homepage = "http://xmobar.org";
description = "A Minimalistic Text Based Status Bar"; description = "A Minimalistic Text Based Status Bar";
license = self.stdenv.lib.licenses.bsd3; license = self.stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms; platforms = self.ghc.meta.platforms;

View file

@ -2,12 +2,12 @@
m4, glib_networking, gsettings_desktop_schemas, dconf }: m4, glib_networking, gsettings_desktop_schemas, dconf }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "dwb-2014-06-17"; name = "dwb-2014-07-03";
src = fetchgit { src = fetchgit {
url = "https://bitbucket.org/portix/dwb.git"; url = "https://bitbucket.org/portix/dwb.git";
rev = "9f4bdb9a1f8d5e45071019da4626231dfebd4d8e"; rev = "6224470489eb5ba92987e01396269f8b7cd78ada";
sha256 = "1nj34w2hhw47jsmswsc1y6a09my8zdd01qxwai8dxdvisld3marm"; sha256 = "04p9frsnh1qz067cw36anvr41an789fba839svdjrdva0f2751g8";
}; };
buildInputs = [ pkgconfig makeWrapper gsettings_desktop_schemas libsoup webkit gtk3 gnutls json_c m4 ]; buildInputs = [ pkgconfig makeWrapper gsettings_desktop_schemas libsoup webkit gtk3 gnutls json_c m4 ];

View file

@ -9,12 +9,14 @@ stdenv.mkDerivation rec {
sha256 = "137sslbgh0326lmwihcr2ybljgq9mzsx5wnciilpx884si22wpk8"; sha256 = "137sslbgh0326lmwihcr2ybljgq9mzsx5wnciilpx884si22wpk8";
}; };
nativeBuildInputs = [pkgconfig libxslt]; nativeBuildInputs = [ pkgconfig libxslt ];
buildInputs = [ libxml2 dbus_glib sqlite libsoup libnice telepathy_glib gnutls ]; buildInputs = [ libxml2 dbus_glib sqlite libsoup libnice telepathy_glib gnutls ];
configureFlags = "--with-ca-certificates=/etc/ssl/certs/ca-bundle.crt"; configureFlags = "--with-ca-certificates=/etc/ssl/certs/ca-bundle.crt";
meta = { meta = {
homepage = http://telepathy.freedesktop.org; homepage = http://telepathy.freedesktop.org;
description = "Jabber/XMPP connection manager for the Telepathy framework";
platforms = stdenv.lib.platforms.gnu;
}; };
} }

View file

@ -0,0 +1,12 @@
diff -r 8f62001989cc configure.ac
--- a/configure.ac Sat Feb 08 10:24:22 2014 -0800
+++ b/configure.ac Wed Jul 02 12:34:40 2014 +0200
@@ -473,6 +473,8 @@
mutt_cv_mailpath=/usr/spool/mail
elif test -d /usr/mail; then
mutt_cv_mailpath=/usr/mail
+ elif test -d /tmp; then
+ mutt_cv_mailpath=/tmp
fi])
])
if test "$mutt_cv_mailpath" = no; then

View file

@ -4,7 +4,7 @@
}: }:
let let
version = "2.83"; version = "2.84";
in in
with { inherit (stdenv.lib) optional optionals optionalString; }; with { inherit (stdenv.lib) optional optionals optionalString; };
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "http://download.transmissionbt.com/files/transmission-${version}.tar.xz"; url = "http://download.transmissionbt.com/files/transmission-${version}.tar.xz";
sha256 = "0cqlgl6jmjw1caybz6nzh3l8z0jak1dxba01isv72zvy2r8b1qdh"; sha256 = "1sxr1magqb5s26yvr5yhs1f7bmir8gl09niafg64lhgfnhv1kz59";
}; };
buildInputs = [ pkgconfig intltool file openssl curl libevent inotifyTools ] buildInputs = [ pkgconfig intltool file openssl curl libevent inotifyTools ]

View file

@ -1,16 +1,16 @@
{ cabal, ansiTerminal, filepath, HTTP, network, optparseApplicative { cabal, ansiTerminal, filepath, HTTP, network, optparseApplicative
, stringsearch, terminalSize, time, zlib , terminalSize, text, time, zlib
}: }:
cabal.mkDerivation (self: { cabal.mkDerivation (self: {
pname = "sloane"; pname = "sloane";
version = "1.8"; version = "1.8.2";
sha256 = "0c30slsswfqwzi39hk6jraxz1y1a2yn8g8nyjvlnggwajx2rlm6p"; sha256 = "0kdznrvyrax1gihqxxw36jfbmjri808ii827fa71v2ijlm416hk1";
isLibrary = false; isLibrary = false;
isExecutable = true; isExecutable = true;
buildDepends = [ buildDepends = [
ansiTerminal filepath HTTP network optparseApplicative stringsearch ansiTerminal filepath HTTP network optparseApplicative terminalSize
terminalSize time zlib text time zlib
]; ];
postInstall = '' postInstall = ''
mkdir -p $out/share/man/man1 mkdir -p $out/share/man/man1

View file

@ -3,12 +3,12 @@ mesa, libXmu, libXi, freeglut, libjpeg, libtool, wxGTK, xcbutil,
sqlite, gtk, patchelf, libXScrnSaver, libnotify, libX11, libxcb }: sqlite, gtk, patchelf, libXScrnSaver, libnotify, libX11, libxcb }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "boinc-7.0.44"; name = "boinc-7.2.42";
src = fetchgit { src = fetchgit {
url = "git://boinc.berkeley.edu/boinc-v2.git"; url = "git://boinc.berkeley.edu/boinc-v2.git";
rev = "7c449b1fb8a681ceb27d6895751b62a2b3adf0f2"; rev = "dd0d630882547c123ca0f8fda7a62e058d60f6a9";
sha256 = "0hdramyl9nip3gadp7xiaz8ngyld15i93d8ai1nsd04bmrvdfqia"; sha256 = "1zifpi3mjgaj68fba6kammp3x7z8n2x164zz6fj91xfiapnan56j";
}; };
buildInputs = [ libtool automake autoconf m4 pkgconfig curl mesa libXmu libXi buildInputs = [ libtool automake autoconf m4 pkgconfig curl mesa libXmu libXi

View file

@ -0,0 +1,28 @@
{ stdenv, fetchhg, autoconf, sqlite }:
stdenv.mkDerivation {
name = "vcprompt";
src = fetchhg {
url = "http://hg.gerg.ca/vcprompt/";
rev = "1.2.1";
sha256 = "03xqvp6bfl98bpacrw4n82qv9cw6a4fxci802s3vrygas989v1kj";
};
buildInputs = [ sqlite autoconf ];
preConfigure = ''
autoconf
makeFlags="$makeFlags PREFIX=$out"
'';
meta = with stdenv.lib; {
description = ''
A little C program that prints a short string with barebones information
about the current working directory for various version control systems
'';
homepage = http://hg.gerg.ca/vcprompt;
maintainers = with maintainers; [ cstrahan ];
platforms = with platforms; linux ++ darwin;
};
}

View file

@ -1,9 +1,23 @@
{ stdenv, php, autoreconfHook }: { stdenv, php, autoreconfHook, fetchurl }:
args: stdenv.mkDerivation (args // { { name
buildInputs = [ php autoreconfHook ] ++ args.buildInputs or []; , buildInputs ? []
, makeFlags ? []
, src ? fetchurl {
url = "http://pecl.php.net/get/${name}.tgz";
inherit (args) sha256;
}
, ...
}@args:
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ args.makeFlags or []; stdenv.mkDerivation (args // {
name = "php-${name}";
inherit src;
buildInputs = [ php autoreconfHook ] ++ buildInputs;
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;
autoreconfPhase = "phpize"; autoreconfPhase = "phpize";
}) })

View file

@ -10,16 +10,16 @@ let
buildInputs = map (n: builtins.getAttr n x) buildInputs = map (n: builtins.getAttr n x)
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); (builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec { sourceInfo = rec {
version="1.002"; version = "1.002";
name="anonymousPro"; name="anonymousPro";
url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip"; url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip";
hash="86665847a51cdfb58a1e1dfd8b1ba33f183485affe50b53e3304f63d3d3552ab"; sha256 = "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6";
}; };
in in
rec { rec {
src = a.fetchurl { src = a.fetchurl {
url = sourceInfo.url; url = sourceInfo.url;
sha256 = sourceInfo.hash; sha256 = sourceInfo.sha256;
}; };
name = "${sourceInfo.name}-${sourceInfo.version}"; name = "${sourceInfo.name}-${sourceInfo.version}";
@ -43,11 +43,8 @@ rec {
license = with a.lib.licenses; ofl; license = with a.lib.licenses; ofl;
hydraPlatforms = []; hydraPlatforms = [];
homepage = "http://www.marksimonson.com/fonts/view/anonymous-pro"; homepage = "http://www.marksimonson.com/fonts/view/anonymous-pro";
}; downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html";
passthru = { inherit (sourceInfo) version;
updateInfo = {
downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html";
};
}; };
}) x }) x

View file

@ -0,0 +1,6 @@
attribute_name anonymousPro
url http://www.ms-studio.com/FontSales/anonymouspro.html
version_link '/AnonymousPro-.*[.]zip$'
do_overwrite (){
do_overwrite_just_version
}

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig gtk3 glib intltool itstool gnome3.libmediaart buildInputs = [ pkgconfig gtk3 glib intltool itstool gnome3.libmediaart
gdk_pixbuf gnome3.gnome_icon_theme librsvg python3 gdk_pixbuf gnome3.gnome_icon_theme librsvg python3
gnome3.grilo libxml2 python3Packages.pygobject3 libnotify gnome3.grilo libxml2 python3Packages.pygobject3 libnotify
python3Packages.pycairo python3Packages.dbus python3Packages.pycairo python3Packages.dbus gnome3.totem-pl-parser
gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gstreamer gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad
hicolor_icon_theme gnome3.gnome_icon_theme_symbolic hicolor_icon_theme gnome3.gnome_icon_theme_symbolic
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
let let
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ glib gtk3 libnotify tracker gnome3.grilo cairo [ glib gtk3 libnotify tracker gnome3.grilo cairo
gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gstreamer gst_all_1.gst-plugins-base gnome3.totem-pl-parser
gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad ]; gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad ];
in in
'' ''

View file

@ -19,9 +19,7 @@ stdenv.mkDerivation rec {
}; };
propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard
gnome3.gnome_icon_theme hicolor_icon_theme gnome_online_accounts shared_mime_info ];
gnome_online_accounts shared_mime_info
gnome3.gnome_icon_theme_symbolic ];
propagatedBuildInputs = [ folks telepathy_logger evolution_data_server propagatedBuildInputs = [ folks telepathy_logger evolution_data_server
telepathy_mission_control ]; telepathy_mission_control ];
buildInputs = [ pkgconfig gtk3 glib webkitgtk intltool itstool buildInputs = [ pkgconfig gtk3 glib webkitgtk intltool itstool
@ -31,6 +29,7 @@ stdenv.mkDerivation rec {
gcr libsecret pulseaudio gnome3.yelp_xsl gdk_pixbuf gcr libsecret pulseaudio gnome3.yelp_xsl gdk_pixbuf
libnotify clutter libsoup gnutls libgee p11_kit libnotify clutter libsoup gnutls libgee p11_kit
libcanberra_gtk3 telepathy_farstream farstream libcanberra_gtk3 telepathy_farstream farstream
gnome3.gnome_icon_theme hicolor_icon_theme gnome3.gnome_icon_theme_symbolic
gnome3.gsettings_desktop_schemas file libtool librsvg ]; gnome3.gsettings_desktop_schemas file libtool librsvg ];
NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0" NIX_CFLAGS_COMPILE = [ "-I${dbus_glib}/include/dbus-1.0"
@ -41,7 +40,7 @@ stdenv.mkDerivation rec {
for f in $out/bin/* $out/libexec/*; do for f in $out/bin/* $out/libexec/*; do
wrapProgram $f \ wrapProgram $f \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gnome_themes_standard}/:${gnome3.gnome_themes_standard}/share:${hicolor_icon_theme}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gnome3.gnome_themes_standard}/share:$out/share:$GSETTINGS_SCHEMAS_PATH"
done done
rm $out/share/icons/hicolor/icon-theme.cache rm $out/share/icons/hicolor/icon-theme.cache
''; '';

View file

@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional valaSupport "--enable-vala-bindings"; ++ stdenv.lib.optional valaSupport "--enable-vala-bindings";
preFixup = '' preFixup = ''
for f in "$out/libexec/evolution-addressbook-factory" "$out/libexec/evolution-calendar-factory"; do for f in "$out/libexec/"*; do
wrapProgram $f --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" wrapProgram "$f" --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
done done
''; '';

View file

@ -39,8 +39,16 @@ stdenv.mkDerivation rec {
wrapProgram "$out/libexec/gnome-shell-calendar-server" \ wrapProgram "$out/libexec/gnome-shell-calendar-server" \
--prefix XDG_DATA_DIRS : "${evolution_data_server}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" --prefix XDG_DATA_DIRS : "${evolution_data_server}/share:$out/share:$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH"
echo "${unzip}/bin" > $out/${passthru.mozillaPlugin}/extra-bin-path
''; '';
enableParallelBuilding = true;
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
};
meta = with stdenv.lib; { meta = with stdenv.lib; {
platforms = platforms.linux; platforms = platforms.linux;
}; };

View file

@ -12,13 +12,16 @@ stdenv.mkDerivation rec {
buildInputs = [ coq ocaml ocamlPackages.menhir ]; buildInputs = [ coq ocaml ocamlPackages.menhir ];
enableParallelBuilding = true; enableParallelBuilding = true;
configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ ia32-linux"; configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ " +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
meta = { meta = {
description = "Formally verified C compiler"; description = "Formally verified C compiler";
homepage = "http://compcert.inria.fr"; homepage = "http://compcert.inria.fr";
license = stdenv.lib.licenses.inria; license = stdenv.lib.licenses.inria;
platforms = [ "i686-linux" ]; platforms = stdenv.lib.platforms.linux ++
maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; stdenv.lib.platforms.darwin;
maintainers = [ stdenv.lib.maintainers.thoughtpolice
stdenv.lib.maintainers.jwiegley ];
}; };
} }

View file

@ -0,0 +1,19 @@
http://code.google.com/p/go/source/detail?r=8b13b2ec6b18
--- a/src/cmd/cgo/gcc.go 2014-07-02 12:00:12.171796197 +0200
+++ b/src/cmd/cgo/gcc.go 2014-07-02 12:01:57.844472754 +0200
@@ -840,6 +840,15 @@
func (p *Package) gccErrors(stdin []byte) string {
// TODO(rsc): require failure
args := p.gccCmd()
+
+ // GCC 4.8.0 has a bug: it sometimes does not apply
+ // -Wunused-value to values that are macros defined in system
+ // headers. See issue 5118. Adding -Wsystem-headers avoids
+ // that problem. This will produce additional errors, but it
+ // doesn't matter because we will ignore all errors that are
+ // not marked for the cgo-test file.
+ args = append(args, "-Wsystem-headers")
+
if *debugGcc {
fmt.Fprintf(os.Stderr, "$ %s <<EOF\n", strings.Join(args, " "))
os.Stderr.Write(stdin)

View file

@ -0,0 +1,12 @@
https://code.google.com/p/go-wiki/wiki/OlderVersions
--- a/src/cmd/cc/funct.c 2014-07-02 11:54:42.230663598 +0200
+++ b/src/cmd/cc/funct.c 2014-07-02 11:55:01.653790128 +0200
@@ -269,7 +269,7 @@
goto bad;
f = alloc(sizeof(*f));
- for(o=0; o<sizeof(f->sym); o++)
+ for(o=0; o<nelem(f->sym); o++)
f->sym[o] = S;
t->funct = f;

View file

@ -51,7 +51,7 @@ stdenv.mkDerivation {
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
''; '';
patches = [ ./cacert.patch ]; patches = [ ./cacert.patch ./1_0-opt-error.patch ./1_0-gcc-bug.patch ];
GOOS = "linux"; GOOS = "linux";
GOARCH = if stdenv.system == "i686-linux" then "386" GOARCH = if stdenv.system == "i686-linux" then "386"

View file

@ -16,28 +16,25 @@
with if stdenv.system == "i686-linux" then { with if stdenv.system == "i686-linux" then {
platform = "linux-i386"; platform = "linux-i386";
snapshot = "3bef5684fd0582fbd4ddebd4514182d4f72924f7"; snapshot = "84339ea0f796ae468ef86797ef4587274bec19ea";
snapshot_sha = "1c72d65pcgm3z4sly7al09mjvpp8asxbbv7iyzzv5k8f66ny2agy";
target = "i686-unknown-linux-gnu"; target = "i686-unknown-linux-gnu";
} else if stdenv.system == "x86_64-linux" then { } else if stdenv.system == "x86_64-linux" then {
platform = "linux-x86_64"; platform = "linux-x86_64";
snapshot = "a7b2af1076d48e4a687a71a21478293e834349bd"; snapshot = "bd8a6bc1f28845b7f4b768f6bfa06e7fbdcfcaae";
snapshot_sha = "1c72d65pcgm3z4sly7al09mjvpp8asxbbv7iyzzv5k8f66ny2agy";
target = "x86_64-unknown-linux-gnu"; target = "x86_64-unknown-linux-gnu";
} else if stdenv.system == "x86_64-darwin" then { } else if stdenv.system == "x86_64-darwin" then {
platform = "macos-x86_64"; platform = "macos-x86_64";
snapshot = "22b884a3876cb3e40ad942ad68a496b5f239fca5"; snapshot = "4a8c2e1b7634d73406bac32a1a97893ec3ed818d";
snapshot_sha = "0qabkvyryiwlqhzy1kscff27rx788bv7lh7d8m1hnsv38wqhwqqb";
} else {}; } else {};
let snapshotDate = "2014-03-28"; let snapshotDate = "2014-06-21";
snapshotRev = "b8601a3"; snapshotRev = "db9af1d";
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshot}.tar.bz2"; in snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshot}.tar.bz2"; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "rust-0.10"; name = "rust-0.11.0";
src = fetchurl { src = fetchurl {
url = http://static.rust-lang.org/dist/rust-0.10.tar.gz; url = http://static.rust-lang.org/dist/rust-0.11.0.tar.gz;
sha256 = "c72cfbbf03016804a81d7b68e8258ffaf018f8f5a25550ad64571ce6c2642cf9"; sha256 = "1fhi8iiyyj5j48fpnp93sfv781z1dm0xy94h534vh4mz91jf7cyi";
}; };
# We need rust to build rust. If we don't provide it, configure will try to download it. # We need rust to build rust. If we don't provide it, configure will try to download it.
@ -45,15 +42,16 @@ stdenv.mkDerivation {
name = "rust-stage0"; name = "rust-stage0";
src = fetchurl { src = fetchurl {
url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}"; url = "http://static.rust-lang.org/stage0-snapshots/${snapshotName}";
sha256 = snapshot_sha; sha1 = snapshot;
}; };
dontStrip = true;
installPhase = '' installPhase = ''
mkdir -p "$out" mkdir -p "$out"
cp -r bin "$out/bin" cp -r bin "$out/bin"
'' + (if stdenv.isLinux then '' '' + (if stdenv.isLinux then ''
patchelf --interpreter ${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker} \ patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
--set-rpath ${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/ \ --set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
$out/bin/rustc "$out/bin/rustc"
'' else ""); '' else "");
}; };
@ -63,8 +61,8 @@ stdenv.mkDerivation {
patches = [ ./hardcode_paths.patch ./local_stage0.patch ]; patches = [ ./hardcode_paths.patch ./local_stage0.patch ];
postPatch = '' postPatch = ''
substituteInPlace src/librustc/back/link.rs \ substituteInPlace src/librustc/back/link.rs \
--subst-var-by "gccPath" ${stdenv.gcc}/bin/cc \ --subst-var-by "ccPath" "${stdenv.gcc}/bin/cc" \
--subst-var-by "binutilsPath" ${stdenv.gcc.binutils}/bin/ar --subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
''; '';
buildInputs = [ which file perl curl python27 makeWrapper ]; buildInputs = [ which file perl curl python27 makeWrapper ];

View file

@ -1,41 +1,32 @@
diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs
index f198a41..3a47e51 100644 index 7a3e912..ced75fa 100644
--- a/src/librustc/back/link.rs --- a/src/librustc/back/link.rs
+++ b/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs
@@ -730,7 +730,7 @@ pub fn get_cc_prog(sess: &Session) -> ~str { @@ -766,24 +766,15 @@ pub fn output_lib_filename(id: &CrateId) -> String {
_ => {},
pub fn get_cc_prog(sess: &Session) -> String {
match sess.opts.cg.linker {
- Some(ref linker) => return linker.to_string(),
- None => {}
+ Some(ref linker) => linker.to_string(),
+ None => "@ccPath@".to_string()
} }
- get_system_tool(sess, "cc")
+ ~"@gccPath@"
}
pub fn get_ar_prog(sess: &Session) -> ~str {
@@ -739,26 +739,7 @@ pub fn get_ar_prog(sess: &Session) -> ~str {
None => {}
}
- get_system_tool(sess, "ar")
-}
- -
-fn get_system_tool(sess: &Session, tool: &str) -> ~str { - // In the future, FreeBSD will use clang as default compiler.
- // It would be flexible to use cc (system's default C compiler)
- // instead of hard-coded gcc.
- // For win32, there is no cc command, so we add a condition to make it use gcc.
- match sess.targ_cfg.os { - match sess.targ_cfg.os {
- abi::OsAndroid => match sess.opts.cg.android_cross_path { - abi::OsWin32 => "gcc",
- Some(ref path) => { - _ => "cc",
- let tool_str = match tool { - }.to_string()
- "cc" => "gcc", }
- _ => tool
- }; pub fn get_ar_prog(sess: &Session) -> String {
- format!("{}/bin/arm-linux-androideabi-{}", *path, tool_str) match sess.opts.cg.ar {
- } Some(ref ar) => (*ar).clone(),
- None => { - None => "ar".to_string()
- sess.fatal(format!("need Android NDK path for the '{}' tool \ + None => "@arPath@".to_string()
- (-C android-cross-path)", tool)) }
- }
- },
- _ => tool.to_owned(),
- }
+ ~"@binutilsPath@"
} }
fn remove(sess: &Session, path: &Path) {

View file

@ -11,16 +11,16 @@ let
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); (builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec { sourceInfo = rec {
baseName="angelscript"; baseName="angelscript";
version="2.22.1"; version = "2.29.0";
name="${baseName}-${version}"; name="${baseName}-${version}";
url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip"; url="http://www.angelcode.com/angelscript/sdk/files/angelscript_${version}.zip";
hash="0fmw0cb7ymgyq31r4cfvsn4k86r20hj650fbzs9i7zl0p3lb6hpm"; sha256 = "1g0bi8dx832s3911rr3jymnffaz3q7cnbzl53nmi6hwsr2kpc6mx";
}; };
in in
rec { rec {
src = a.fetchurl { src = a.fetchurl {
url = sourceInfo.url; url = sourceInfo.url;
sha256 = sourceInfo.hash; sha256 = sourceInfo.sha256;
}; };
inherit (sourceInfo) name version; inherit (sourceInfo) name version;
@ -31,7 +31,7 @@ rec {
prepareBuild = a.fullDepEntry '' prepareBuild = a.fullDepEntry ''
cd angelscript/projects/gnuc cd angelscript/projects/gnuc
sed -i makefile -e "s@LOCAL = .*@LOCAL = $out@" sed -i makefile -e "s@LOCAL [?]= .*@LOCAL = $out@"
mkdir -p "$out/lib" "$out/bin" "$out/share" "$out/include" mkdir -p "$out/lib" "$out/bin" "$out/share" "$out/include"
export SHARED=1 export SHARED=1
export VERSION="${version}" export VERSION="${version}"
@ -55,11 +55,9 @@ rec {
platforms = with a.lib.platforms; platforms = with a.lib.platforms;
linux; linux;
license = a.lib.licenses.zlib; license = a.lib.licenses.zlib;
}; homepage="http://www.angelcode.com/angelscript/";
passthru = { downloadPage = "http://www.angelcode.com/angelscript/downloads.html";
updateInfo = { inherit version;
downloadPage = "http://www.angelcode.com/angelscript/downloads.asp";
};
}; };
}) x }) x

View file

@ -0,0 +1,4 @@
url http://www.angelcode.com/angelscript/downloads.html
version_link '[.]zip$'
version '.*_([0-9.]+)[.].*' '\1'
do_overwrite () { do_overwrite_just_version ; }

Some files were not shown because too many files have changed in this diff Show more