diff --git a/.version b/.version
index 381796ec8b7..07167f90842 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-13.10
\ No newline at end of file
+14.02
\ No newline at end of file
diff --git a/doc/meta.xml b/doc/meta.xml
index 09252410d80..00e9b8ac67a 100644
--- a/doc/meta.xml
+++ b/doc/meta.xml
@@ -118,6 +118,56 @@ interpretation:
package).
+
+ platforms
+ The list of Nix platform types on which the
+ package is supported. If this attribute is set, the package will
+ refuse to build, and won’t show up in nix-env
+ -qa output, on any platform not listed
+ here. An example is:
+
+
+meta.platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+
+
+ The set lib.platforms defines various common
+ lists of platforms types, so it’s more typical to write:
+
+
+meta.platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+
+
+
+
+
+
+ hydraPlatforms
+ The list of Nix platform types for which the Hydra
+ instance at hydra.nixos.org should build the
+ package. (Hydra is the Nix-based continuous build system.) It
+ defaults to the value of meta.platforms. Thus,
+ the only reason to set meta.hydraPlatforms is
+ if you want hydra.nixos.org to build the
+ package on a subset of meta.platforms, or not
+ at all, e.g.
+
+
+meta.platforms = stdenv.lib.platforms.linux;
+meta.hydraPlatforms = [];
+
+
+
+
+
+
+ broken
+ If set to true, the package is
+ marked as “broken”, meaning that it won’t show up in
+ nix-env -qa, and cannot be built or installed.
+ Sush packages should be removed from Nixpkgs eventually unless
+ they are fixed.
+
+
diff --git a/lib/attrsets.nix b/lib/attrsets.nix
index 7c93d8698de..da735d71b25 100644
--- a/lib/attrsets.nix
+++ b/lib/attrsets.nix
@@ -1,7 +1,7 @@
# Operations on attribute sets.
with {
- inherit (builtins) head tail isString;
+ inherit (builtins) head tail;
inherit (import ./trivial.nix) or;
inherit (import ./default.nix) fold;
inherit (import ./strings.nix) concatStringsSep;
@@ -20,7 +20,7 @@ rec {
let attr = head attrPath;
in
if attrPath == [] then e
- else if builtins ? hasAttr && hasAttr attr e
+ else if hasAttr attr e
then attrByPath (tail attrPath) default (getAttr attr e)
else default;
@@ -100,7 +100,7 @@ rec {
(AttrSet -> Bool) -> AttrSet -> AttrSet
Example:
- collect builtins.isList { a = { b = ["b"]; }; c = [1]; }
+ collect isList { a = { b = ["b"]; }; c = [1]; }
=> [["b"] [1]]
collect (x: x ? outPath)
@@ -110,7 +110,7 @@ rec {
collect = pred: attrs:
if pred attrs then
[ attrs ]
- else if builtins.isAttrs attrs then
+ else if isAttrs attrs then
concatMap (collect pred) (attrValues attrs)
else
[];
diff --git a/lib/default.nix b/lib/default.nix
index fc92e04503b..4b6027c437b 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -21,8 +21,6 @@ let
in
{ inherit trivial lists strings stringsWithDeps attrsets sources options
modules types meta debug maintainers licenses platforms systems;
- # Pull in some builtins not included elsewhere.
- inherit (builtins) pathExists readFile;
}
# !!! don't include everything at top-level; perhaps only the most
# commonly used functions.
diff --git a/lib/lists.nix b/lib/lists.nix
index d0b09539bf6..d6e8628f03a 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -1,14 +1,16 @@
# General list operations.
-let
- inherit (import ./trivial.nix) deepSeq;
+with import ./trivial.nix;
+
+let
inc = builtins.add 1;
dec = n: builtins.sub n 1;
in rec {
- inherit (builtins) head tail length isList add sub lessThan elemAt;
+
+ inherit (builtins) head tail length isList elemAt concatLists filter elem;
# Create a list consisting of a single element. `singleton x' is
@@ -55,10 +57,6 @@ in rec {
else [ (f (inc n) (elemAt list n)) ] ++ imap' (inc n);
in imap' 0;
-
- # Concatenate a list of lists.
- concatLists = builtins.concatLists or (fold (x: y: x ++ y) []);
-
# Map and concatenate the result.
concatMap = f: list: concatLists (map f list);
@@ -72,24 +70,10 @@ in rec {
then fold (x: y: (flatten x) ++ y) [] x
else [x];
-
- # Filter a list using a predicate; that is, return a list containing
- # every element from `list' for which `pred' returns true.
- filter =
- builtins.filter or
- (pred: list:
- fold (x: y: if pred x then [x] ++ y else y) [] list);
-
# Remove elements equal to 'e' from a list. Useful for buildInputs.
remove = e: filter (x: x != e);
-
- # Return true if `list' has an element `x'.
- elem =
- builtins.elem or
- (x: list: fold (a: bs: x == a || bs) false list);
-
# Find the sole element in the list matching the specified
# predicate, returns `default' if no such element exists, or
@@ -106,7 +90,7 @@ in rec {
findFirst = pred: default: list:
let found = filter pred list;
in if found == [] then default else head found;
-
+
# Return true iff function `pred' returns true for at least element
# of `list'.
@@ -136,16 +120,16 @@ in rec {
# If argument is a list, return it; else, wrap it in a singleton
# list. If you're using this, you should almost certainly
# reconsider if there isn't a more "well-typed" approach.
- toList = x: if builtins.isList x then x else [x];
+ toList = x: if isList x then x else [x];
+
-
# Return a list of integers from `first' up to and including `last'.
range = first: last:
- if builtins.lessThan last first
+ if lessThan last first
then []
- else [first] ++ range (builtins.add first 1) last;
+ else [first] ++ range (add first 1) last;
+
-
# Partition the elements of a list in two lists, `right' and
# `wrong', depending on the evaluation of a predicate.
partition = pred:
@@ -160,7 +144,7 @@ in rec {
let
len1 = length fst;
len2 = length snd;
- len = if builtins.lessThan len1 len2 then len1 else len2;
+ len = if lessThan len1 len2 then len1 else len2;
zipListsWith' = n:
if n != len then
[ (f (elemAt fst n) (elemAt snd n)) ]
@@ -207,7 +191,7 @@ in rec {
[ (elemAt list n) ] ++ take' (inc n);
in take' 0;
-
+
# Remove the first (at most) N elements of a list.
drop = count: list:
let
@@ -219,7 +203,8 @@ in rec {
drop' (dec n) ++ [ (elemAt list n) ];
in drop' (dec len);
-
+
+ # Return the last element of a list.
last = list:
assert list != []; elemAt list (dec (length list));
@@ -237,5 +222,7 @@ in rec {
else [];
in zipTwoLists' 0;
+
deepSeqList = xs: y: if any (x: deepSeq x false) xs then y else y;
+
}
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index 7f84e11e561..0418337b217 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -55,6 +55,7 @@
smironov = "Sergey Mironov ";
thammers = "Tobias Hammerschmidt ";
the-kenny = "Moritz Ulrich ";
+ tomberek = "Thomas Bereknyei ";
urkud = "Yury G. Kudryashov ";
vcunat = "Vladimír Čunát ";
viric = "Lluís Batlle i Rossell ";
@@ -63,4 +64,6 @@
winden = "Antonio Vargas Gonzalez ";
z77z = "Marco Maggesi ";
zef = "Zef Hemel ";
+ zimbatm = "zimbatm ";
+ zoomulator = "Kim Simmons ";
}
diff --git a/lib/modules.nix b/lib/modules.nix
index 071809daa58..fa31ce6399c 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -42,7 +42,7 @@ rec {
closeModules = modules: args:
let
toClosureList = file: parentKey: imap (n: x:
- if isAttrs x || builtins.isFunction x then
+ if isAttrs x || isFunction x then
unifyModuleSyntax file "${parentKey}:anon-${toString n}" (applyIfFunction x args)
else
unifyModuleSyntax (toString x) (toString x) (applyIfFunction (import x) args));
@@ -74,7 +74,7 @@ rec {
config = removeAttrs m ["key" "_file" "require" "imports"];
};
- applyIfFunction = f: arg: if builtins.isFunction f then f arg else f;
+ applyIfFunction = f: arg: if isFunction f then f arg else f;
/* Merge a list of modules. This will recurse over the option
declarations in all modules, combining them into a single set.
@@ -260,7 +260,7 @@ rec {
options' = opt.options or
(throw "Option `${showOption loc'}' has type optionSet but has no option attribute.");
coerce = x:
- if builtins.isFunction x then x
+ if isFunction x then x
else { config, ... }: { options = x; };
options = map coerce (flatten options');
f = tp:
diff --git a/lib/options.nix b/lib/options.nix
index 63798c4faa3..71e02db58f6 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -34,12 +34,12 @@ rec {
mergeDefaultOption = loc: defs:
let list = getValues defs; in
if length list == 1 then head list
- else if all builtins.isFunction list then x: mergeDefaultOption loc (map (f: f x) list)
+ else if all isFunction list then x: mergeDefaultOption loc (map (f: f x) list)
else if all isList list then concatLists list
else if all isAttrs list then fold lib.mergeAttrs {} list
- else if all builtins.isBool list then fold lib.or false list
- else if all builtins.isString list then lib.concatStrings list
- else if all builtins.isInt list && all (x: x == head list) list then head list
+ else if all isBool list then fold lib.or false list
+ else if all isString list then lib.concatStrings list
+ else if all isInt list && all (x: x == head list) list then head list
else throw "Cannot merge definitions of `${showOption loc}' given in ${showFiles (getFiles defs)}.";
/* Obsolete, will remove soon. Specify an option type or apply
@@ -54,7 +54,7 @@ rec {
mergeListOption = mergeTypedOption "list" isList concatLists;
- mergeStringOption = mergeTypedOption "string" builtins.isString lib.concatStrings;
+ mergeStringOption = mergeTypedOption "string" isString lib.concatStrings;
mergeOneOption = loc: defs:
if defs == [] then abort "This case should never happen."
diff --git a/lib/platforms.nix b/lib/platforms.nix
index 8be37d7ed1e..76df389deac 100644
--- a/lib/platforms.nix
+++ b/lib/platforms.nix
@@ -2,9 +2,9 @@ let lists = import ./lists.nix; in
rec {
gnu = linux; /* ++ hurd ++ kfreebsd ++ ... */
- linux = ["i686-linux" "x86_64-linux" "powerpc-linux" "armv5tel-linux" "armv7l-linux" "mips64el-linux"];
+ linux = ["i686-linux" "x86_64-linux" "armv5tel-linux" "armv7l-linux" "mips64el-linux"];
darwin = ["x86_64-darwin"];
- freebsd = ["i686-freebsd" "x86_64-freebsd" "powerpc-freebsd"];
+ freebsd = ["i686-freebsd" "x86_64-freebsd"];
openbsd = ["i686-openbsd" "x86_64-openbsd"];
netbsd = ["i686-netbsd" "x86_64-netbsd"];
cygwin = ["i686-cygwin"];
diff --git a/lib/strings.nix b/lib/strings.nix
index 024a9ac7d7a..cd748f02cc6 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -7,7 +7,8 @@ inherit (builtins) add sub lessThan length;
in
rec {
- inherit (builtins) stringLength substring head tail;
+
+ inherit (builtins) stringLength substring head tail isString;
# Concatenate a list of strings.
diff --git a/lib/trivial.nix b/lib/trivial.nix
index 8af3474f2a6..760a74ce666 100644
--- a/lib/trivial.nix
+++ b/lib/trivial.nix
@@ -16,7 +16,7 @@ rec {
or = x: y: x || y;
and = x: y: x && y;
mergeAttrs = x: y: x // y;
-
+
# Take a function and evaluate it with its own returned value.
fix = f: let result = f result; in result;
@@ -26,7 +26,7 @@ rec {
# `seq x y' evaluates x, then returns y. That is, it forces strict
# evaluation of its first argument.
seq = x: y: if x == null then y else y;
-
+
# Like `seq', but recurses into lists and attribute sets to force evaluation
# of all list elements/attributes.
deepSeq = x: y:
@@ -35,4 +35,10 @@ rec {
else if builtins.isAttrs x
then deepSeqAttrs x y
else seq x y;
+
+ # Pull in some builtins not included elsewhere.
+ inherit (builtins)
+ pathExists readFile isBool isFunction
+ isInt add sub lessThan;
+
}
diff --git a/lib/types.nix b/lib/types.nix
index 09b29a762e1..bdd21f12395 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -48,19 +48,19 @@ rec {
bool = mkOptionType {
name = "boolean";
- check = builtins.isBool;
+ check = isBool;
merge = loc: fold (x: y: x.value || y) false;
};
int = mkOptionType {
name = "integer";
- check = builtins.isInt;
+ check = isInt;
merge = mergeOneOption;
};
str = mkOptionType {
name = "string";
- check = builtins.isString;
+ check = isString;
merge = mergeOneOption;
};
@@ -68,7 +68,7 @@ rec {
# separator between the values).
separatedString = sep: mkOptionType {
name = "string";
- check = builtins.isString;
+ check = isString;
merge = loc: defs: concatStringsSep sep (getValues defs);
};
@@ -170,7 +170,7 @@ rec {
functionTo = elemType: mkOptionType {
name = "function that evaluates to a(n) ${elemType.name}";
- check = builtins.isFunction;
+ check = isFunction;
merge = loc: defs:
fnArgs: elemType.merge loc (map (fn: { inherit (fn) file; value = fn.value fnArgs; }) defs);
getSubOptions = elemType.getSubOptions;
@@ -183,10 +183,10 @@ rec {
in
mkOptionType rec {
name = "submodule";
- check = x: isAttrs x || builtins.isFunction x;
+ check = x: isAttrs x || isFunction x;
merge = loc: defs:
let
- coerce = def: if builtins.isFunction def then def else { config = def; };
+ coerce = def: if isFunction def then def else { config = def; };
modules = opts' ++ map (def: { _file = def.file; imports = [(coerce def.value)]; }) defs;
in (evalModules { inherit modules; args.name = last loc; prefix = loc; }).config;
getSubOptions = prefix: (evalModules
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index db3245fcc07..6d5039e8177 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -1,6 +1,4 @@
-{ pkgs, options
-, revision ? "master"
-}:
+{ pkgs, options, version, revision }:
with pkgs.lib;
@@ -60,6 +58,7 @@ in rec {
buildCommand = ''
ln -s $sources/*.xml . # */
ln -s ${optionsDocBook} options-db.xml
+ echo "${version}" > version
# Check the validity of the manual sources.
xmllint --noout --nonet --xinclude --noxincludenode \
diff --git a/nixos/doc/manual/development.xml b/nixos/doc/manual/development.xml
index 6bbccac6e5c..cbf7ff8902f 100644
--- a/nixos/doc/manual/development.xml
+++ b/nixos/doc/manual/development.xml
@@ -652,6 +652,37 @@ $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/
+
+ systemd.units.unit-name.unit
+
+ This builds the unit with the specified name. Note that
+ since unit names contain dots
+ (e.g. httpd.service), you need to put them
+ between quotes, like this:
+
+
+$ nix-build -A 'config.systemd.units."httpd.service".unit'
+
+
+ You can also test individual units, without rebuilding the whole
+ system, by putting them in
+ /run/systemd/system:
+
+
+$ cp $(nix-build -A 'config.systemd.units."httpd.service".unit')/httpd.service \
+ /run/systemd/system/tmp-httpd.service
+$ systemctl daemon-reload
+$ systemctl start tmp-httpd.service
+
+
+ Note that the unit must not have the same name as any unit in
+ /etc/systemd/system since those take
+ precedence over /run/systemd/system.
+ That’s why the unit is installed as
+ tmp-httpd.service here.
+
+
+
diff --git a/nixos/doc/manual/installation.xml b/nixos/doc/manual/installation.xml
index 88ef589dd06..70001577692 100644
--- a/nixos/doc/manual/installation.xml
+++ b/nixos/doc/manual/installation.xml
@@ -369,9 +369,23 @@ $ nixos-rebuild build-vm
$ ./result/bin/run-*-vm
-The VM does not have use any data from your host system, so your
-existing user accounts and home directories will not be
-available.
+The VM does not have any data from your host system, so your existing
+user accounts and home directories will not be available. You can
+forward ports on the host to the guest. For instance, the following
+will forward host port 2222 to guest port 22 (SSH):
+
+
+$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
+
+
+allowing you to log in via SSH (assuming you have set the appropriate
+passwords or SSH authorized keys):
+
+
+$ ssh -p 2222 localhost
+
+
+
diff --git a/nixos/doc/manual/manual.xml b/nixos/doc/manual/manual.xml
index dfbd865b505..6e13281cbd9 100644
--- a/nixos/doc/manual/manual.xml
+++ b/nixos/doc/manual/manual.xml
@@ -5,6 +5,7 @@
NixOS Manual
+ Version
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index d20fbc1cc66..498c0a37783 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -68,8 +68,8 @@ rec {
# the first interface (i.e. the first network in its
# virtualisation.vlans option).
networking.extraHosts = flip concatMapStrings machines
- (m: let config = (getAttr m nodes).config; in
- optionalString (config.networking.primaryIPAddress != "")
+ (m': let config = (getAttr m' nodes).config; in
+ optionalString (m.first != m' && config.networking.primaryIPAddress != "")
("${config.networking.primaryIPAddress} " +
"${config.networking.hostName}\n"));
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix
index 5e1ce69158f..4b8c7354a7e 100644
--- a/nixos/lib/eval-config.nix
+++ b/nixos/lib/eval-config.nix
@@ -8,6 +8,7 @@
, extraArgs ? {}
, modules
, check ? true
+, prefix ? []
}:
let extraArgs_ = extraArgs; pkgs_ = pkgs; system_ = system; in
@@ -17,6 +18,7 @@ rec {
# Merge the option definitions in all modules, forming the full
# system configuration.
inherit (pkgs.lib.evalModules {
+ inherit prefix;
modules = modules ++ baseModules;
args = extraArgs;
check = check && options.environment.checkConfigurationOptions.value;
@@ -48,7 +50,7 @@ rec {
let
system = if nixpkgsOptions.system != "" then nixpkgsOptions.system else system_;
nixpkgsOptions = (import ./eval-config.nix {
- inherit system extraArgs modules;
+ inherit system extraArgs modules prefix;
# For efficiency, leave out most NixOS modules; they don't
# define nixpkgs.config, so it's pointless to evaluate them.
baseModules = [ ../modules/misc/nixpkgs.nix ];
diff --git a/nixos/maintainers/scripts/ec2/create-ebs-amis.py b/nixos/maintainers/scripts/ec2/create-ebs-amis.py
index 93971ac9504..541eadd7b8c 100755
--- a/nixos/maintainers/scripts/ec2/create-ebs-amis.py
+++ b/nixos/maintainers/scripts/ec2/create-ebs-amis.py
@@ -16,7 +16,7 @@ parser.add_argument('--hvm', dest='hvm', action='store_true', help='Create HVM i
parser.add_argument('--key', dest='key_name', action='store_true', help='Keypair used for HVM instance creation', default="rob")
args = parser.parse_args()
-instance_type = "cc1.4xlarge" if args.hvm else "m1.small"
+instance_type = "m3.xlarge" if args.hvm else "m1.small"
ebs_size = 8 if args.hvm else 20
@@ -67,12 +67,13 @@ m.run_command("mkdir -p /mnt/etc/nixos")
m.run_command("nix-channel --add http://nixos.org/channels/nixos-unstable")
m.run_command("nix-channel --update")
m.run_command("nixos-rebuild switch")
-version = m.run_command("nixos-version", capture_stdout=True).replace('"', '').rstrip()
+version = m.run_command("nixos-version", capture_stdout=True).split(' ')[0]
print >> sys.stderr, "NixOS version is {0}".format(version)
m.upload_file("./amazon-base-config.nix", "/mnt/etc/nixos/configuration.nix")
m.run_command("nixos-install")
if args.hvm:
- m.run_command('cp /mnt/nix/store/*-grub-0.97*/lib/grub/i386-pc/* /mnt/boot/grub')
+ m.run_command('nix-env -iA nixos.pkgs.grub')
+ m.run_command('cp /nix/store/*-grub-0.97*/lib/grub/i386-pc/* /mnt/boot/grub')
m.run_command('sed -i "s|hd0|hd0,0|" /mnt/boot/grub/menu.lst')
m.run_command('echo "(hd1) /dev/xvdg" > device.map')
m.run_command('echo -e "root (hd1,0)\nsetup (hd1)" | grub --device-map=device.map --batch')
@@ -98,7 +99,7 @@ def check():
m.connect()
volume = m._conn.get_all_volumes([], filters={'attachment.instance-id': m.resource_id, 'attachment.device': "/dev/sdg"})[0]
if args.hvm:
- instance = m._conn.run_instances( image_id="ami-6a9e4503"
+ instance = m._conn.run_instances( image_id="ami-5f491f36"
, instance_type=instance_type
, key_name=args.key_name
, placement=m.zone
@@ -185,7 +186,7 @@ f.write(
'''.format(args.region, ami_id, instance_type))
f.close()
-test_depl = deployment.create_deployment(db)
+test_depl = db.create_deployment()
test_depl.auto_response = "y"
test_depl.name = "ebs-creator-test"
test_depl.nix_exprs = [os.path.abspath("./ebs-test.nix")]
diff --git a/nixos/maintainers/scripts/ec2/create-s3-amis.sh b/nixos/maintainers/scripts/ec2/create-s3-amis.sh
index 1aaac283239..140b4fcbddb 100755
--- a/nixos/maintainers/scripts/ec2/create-s3-amis.sh
+++ b/nixos/maintainers/scripts/ec2/create-s3-amis.sh
@@ -1,9 +1,8 @@
#! /bin/sh -e
-nixos=$(nix-instantiate --find-file nixos)
export NIXOS_CONFIG=$(dirname $(readlink -f $0))/amazon-base-config.nix
-version=$(nix-instantiate --eval-only '' -A config.system.nixosVersion | sed s/'"'//g)
+version=$(nix-instantiate --eval-only '' -A config.system.nixosVersion | sed s/'"'//g)
echo "NixOS version is $version"
buildAndUploadFor() {
@@ -11,13 +10,13 @@ buildAndUploadFor() {
arch="$2"
echo "building $system image..."
- nix-build '' \
+ nix-build '' \
-A config.system.build.amazonImage --argstr system "$system" -o ec2-ami
ec2-bundle-image -i ./ec2-ami/nixos.img --user "$AWS_ACCOUNT" --arch "$arch" \
-c "$EC2_CERT" -k "$EC2_PRIVATE_KEY"
- for region in eu-west-1 us-east-1 us-west-1 us-west-2; do
+ for region in eu-west-1; do
echo "uploading $system image for $region..."
name=nixos-$version-$arch-s3
diff --git a/nixos/modules/config/pulseaudio.nix b/nixos/modules/config/pulseaudio.nix
index 7a6cc542273..e7cbe7a28f3 100644
--- a/nixos/modules/config/pulseaudio.nix
+++ b/nixos/modules/config/pulseaudio.nix
@@ -131,7 +131,7 @@ in {
users.extraGroups.pulse.gid = gid;
systemd.services.pulseaudio = {
- description = "PulseAudio system-wide server";
+ description = "PulseAudio System-Wide Server";
wantedBy = [ "sound.target" ];
before = [ "sound.target" ];
path = [ cfg.package ];
diff --git a/nixos/modules/config/shells-environment.nix b/nixos/modules/config/shells-environment.nix
index e3fbdd7aaec..0b4f75a3521 100644
--- a/nixos/modules/config/shells-environment.nix
+++ b/nixos/modules/config/shells-environment.nix
@@ -31,9 +31,9 @@ in
res = (head defs').value;
in
if isList res then concatLists (getValues defs')
- else if builtins.lessThan 1 (length defs') then
+ else if lessThan 1 (length defs') then
throw "The option `${showOption loc}' is defined multiple times, in ${showFiles (getFiles defs)}."
- else if !builtins.isString res then
+ else if !isString res then
throw "The option `${showOption loc}' does not have a string value, in ${showFiles (getFiles defs)}."
else res;
});
diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix
index 31441bad615..8f9b31dccff 100644
--- a/nixos/modules/config/sysctl.nix
+++ b/nixos/modules/config/sysctl.nix
@@ -6,7 +6,7 @@ let
sysctlOption = mkOptionType {
name = "sysctl option value";
- check = x: builtins.isBool x || builtins.isString x || builtins.isInt x;
+ check = x: isBool x || isString x || isInt x;
merge = args: defs: (last defs).value; # FIXME: hacky way to allow overriding in configuration.nix.
};
@@ -46,7 +46,10 @@ in
before = [ "sysinit.target" "shutdown.target" ];
wantedBy = [ "sysinit.target" "multi-user.target" ];
restartTriggers = [ config.environment.etc."sysctl.d/nixos.conf".source ];
- unitConfig.DefaultDependencies = false; # needed to prevent a cycle
+ unitConfig = {
+ DefaultDependencies = false; # needed to prevent a cycle
+ ConditionPathIsReadWrite = "/proc/sys/"; # prevent systemd-sysctl in containers
+ };
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix
index fb8b0229c1d..714de646eb7 100644
--- a/nixos/modules/config/users-groups.nix
+++ b/nixos/modules/config/users-groups.nix
@@ -188,6 +188,20 @@ in
options = [ groupOpts ];
};
+ security.initialRootPassword = mkOption {
+ type = types.str;
+ default = "";
+ example = "!";
+ description = ''
+ The (hashed) password for the root account set on initial
+ installation. The empty string denotes that root can login
+ locally without a password (but not via remote services such
+ as SSH, or indirectly via su or
+ sudo). The string !
+ prevents root from logging in using a password.
+ '';
+ };
+
};
@@ -240,7 +254,23 @@ in
# Can't use useradd, since it complains that it doesn't know us
# (bootstrap problem!).
echo "root:x:0:0:System administrator:$rootHome:${config.users.defaultUserShell}" >> /etc/passwd
- echo "root::::::::" >> /etc/shadow
+ echo "root:${config.security.initialRootPassword}:::::::" >> /etc/shadow
+ fi
+ '';
+
+ # Print a reminder for users to set a root password.
+ environment.interactiveShellInit =
+ ''
+ if [ "$UID" = 0 ]; then
+ read _l < /etc/shadow
+ if [ "''${_l:0:6}" = root:: ]; then
+ cat >&2 < $out/loader/entries/nixos-livecd.conf
+ echo "linux /boot/bzImage" >> $out/loader/entries/nixos-livecd.conf
+ echo "initrd /boot/initrd" >> $out/loader/entries/nixos-livecd.conf
+ echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}" >> $out/loader/entries/nixos-livecd.conf
+ echo "default nixos-livecd" > $out/loader/loader.conf
+ echo "timeout 5" >> $out/loader/loader.conf
+ '';
+
efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools ]; }
''
#Let's hope 10M is enough
dd bs=2048 count=5120 if=/dev/zero of="$out"
${pkgs.dosfstools}/sbin/mkfs.vfat "$out"
- mmd -i "$out" efi
- mmd -i "$out" efi/boot
- mmd -i "$out" efi/nixos
- mmd -i "$out" loader
- mmd -i "$out" loader/entries
+ mcopy -svi "$out" ${efiDir}/* ::
+ mmd -i "$out" boot
mcopy -v -i "$out" \
- ${pkgs.gummiboot}/lib/gummiboot/gummiboot${targetArch}.efi \
- ::efi/boot/boot${targetArch}.efi
+ ${config.boot.kernelPackages.kernel}/bzImage ::boot/bzImage
mcopy -v -i "$out" \
- ${config.boot.kernelPackages.kernel}/bzImage ::bzImage
- mcopy -v -i "$out" \
- ${config.system.build.initialRamdisk}/initrd ::efi/nixos/initrd
- echo "title NixOS LiveCD" > boot-params
- echo "linux /bzImage" >> boot-params
- echo "initrd /efi/nixos/initrd" >> boot-params
- echo "options init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}" >> boot-params
- mcopy -v -i "$out" boot-params ::loader/entries/nixos-livecd.conf
- echo "default nixos-livecd" > boot-params
- echo "timeout 5" >> boot-params
- mcopy -v -i "$out" boot-params ::loader/loader.conf
+ ${config.system.build.initialRamdisk}/initrd ::boot/initrd
'';
targetArch = if pkgs.stdenv.isi686 then
@@ -263,6 +261,12 @@ in
{ source = efiImg;
target = "/boot/efi.img";
}
+ { source = "${efiDir}/efi";
+ target = "/efi";
+ }
+ { source = "${efiDir}/loader";
+ target = "/loader";
+ }
] ++ mapAttrsToList (n: v: { source = v; target = "/boot/${n}"; }) config.boot.loader.grub.extraFiles;
# The Grub menu.
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 0f9142990ec..6b42058a892 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -386,9 +386,6 @@ if ($showHardwareConfig) {
boot.loader.grub.enable = false;
boot.loader.gummiboot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
- # !!! Remove this when nixos is on 3.10 or greater by default
- # EFI booting requires kernel >= 3.10
- boot.kernelPackages = pkgs.linuxPackages_3_10;
EOF
} else {
$bootLoaderConfig = < /sys/kernel/debug/vgaswitcheroo/switch; exit 0'";
+ ExecStop = "${pkgs.bash}/bin/sh -c 'echo ON >/sys/kernel/debug/vgaswitcheroo/switch; exit 0'";
+ };
+ };
+ };
+
+}
diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix
index b0714a3ce80..a70a66c2ba0 100644
--- a/nixos/modules/services/hardware/bluetooth.nix
+++ b/nixos/modules/services/hardware/bluetooth.nix
@@ -28,7 +28,7 @@ with pkgs.lib;
services.dbus.packages = [ pkgs.bluez ];
systemd.services."dbus-org.bluez" = {
- description = "Bluetooth service";
+ description = "Bluetooth Service";
serviceConfig = {
Type = "dbus";
BusName = "org.bluez";
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index 516569c0280..52b3ad43579 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -209,7 +209,7 @@ in
###### implementation
- config = {
+ config = mkIf (!config.boot.isContainer) {
services.udev.extraRules = nixosRules;
@@ -231,9 +231,16 @@ in
boot.extraModprobeConfig = "options firmware_class path=${config.hardware.firmware}";
- system.activationScripts.clearHotplug =
+ system.activationScripts.udevd =
''
echo "" > /proc/sys/kernel/hotplug
+
+ # Regenerate the hardware database /var/lib/udev/hwdb.bin
+ # whenever systemd changes.
+ if [ ! -e /var/lib/udev/prev-systemd -o "$(readlink /var/lib/udev/prev-systemd)" != ${config.systemd.package} ]; then
+ echo "regenerating udev hardware database..."
+ ${config.systemd.package}/bin/udevadm hwdb --update && ln -sfn ${config.systemd.package} /var/lib/udev/prev-systemd
+ fi
'';
};
diff --git a/nixos/modules/services/logging/klogd.nix b/nixos/modules/services/logging/klogd.nix
index d7d0bbf89a5..36b530d0077 100644
--- a/nixos/modules/services/logging/klogd.nix
+++ b/nixos/modules/services/logging/klogd.nix
@@ -32,6 +32,8 @@ with pkgs.lib;
path = [ pkgs.sysklogd ];
+ unitConfig.ConditionVirtualization = "!systemd-nspawn";
+
exec =
"klogd -c 1 -2 -n " +
"-k $(dirname $(readlink -f /run/booted-system/kernel))/System.map";
diff --git a/nixos/modules/services/logging/logstash.nix b/nixos/modules/services/logging/logstash.nix
index 79bdf4f7bbc..21128779e8f 100644
--- a/nixos/modules/services/logging/logstash.nix
+++ b/nixos/modules/services/logging/logstash.nix
@@ -3,72 +3,8 @@
with pkgs.lib;
let
-
cfg = config.services.logstash;
- listToConfig = list: "[ " + (concatStringsSep ", " (map exprToConfig list)) + " ]";
-
- hashToConfig = attrs:
- let
- attrNameToConfigList = name:
- [ (exprToConfig name) (exprToConfig (getAttr name attrs)) ];
- in
- "[ " +
- (concatStringsSep ", " (map attrNameToConfigList (attrNames attrs))) +
- " ]";
-
- valueToConfig = nvpair: let name = nvpair.name; value = nvpair.value; in
- if (isAttrs value) && ((!(value ? __type)) || value.__type == "repeated")
- then ''
- ${name} {
- ${exprToConfig value}
- }
- ''
- else "${name} => ${exprToConfig value}";
-
- repeatedAttrsToConfig = values:
- concatStringsSep "\n" (map valueToConfig values);
-
- attrsToConfig = attrs:
- let
- attrToConfig = name: valueToConfig {
- inherit name;
- value = (getAttr name attrs);
- };
- in
- concatStringsSep "\n" (map attrToConfig (attrNames attrs));
-
- exprToConfig = expr:
- let
- isCustomType = expr: (isAttrs expr) && (expr ? __type);
-
- isFloat = expr: (isCustomType expr) && (expr.__type == "float");
-
- isHash = expr: (isCustomType expr) && (expr.__type == "hash");
-
- isRepeatedAttrs = expr: (isCustomType expr) && (expr.__type == "repeated");
- in
- if builtins.isBool expr then (if expr then "true" else "false") else
- if builtins.isString expr then ''"${expr}"'' else
- if builtins.isInt expr then toString expr else
- if isFloat expr then expr.value else
- if isList expr then listToConfig expr else
- if isHash expr then hashToConfig expr.value else
- if isRepeatedAttrs expr then repeatedAttrsToConfig expr.values
- else attrsToConfig expr;
-
- mergeConfigs = configs:
- let
- op = attrs: newAttrs:
- let
- isRepeated = newAttrs ? __type && newAttrs.__type == "repeated";
- in {
- values = attrs.values ++ (if isRepeated then newAttrs.values else
- map (name: { inherit name; value = getAttr name newAttrs; })
- (attrNames newAttrs));
- };
- in (foldl op { values = []; } configs) // { __type = "repeated"; };
-
in
{
@@ -78,48 +14,45 @@ in
services.logstash = {
enable = mkOption {
default = false;
- description = ''
- Enable logstash.
- '';
+ description = "Enable logstash";
};
inputConfig = mkOption {
- default = {};
- description = ''
- An attribute set (or an expression generated by mkNameValuePairs)
- representing a logstash configuration's input section.
- Logstash configs are name-value pairs, where values can be bools,
- strings, numbers, arrays, hashes, or other name-value pairs,
- and names are strings that can be repeated. Name-value pairs with no
- repeats are represented by attr sets. Bools, strings, ints, and
- arrays are mapped directly. Name-value pairs with repeats can be
- generated by the config.lib.logstash.mkNameValuePairs function, which
- takes a list of attrsets and combines them while preserving attribute
- name duplicates if they occur. Similarly, there are the mkFloat and
- mkHash functions, which take a string representation of a float and an
- attrset, respectively.
+ default = ''stdin { type => "example" }'';
+ description = "Logstash input configuration";
+ example = ''
+ # Read from journal
+ pipe {
+ command => "${pkgs.systemd}/bin/journalctl -f -o json"
+ type => "syslog" codec => json {}
+ }
'';
- apply = mergeConfigs;
};
filterConfig = mkOption {
- default = {};
- description = ''
- An attribute set (or an expression generated by mkNameValuePairs)
- representing a logstash configuration's filter section.
- See inputConfig description for details.
+ default = ''noop {}'';
+ description = "logstash filter configuration";
+ example = ''
+ if [type] == "syslog" {
+ # Keep only relevant systemd fields
+ # http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
+ prune {
+ whitelist_names => [
+ "type", "@timestamp", "@version",
+ "MESSAGE", "PRIORITY", "SYSLOG_FACILITY",
+ ]
+ }
+ }
'';
- apply = mergeConfigs;
};
outputConfig = mkOption {
- default = {};
- description = ''
- An attribute set (or an expression generated by mkNameValuePairs)
- representing a logstash configuration's output section.
- See inputConfig description for details.
+ default = ''stdout { debug => true debug_format => "json"}'';
+ description = "Logstash output configuration";
+ example = ''
+ redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
+ elasticsearch { embedded => true }
'';
- apply = mergeConfigs;
};
};
};
@@ -127,35 +60,26 @@ in
###### implementation
- config = mkMerge [ {
- lib.logstash = {
- mkFloat = stringRep: { __type = "float"; value = stringRep; };
-
- mkHash = attrs: { __type = "hash"; value = attrs; };
-
- mkNameValuePairs = mergeConfigs;
- };
- } ( mkIf cfg.enable {
+ config = mkIf cfg.enable {
systemd.services.logstash = with pkgs; {
description = "Logstash daemon";
-
wantedBy = [ "multi-user.target" ];
- path = [ jre ];
+ serviceConfig = {
+ ExecStart = "${jre}/bin/java -jar ${logstash} agent -f ${writeText "logstash.conf" ''
+ input {
+ ${cfg.inputConfig}
+ }
- script = "cd /tmp && exec java -jar ${logstash} agent -f ${writeText "logstash.conf" ''
- input {
- ${exprToConfig cfg.inputConfig}
- }
+ filter {
+ ${cfg.filterConfig}
+ }
- filter {
- ${exprToConfig cfg.filterConfig}
- }
-
- output {
- ${exprToConfig cfg.outputConfig}
- }
- ''} &> /var/log/logstash.log";
+ output {
+ ${cfg.outputConfig}
+ }
+ ''}";
+ };
};
- })];
+ };
}
diff --git a/nixos/modules/services/misc/disnix.nix b/nixos/modules/services/misc/disnix.nix
index 6419e6f8fc7..82526b154e7 100644
--- a/nixos/modules/services/misc/disnix.nix
+++ b/nixos/modules/services/misc/disnix.nix
@@ -15,6 +15,7 @@ let
enablePostgreSQLDatabase = config.services.postgresql.enable;
enableSubversionRepository = config.services.svnserve.enable;
enableTomcatWebApplication = config.services.tomcat.enable;
+ enableMongoDatabase = config.services.mongodb.enable;
});
in
@@ -110,7 +111,7 @@ in
// optionalAttrs (config.services.tomcat.enable) { tomcatPort = 8080; }
// optionalAttrs (config.services.svnserve.enable) { svnBaseDir = config.services.svnserve.svnBaseDir; }
// optionalAttrs (cfg.publishInfrastructure.enableAuthentication) (
- optionalAttrs (config.services.mysql.enable) { mysqlUsername = "root"; mysqlPassword = builtins.readFile config.services.mysql.rootPassword; })
+ optionalAttrs (config.services.mysql.enable) { mysqlUsername = "root"; mysqlPassword = readFile config.services.mysql.rootPassword; })
)
;
@@ -125,17 +126,18 @@ in
++ optional config.services.httpd.enable "httpd.service"
++ optional config.services.mysql.enable "mysql.service"
++ optional config.services.tomcat.enable "tomcat.service"
- ++ optional config.services.svnserve.enable "svnserve.service";
+ ++ optional config.services.svnserve.enable "svnserve.service"
+ ++ optional config.services.mongodb.enable "mongodb.service";
restartIfChanged = false;
- path = [ pkgs.nix pkgs.disnix ];
-
- script =
- ''
- export HOME=/root
- disnix-service --dysnomia-modules-dir=${dysnomia}/libexec/dysnomia
- '';
+ path = [ pkgs.nix pkgs.disnix pkgs.dysnomia ];
+
+ environment = {
+ HOME = "/root";
+ };
+
+ exec = "disnix-service";
};
} // optionalAttrs cfg.publishAvahi {
disnixAvahi =
@@ -150,7 +152,7 @@ in
${concatMapStrings (infrastructureAttrName:
let infrastructureAttrValue = getAttr infrastructureAttrName (cfg.infrastructure);
in
- if builtins.isInt infrastructureAttrValue then
+ if isInt infrastructureAttrValue then
''${infrastructureAttrName}=${toString infrastructureAttrValue} \
''
else
diff --git a/nixos/modules/services/misc/gurobi.nix b/nixos/modules/services/misc/gurobi.nix
deleted file mode 100644
index 9cd76a1e78f..00000000000
--- a/nixos/modules/services/misc/gurobi.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ config, pkgs, ... }:
-
-with pkgs.lib;
-
-let
- cfg = config.services.gurobi.tokenServer;
-in {
- options = {
- services.gurobi.tokenServer = {
- enable = mkOption {
- default = false;
-
- description = "Whether to enable the Gurobi token server";
-
- type = types.bool;
- };
-
- license = mkOption {
- description = "Path to the Gurobi license file";
-
- type = types.path;
- };
- };
- };
-
- config = mkIf cfg.enable {
- systemd.services.gurobi-token-server = {
- description = "Gurobi token server";
-
- wantedBy = [ "multi-user.target" ];
-
- environment.GRB_LICENSE_FILE = cfg.license;
-
- serviceConfig = {
- ExecStart = "${pkgs.gurobi}/bin/grb_ts";
-
- Type = "forking";
- };
- };
- };
-}
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index 1707828d0db..cca42aa1100 100644
--- a/nixos/modules/services/misc/nix-daemon.nix
+++ b/nixos/modules/services/misc/nix-daemon.nix
@@ -279,6 +279,7 @@ in
{ description = "Nix Daemon Socket";
wantedBy = [ "sockets.target" ];
before = [ "multi-user.target" ];
+ unitConfig.ConditionPathIsReadWrite = "/nix/var/nix/daemon-socket/";
socketConfig.ListenStream = "/nix/var/nix/daemon-socket/socket";
};
@@ -290,6 +291,8 @@ in
environment = cfg.envVars // { CURL_CA_BUNDLE = "/etc/ssl/certs/ca-bundle.crt"; };
+ unitConfig.ConditionPathIsReadWrite = "/nix/var/nix/daemon-socket/";
+
serviceConfig =
{ ExecStart = "@${nix}/bin/nix-daemon nix-daemon --daemon";
KillMode = "process";
@@ -331,10 +334,8 @@ in
''
# Set up secure multi-user builds: non-root users build through the
# Nix daemon.
- if test "$USER" != root; then
+ if [ "$USER" != root -o ! -w /nix/var/nix/db ]; then
export NIX_REMOTE=daemon
- else
- export NIX_REMOTE=
fi
'';
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index 885b8fa2d0c..1a8b85db329 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -23,6 +23,7 @@ let
manual = import ../../../doc/manual {
inherit pkgs;
+ version = config.system.nixosVersion;
revision = config.system.nixosRevision;
options = eval.options;
};
diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix
index 114bad5c947..58ec8a49694 100644
--- a/nixos/modules/services/monitoring/apcupsd.nix
+++ b/nixos/modules/services/monitoring/apcupsd.nix
@@ -148,7 +148,7 @@ in
# wall: cannot get tty name: Inappropriate ioctl for device
# The message still gets through.
systemd.services.apcupsd = {
- description = "APC UPS daemon";
+ description = "APC UPS Daemon";
wantedBy = [ "multi-user.target" ];
preStart = "mkdir -p /run/apcupsd/";
serviceConfig = {
@@ -172,7 +172,7 @@ in
before = [ "final.target" ];
wantedBy = [ "shutdown.target" ];
unitConfig = {
- Description = "APC UPS killpower";
+ Description = "APC UPS Kill Power";
ConditionPathExists = "/run/apcupsd/powerfail";
DefaultDependencies = "no";
};
diff --git a/nixos/modules/services/monitoring/dd-agent.nix b/nixos/modules/services/monitoring/dd-agent.nix
index f99114ac9ad..37ce1c099df 100644
--- a/nixos/modules/services/monitoring/dd-agent.nix
+++ b/nixos/modules/services/monitoring/dd-agent.nix
@@ -62,6 +62,8 @@ in {
ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
User = "dd-agent";
Group = "dd-agent";
+ Restart = "always";
+ RestartSec = 2;
};
restartTriggers = [ pkgs.dd-agent datadog_conf ];
};
@@ -76,6 +78,8 @@ in {
Group = "dd-agent";
Type = "forking";
PIDFile = "/tmp/dogstatsd.pid";
+ Restart = "always";
+ RestartSec = 2;
};
restartTriggers = [ pkgs.dd-agent datadog_conf ];
};
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix
index 08e6ef662cc..be57b8c5c03 100644
--- a/nixos/modules/services/monitoring/graphite.nix
+++ b/nixos/modules/services/monitoring/graphite.nix
@@ -15,6 +15,7 @@ let
PYTHONPATH = "${pkgs.python27Packages.carbon}/lib/python2.7/site-packages";
GRAPHITE_ROOT = dataDir;
GRAPHITE_CONF_DIR = "/etc/graphite/";
+ GRAPHITE_STORAGE_DIR = dataDir;
};
in {
@@ -171,7 +172,7 @@ in {
];
systemd.services.carbonCache = mkIf cfg.carbon.enableCache {
- description = "Graphite data storage backend";
+ description = "Graphite Data Storage Backend";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = carbonEnv;
@@ -189,7 +190,7 @@ in {
};
systemd.services.carbonAggregator = mkIf cfg.carbon.enableAggregator {
- description = "Carbon data aggregator";
+ description = "Carbon Data Aggregator";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = carbonEnv;
@@ -200,7 +201,7 @@ in {
};
systemd.services.carbonRelay = mkIf cfg.carbon.enableRelay {
- description = "Carbon data relay";
+ description = "Carbon Data Relay";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = carbonEnv;
@@ -211,7 +212,7 @@ in {
};
systemd.services.graphiteWeb = mkIf cfg.web.enable {
- description = "Graphite web interface";
+ description = "Graphite Web Interface";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
environment = {
diff --git a/nixos/modules/services/monitoring/munin.nix b/nixos/modules/services/monitoring/munin.nix
index 42d5f61af30..153f4942902 100644
--- a/nixos/modules/services/monitoring/munin.nix
+++ b/nixos/modules/services/monitoring/munin.nix
@@ -182,7 +182,7 @@ in
}) (mkIf nodeCfg.enable {
systemd.services.munin-node = {
- description = "Munin node, the agent process";
+ description = "Munin Node";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.munin ];
diff --git a/nixos/modules/services/network-filesystems/samba.nix b/nixos/modules/services/network-filesystems/samba.nix
index e18d9d7b67b..4f6fce6cd52 100644
--- a/nixos/modules/services/network-filesystems/samba.nix
+++ b/nixos/modules/services/network-filesystems/samba.nix
@@ -57,7 +57,7 @@ let
nssModulesPath = config.system.nssModules.path;
daemonService = appName: args:
- { description = "Samba Service daemon ${appName}";
+ { description = "Samba Service Daemon ${appName}";
wantedBy = [ "samba.target" ];
partOf = [ "samba.target" ];
@@ -211,7 +211,7 @@ in
systemd = {
targets.samba = {
- description = "Samba server";
+ description = "Samba Server";
requires = [ "samba-setup.service" ];
after = [ "samba-setup.service" "network.target" ];
wantedBy = [ "multi-user.target" ];
@@ -222,7 +222,7 @@ in
"samba-smbd" = daemonService "smbd" "-F";
"samba-winbindd" = daemonService "winbindd" "-F";
"samba-setup" = {
- description = "Samba setup task";
+ description = "Samba Setup Task";
script = setupScript;
unitConfig.RequiresMountsFor = "/home/smbd /var/samba /var/log/samba";
};
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index 07b5606eaca..ea263b3c89d 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -114,6 +114,8 @@ in
path = [ dhcpcd pkgs.nettools pkgs.openresolv ];
+ unitConfig.ConditionCapability = "CAP_NET_ADMIN";
+
serviceConfig =
{ Type = "forking";
PIDFile = "/run/dhcpcd.pid";
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index ad6f9858aaf..62bf38e4e70 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -21,7 +21,7 @@ let
level=WARN
'';
- polkitConf = ''
+ /*
[network-manager]
Identity=unix-group:networkmanager
Action=org.freedesktop.NetworkManager.*
@@ -35,6 +35,17 @@ let
ResultAny=yes
ResultInactive=no
ResultActive=yes
+ */
+ polkitConf = ''
+ polkit.addRule(function(action, subject) {
+ if (
+ subject.isInGroup("networkmanager")
+ && subject.active
+ && (action.id.indexOf("org.freedesktop.NetworkManager.") == 0
+ || action.id.indexOf("org.freedesktop.ModemManager.") == 0
+ ))
+ { return polkit.Result.YES; }
+ });
'';
ipUpScript = writeScript "01nixos-ip-up" ''
@@ -44,15 +55,19 @@ let
fi
'';
+ ns = xs: writeText "nameservers" (
+ concatStrings (map (s: "nameserver ${s}\n") xs)
+ );
+
overrideNameserversScript = writeScript "02overridedns" ''
#!/bin/sh
- ${optionalString cfg.overrideNameservers "${gnused}/bin/sed -i '/nameserver /d' /etc/resolv.conf"}
- ${concatStrings (map (s: ''
- ${optionalString cfg.appendNameservers
- "${gnused}/bin/sed -i '/nameserver ${s}/d' /etc/resolv.conf"
- }
- echo 'nameserver ${s}' >> /etc/resolv.conf
- '') config.networking.nameservers)}
+ tmp=`${coreutils}/bin/mktemp`
+ ${gnused}/bin/sed '/nameserver /d' /etc/resolv.conf > $tmp
+ ${gnugrep}/bin/grep 'nameserver ' /etc/resolv.conf | \
+ ${gnugrep}/bin/grep -vf ${ns (cfg.appendNameservers ++ cfg.insertNameservers)} > $tmp.ns
+ ${optionalString (cfg.appendNameservers != []) "${coreutils}/bin/cat $tmp $tmp.ns ${ns cfg.appendNameservers} > /etc/resolv.conf"}
+ ${optionalString (cfg.insertNameservers != []) "${coreutils}/bin/cat $tmp ${ns cfg.insertNameservers} $tmp.ns > /etc/resolv.conf"}
+ ${coreutils}/bin/rm -f $tmp $tmp.ns
'';
in {
@@ -84,23 +99,21 @@ in {
apply = list: [ networkmanager modemmanager wpa_supplicant ] ++ list;
};
- overrideNameservers = mkOption {
- default = false;
+ appendNameservers = mkOption {
+ type = types.listOf types.string;
+ default = [];
description = ''
- If enabled, any nameservers received by DHCP or configured in
- NetworkManager will be replaced by the nameservers configured
- in the networking.nameservers option. This
- option overrides the appendNameservers option
- if both are enabled.
+ A list of name servers that should be appended
+ to the ones configured in NetworkManager or received by DHCP.
'';
};
- appendNameservers = mkOption {
- default = false;
+ insertNameservers = mkOption {
+ type = types.listOf types.string;
+ default = [];
description = ''
- If enabled, the name servers configured in the
- networking.nameservers option will be appended
- to the ones configured in NetworkManager or received by DHCP.
+ A list of name servers that should be inserted before
+ the ones configured in NetworkManager or received by DHCP.
'';
};
@@ -133,7 +146,7 @@ in {
{ source = "${networkmanager_openconnect}/etc/NetworkManager/VPN/nm-openconnect-service.name";
target = "NetworkManager/VPN/nm-openconnect-service.name";
}
- ] ++ pkgs.lib.optional (cfg.overrideNameservers || cfg.appendNameservers)
+ ] ++ pkgs.lib.optional (cfg.appendNameservers == [] || cfg.insertNameservers == [])
{ source = overrideNameserversScript;
target = "NetworkManager/dispatcher.d/02overridedns";
};
@@ -179,7 +192,7 @@ in {
systemctl restart NetworkManager
'';
- security.polkit.permissions = polkitConf;
+ security.polkit.extraConfig = polkitConf;
# openvpn plugin has only dbus interface
services.dbus.packages = cfg.packages ++ [
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index 7a2335847e3..85b6ab1efec 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -19,7 +19,7 @@ let
knownHostsFile = pkgs.writeText "ssh_known_hosts" (
flip concatMapStrings knownHosts (h:
- "${concatStringsSep "," h.hostNames} ${builtins.readFile h.publicKeyFile}"
+ "${concatStringsSep "," h.hostNames} ${readFile h.publicKeyFile}"
)
);
@@ -59,7 +59,7 @@ let
mode = "0444";
source = pkgs.writeText "${u.name}-authorized_keys" ''
${concatStringsSep "\n" u.openssh.authorizedKeys.keys}
- ${concatMapStrings (f: builtins.readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
+ ${concatMapStrings (f: readFile f + "\n") u.openssh.authorizedKeys.keyFiles}
'';
};
usersWithKeys = attrValues (flip filterAttrs config.users.extraUsers (n: u:
diff --git a/nixos/modules/services/networking/vsftpd.nix b/nixos/modules/services/networking/vsftpd.nix
index 0a6355e6ff1..1c77cc6df4e 100644
--- a/nixos/modules/services/networking/vsftpd.nix
+++ b/nixos/modules/services/networking/vsftpd.nix
@@ -24,6 +24,7 @@ let
cfgText = "${vsftpdName}=${if getAttr nixosName cfg then "YES" else "NO"}";
nixosOption = {
+ type = types.bool;
name = nixosName;
value = mkOption {
inherit description default;
@@ -33,27 +34,26 @@ let
};
optionDescription = [
-
(yesNoOption "anonymousUser" "anonymous_enable" false ''
- Whether to enable the anonymous FTP user.
+ Whether to enable the anonymous FTP user.
'')
(yesNoOption "localUsers" "local_enable" false ''
- Whether to enable FTP for local users.
+ Whether to enable FTP for local users.
'')
(yesNoOption "writeEnable" "write_enable" false ''
- Whether any write activity is permitted to users.
+ Whether any write activity is permitted to users.
'')
(yesNoOption "anonymousUploadEnable" "anon_upload_enable" false ''
- Whether any uploads are permitted to anonymous users.
+ Whether any uploads are permitted to anonymous users.
'')
(yesNoOption "anonymousMkdirEnable" "anon_mkdir_write_enable" false ''
- Whether any uploads are permitted to anonymous users.
+ Whether any uploads are permitted to anonymous users.
'')
(yesNoOption "chrootlocalUser" "chroot_local_user" false ''
- Whether local users are confined to their home directory.
+ Whether local users are confined to their home directory.
'')
(yesNoOption "userlistEnable" "userlist_enable" false ''
- Whether users are included.
+ Whether users are included.
'')
(yesNoOption "userlistDeny" "userlist_deny" false ''
Specifies whether is a list of user
@@ -61,35 +61,37 @@ let
The default false means whitelist/allow.
'')
(yesNoOption "forceLocalLoginsSSL" "force_local_logins_ssl" false ''
- Only applies if is true. Non anonymous (local) users
- must use a secure SSL connection to send a password.
+ Only applies if is true. Non anonymous (local) users
+ must use a secure SSL connection to send a password.
'')
(yesNoOption "forceLocalDataSSL" "force_local_data_ssl" false ''
- Only applies if is true. Non anonymous (local) users
- must use a secure SSL connection for sending/receiving data on data connection.
+ Only applies if is true. Non anonymous (local) users
+ must use a secure SSL connection for sending/receiving data on data connection.
'')
(yesNoOption "ssl_tlsv1" "ssl_tlsv1" true '' '')
(yesNoOption "ssl_sslv2" "ssl_sslv2" false '' '')
(yesNoOption "ssl_sslv3" "ssl_sslv3" false '' '')
+ ];
- {
- cfgText = if cfg.rsaCertFile == null then ""
- else ''
+ configFile = pkgs.writeText "vsftpd.conf"
+ ''
+ ${concatMapStrings (x: "${x.cfgText}\n") optionDescription}
+ ${optionalString (cfg.rsaCertFile != null) ''
ssl_enable=YES
rsa_cert_file=${cfg.rsaCertFile}
- '';
-
- nixosOption = {
- name = "rsaCertFile";
- value = mkOption {
- default = null;
- description = ''
- rsa certificate file.
- '';
- };
- };
- }
- ];
+ ''}
+ ${optionalString (cfg.userlistFile != null) ''
+ userlist_file=${cfg.userlistFile}
+ ''}
+ background=YES
+ listen=YES
+ nopriv_user=vsftpd
+ secure_chroot_dir=/var/empty
+ syslog_enable=YES
+ ${optionalString (pkgs.stdenv.system == "x86_64-linux") ''
+ seccomp_sandbox=NO
+ ''}
+ '';
in
@@ -108,10 +110,7 @@ in
userlist = mkOption {
default = [];
-
- description = ''
- See .
- '';
+ description = "See .";
};
userlistFile = mkOption {
@@ -127,13 +126,20 @@ in
};
anonymousUserHome = mkOption {
+ type = types.path;
default = "/home/ftp/";
- description = ''
- Directory to consider the HOME of the anonymous user.
- '';
+ description = ''
+ Directory to consider the HOME of the anonymous user.
+ '';
};
- } // (listToAttrs (catAttrs "nixosOption" optionDescription)) ;
+ rsaCertFile = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = "RSA certificate file.";
+ };
+
+ } // (listToAttrs (catAttrs "nixosOption" optionDescription));
};
@@ -142,14 +148,12 @@ in
config = mkIf cfg.enable {
- assertions = [
- {
- assertion =
+ assertions = singleton
+ { assertion =
(cfg.forceLocalLoginsSSL -> cfg.rsaCertFile != null)
&& (cfg.forceLocalDataSSL -> cfg.rsaCertFile != null);
message = "vsftpd: If forceLocalLoginsSSL or forceLocalDataSSL is true then a rsaCertFile must be provided!";
- }
- ];
+ };
users.extraUsers =
[ { name = "vsftpd";
@@ -157,7 +161,7 @@ in
description = "VSFTPD user";
home = "/homeless-shelter";
}
- ] ++ pkgs.lib.optional cfg.anonymousUser
+ ] ++ optional cfg.anonymousUser
{ name = "ftp";
uid = config.ids.uids.ftp;
group = "ftp";
@@ -165,41 +169,27 @@ in
home = cfg.anonymousUserHome;
};
- users.extraGroups = singleton
- { name = "ftp";
- gid = config.ids.gids.ftp;
- };
+ users.extraGroups.ftp.gid = config.ids.gids.ftp;
# If you really have to access root via FTP use mkOverride or userlistDeny
# = false and whitelist root
services.vsftpd.userlist = if cfg.userlistDeny then ["root"] else [];
- environment.etc."vsftpd.conf".text =
- concatMapStrings (x: "${x.cfgText}\n") optionDescription
- + ''
- ${if cfg.userlistFile == null then ""
- else "userlist_file=${cfg.userlistFile}"}
- background=NO
- listen=YES
- nopriv_user=vsftpd
- secure_chroot_dir=/var/empty
- '';
+ systemd.services.vsftpd =
+ { description = "Vsftpd Server";
- jobs.vsftpd =
- { description = "vsftpd server";
-
- startOn = "started network-interfaces";
- stopOn = "stopping network-interfaces";
+ wantedBy = [ "multi-user.target" ];
preStart =
- ''
- ${if cfg.anonymousUser then ''
+ optionalString cfg.anonymousUser
+ ''
mkdir -p -m 555 ${cfg.anonymousUserHome}
chown -R ftp:ftp ${cfg.anonymousUserHome}
- '' else ""}
- '';
+ '';
- exec = "${vsftpd}/sbin/vsftpd /etc/vsftpd.conf";
+ serviceConfig.ExecStart = "@${vsftpd}/sbin/vsftpd vsftpd ${configFile}";
+ serviceConfig.Restart = "always";
+ serviceConfig.Type = "forking";
};
};
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix
index 951cef3eac0..56ae399c901 100644
--- a/nixos/modules/services/printing/cupsd.nix
+++ b/nixos/modules/services/printing/cupsd.nix
@@ -149,7 +149,7 @@ in
''
LogLevel info
- SystemGroup root
+ SystemGroup root wheel
Listen localhost:631
Listen /var/run/cups/cups.sock
diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix
index 0c0811ca6e0..fda29ca0482 100644
--- a/nixos/modules/services/scheduling/fcron.nix
+++ b/nixos/modules/services/scheduling/fcron.nix
@@ -8,11 +8,14 @@ let
queuelen = if cfg.queuelen == null then "" else "-q ${toString cfg.queuelen}";
+ # Duplicate code, also found in cron.nix. Needs deduplication.
systemCronJobs =
''
SHELL=${pkgs.bash}/bin/bash
PATH=${config.system.path}/bin:${config.system.path}/sbin
- MAILTO="${config.services.cron.mailto}"
+ ${optionalString (config.services.cron.mailto != null) ''
+ MAILTO="${config.services.cron.mailto}"
+ ''}
NIX_CONF_DIR=/etc/nix
${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)}
'';
diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix
index 9d345e30361..b3d934862ab 100644
--- a/nixos/modules/services/search/elasticsearch.nix
+++ b/nixos/modules/services/search/elasticsearch.nix
@@ -91,7 +91,7 @@ in {
target = "elasticsearch/logging.yml"; }
];
- systemd.services.elasticsearch = mkIf cfg.enable {
+ systemd.services.elasticsearch = {
description = "Elasticsearch daemon";
wantedBy = [ "multi-user.target" ];
after = [ "network-interfaces.target" ];
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix
index 063332d4862..68f9b0647c0 100644
--- a/nixos/modules/services/torrent/transmission.nix
+++ b/nixos/modules/services/torrent/transmission.nix
@@ -15,7 +15,7 @@ let
toOption = x:
if x == true then "true"
else if x == false then "false"
- else if builtins.isInt x then toString x
+ else if isInt x then toString x
else toString ''\"${x}\"'';
# All lines in settings.json end with a ',' (comma), except for the last
diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix
index d21b6da0e77..cdb42fa7308 100644
--- a/nixos/modules/services/web-servers/apache-httpd/default.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/default.nix
@@ -17,8 +17,8 @@ let
getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 else 80;
extraModules = attrByPath ["extraModules"] [] mainCfg;
- extraForeignModules = filter builtins.isAttrs extraModules;
- extraApacheModules = filter (x: !(builtins.isAttrs x)) extraModules; # I'd prefer using builtins.isString here, but doesn't exist yet
+ extraForeignModules = filter isAttrs extraModules;
+ extraApacheModules = filter isString extraModules;
makeServerInfo = cfg: {
@@ -628,10 +628,10 @@ in
preStart =
''
mkdir -m 0750 -p ${mainCfg.stateDir}
- chown root.${mainCfg.group} ${mainCfg.stateDir}
+ [ $(id -u) != 0 ] || chown root.${mainCfg.group} ${mainCfg.stateDir}
${optionalString version24 ''
mkdir -m 0750 -p "${mainCfg.stateDir}/runtime"
- chown root.${mainCfg.group} "${mainCfg.stateDir}/runtime"
+ [ $(id -u) != 0 ] || chown root.${mainCfg.group} "${mainCfg.stateDir}/runtime"
''}
mkdir -m 0700 -p ${mainCfg.logDir}
@@ -659,6 +659,7 @@ in
serviceConfig.ExecStart = "@${httpd}/bin/httpd httpd -f ${httpdConf}";
serviceConfig.ExecStop = "${httpd}/bin/httpd -f ${httpdConf} -k graceful-stop";
serviceConfig.Type = "forking";
+ serviceConfig.PIDFile = "${mainCfg.stateDir}/httpd.pid";
serviceConfig.Restart = "always";
};
diff --git a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
index dcc05b03891..f1b5b675161 100644
--- a/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
+++ b/nixos/modules/services/web-servers/apache-httpd/mediawiki.nix
@@ -72,11 +72,11 @@ let
# Unpack Mediawiki and put the config file in its root directory.
mediawikiRoot = pkgs.stdenv.mkDerivation rec {
- name= "mediawiki-1.20.5";
+ name= "mediawiki-1.20.7";
src = pkgs.fetchurl {
url = "http://download.wikimedia.org/mediawiki/1.20/${name}.tar.gz";
- sha256 = "0ix6khrilfdncjqnh41xjs0bd49i1q0rywycjaixjfpwj6vjbqbl";
+ sha256 = "0cdl2mq3nw1jymanlxn7pi3qbf5y5003q53kmc8dip73nvrwnfxm";
};
skins = config.skins;
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index b26af1aa744..4a1b6de2873 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -4,7 +4,7 @@ with pkgs.lib;
let
cfg = config.services.nginx;
- nginx = pkgs.nginx.override { fullWebDAV = cfg.fullWebDAV; };
+ nginx = cfg.package;
configFile = pkgs.writeText "nginx.conf" ''
user ${cfg.user} ${cfg.group};
daemon off;
@@ -22,6 +22,13 @@ in
";
};
+ package = mkOption {
+ default = pkgs.nginx;
+ description = "
+ Nginx package to use.
+ ";
+ };
+
config = mkOption {
default = "events {}";
description = "
@@ -46,10 +53,6 @@ in
description = "Group account under which nginx runs.";
};
- fullWebDAV = mkOption {
- default = false;
- description = "Compile in a third party module providing full WebDAV support";
- };
};
};
diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix
index ab3ced4c9e2..035b23b4e1b 100644
--- a/nixos/modules/services/x11/desktop-managers/default.nix
+++ b/nixos/modules/services/x11/desktop-managers/default.nix
@@ -17,7 +17,7 @@ in
# Note: the order in which desktop manager modules are imported here
# determines the default: later modules (if enabled) are preferred.
# E.g., if KDE is enabled, it supersedes xterm.
- imports = [ ./none.nix ./xterm.nix ./xfce.nix ./gnome.nix ./kde4.nix ./e17.nix ];
+ imports = [ ./none.nix ./xterm.nix ./xfce.nix ./kde4.nix ./e17.nix ];
options = {
diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix
deleted file mode 100644
index b0212446ad3..00000000000
--- a/nixos/modules/services/x11/desktop-managers/gnome.nix
+++ /dev/null
@@ -1,42 +0,0 @@
-{ config, pkgs, ... }:
-
-with pkgs.lib;
-
-let
-
- cfg = config.services.xserver.desktopManager.gnome;
- gnome = pkgs.gnome;
-
-in
-
-{
-
- options = {
-
- services.xserver.desktopManager.gnome.enable = mkOption {
- default = false;
- example = true;
- description = "Enable a gnome terminal as a desktop manager.";
- };
-
- };
-
- config = mkIf cfg.enable {
-
- services.xserver.desktopManager.session = singleton
- { name = "gnome";
- start = ''
- ${gnome.gnometerminal}/bin/gnome-terminal -ls &
- waitPID=$!
- '';
- };
-
- environment.systemPackages =
- [ gnome.gnometerminal
- gnome.GConf
- gnome.gconfeditor
- ];
-
- };
-
-}
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 8199829ef90..d20010c70a6 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -72,6 +72,7 @@ in
pkgs.xfce.thunar_volman
pkgs.xfce.gvfs
pkgs.xfce.xfce4_appfinder
+ pkgs.xfce.tumbler
]
++ optional config.powerManagement.enable pkgs.xfce.xfce4_power_manager;
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index c4fce3706dc..80f559bddc4 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -44,7 +44,9 @@ let
# since presumably the desktop environment will handle these.
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
export _INHIBITION_LOCK_TAKEN=1
- exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
+ if ! ${config.systemd.package}/bin/loginctl show-session $XDG_SESSION_ID | grep -q '^RemoteHost='; then
+ exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
+ fi
fi
''}
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index 5884e9aa31c..91e01f2e30b 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -57,6 +57,13 @@ let cfg = config.services.xserver.synaptics; in
description = "Whether to enable tap buttons.";
};
+ buttonsMap = mkOption {
+ default = [1 2 3];
+ example = [1 3 2];
+ description = "Remap touchpad buttons.";
+ apply = map toString;
+ };
+
palmDetect = mkOption {
default = false;
example = true;
@@ -104,10 +111,13 @@ let cfg = config.services.xserver.synaptics; in
Option "MinSpeed" "${cfg.minSpeed}"
Option "MaxSpeed" "${cfg.maxSpeed}"
Option "AccelFactor" "${cfg.accelFactor}"
- Option "TapButton1" "${if cfg.tapButtons then "1" else "0"}"
- Option "TapButton2" "${if cfg.tapButtons then "2" else "0"}"
- Option "TapButton3" "${if cfg.tapButtons then "3" else "0"}"
${if cfg.tapButtons then "" else ''Option "MaxTapTime" "0"''}
+ Option "TapButton1" "${builtins.elemAt cfg.buttonsMap 0}"
+ Option "TapButton2" "${builtins.elemAt cfg.buttonsMap 1}"
+ Option "TapButton3" "${builtins.elemAt cfg.buttonsMap 2}"
+ Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}"
+ Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}"
+ Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}"
Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}"
diff --git a/nixos/modules/services/x11/terminal-server.nix b/nixos/modules/services/x11/terminal-server.nix
index ab05639aeca..72ecb8fe2fd 100644
--- a/nixos/modules/services/x11/terminal-server.nix
+++ b/nixos/modules/services/x11/terminal-server.nix
@@ -17,27 +17,17 @@ let
#! ${pkgs.stdenv.shell}
export XKB_BINDIR=${pkgs.xorg.xkbcomp}/bin
export XORG_DRI_DRIVER_PATH=${pkgs.mesa}/lib/dri
- exec ${pkgs.xorg.xorgserver}/bin/Xvfb "$@" -xkbdir "${pkgs.xkeyboard_config}/etc/X11/xkb"
+ exec ${pkgs.xorg.xorgserver}/bin/Xvfb "$@" -xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb
'';
- # ‘xinetd’ is insanely braindamaged in that it sends stderr to
- # stdout. Thus requires just about any xinetd program to be
- # wrapped to redirect its stderr. Sigh.
- x11vncWrapper = pkgs.writeScriptBin "x11vnc-wrapper"
- ''
- #! ${pkgs.stdenv.shell}
- export PATH=${makeSearchPath "bin" [ xvfbWrapper pkgs.gawk pkgs.which pkgs.openssl pkgs.xorg.xauth pkgs.nettools pkgs.shadow pkgs.procps pkgs.utillinux pkgs.bash ]}:$PATH
- export FD_GEOM=1024x786x24
- exec ${pkgs.x11vnc}/bin/x11vnc -inetd -display WAIT:1024x786:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp -unixpw -ssl SAVE 2> /var/log/x11vnc.log
- '';
-
-in
+in
{
config = {
-
+
services.xserver.enable = true;
+ services.xserver.videoDrivers = [];
# Enable KDM. Any display manager will do as long as it supports XDMCP.
services.xserver.displayManager.kdm.enable = true;
@@ -52,13 +42,38 @@ in
Xaccess=${pkgs.writeText "Xaccess" "localhost"}
'';
- services.xinetd.enable = true;
- services.xinetd.services = singleton
- { name = "x11vnc";
- port = 5900;
- unlisted = true;
- user = "root";
- server = "${x11vncWrapper}/bin/x11vnc-wrapper";
+ networking.firewall.allowedTCPPorts = [ 5900 ];
+
+ systemd.sockets.terminal-server =
+ { description = "Terminal Server Socket";
+ wantedBy = [ "sockets.target" ];
+ before = [ "multi-user.target" ];
+ socketConfig.Accept = true;
+ socketConfig.ListenStream = 5900;
+ };
+
+ systemd.services."terminal-server@" =
+ { description = "Terminal Server";
+
+ path =
+ [ xvfbWrapper pkgs.gawk pkgs.which pkgs.openssl pkgs.xorg.xauth
+ pkgs.nettools pkgs.shadow pkgs.procps pkgs.utillinux pkgs.bash
+ ];
+
+ environment.FD_GEOM = "1024x786x24";
+ environment.FD_XDMCP_IF = "127.0.0.1";
+ #environment.FIND_DISPLAY_OUTPUT = "/tmp/foo"; # to debug the "find display" script
+
+ serviceConfig =
+ { StandardInput = "socket";
+ StandardOutput = "socket";
+ StandardError = "journal";
+ ExecStart = "@${pkgs.x11vnc}/bin/x11vnc x11vnc -inetd -display WAIT:1024x786:cmd=FINDCREATEDISPLAY-Xvfb.xdmcp -unixpw -ssl SAVE";
+ # Don't kill the X server when the user quits the VNC
+ # connection. FIXME: the X server should run in a
+ # separate systemd session.
+ KillMode = "process";
+ };
};
};
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index da94f7cad53..0253c70f2dd 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -343,6 +343,18 @@ in
'';
};
+ serverFlagsSection = mkOption {
+ default = "";
+ example =
+ ''
+ Option "BlankTime" "0"
+ Option "StandbyTime" "0"
+ Option "SuspendTime" "0"
+ Option "OffTime" "0"
+ '';
+ description = "Contents of the ServerFlags section of the X server configuration file.";
+ };
+
moduleSection = mkOption {
type = types.lines;
default = "";
@@ -586,6 +598,7 @@ in
''
Section "ServerFlags"
Option "AllowMouseOpenFail" "on"
+ ${cfg.serverFlagsSection}
EndSection
Section "Module"
diff --git a/nixos/modules/system/activation/activation-script.nix b/nixos/modules/system/activation/activation-script.nix
index e012c977164..1545bcb8a1f 100644
--- a/nixos/modules/system/activation/activation-script.nix
+++ b/nixos/modules/system/activation/activation-script.nix
@@ -71,7 +71,7 @@ in
${
let
- set' = mapAttrs (n: v: if builtins.isString v then noDepEntry v else v) set;
+ set' = mapAttrs (n: v: if isString v then noDepEntry v else v) set;
withHeadlines = addAttributeName set';
in textClosureMap id (withHeadlines) (attrNames withHeadlines)
}
diff --git a/nixos/modules/system/activation/top-level.nix b/nixos/modules/system/activation/top-level.nix
index ada96131675..d9891f434cc 100644
--- a/nixos/modules/system/activation/top-level.nix
+++ b/nixos/modules/system/activation/top-level.nix
@@ -34,16 +34,24 @@ let
in ''
mkdir $out
- if [ ! -f ${kernelPath} ]; then
- echo "The bootloader cannot find the proper kernel image."
- echo "(Expecting ${kernelPath})"
- false
- fi
+ # Containers don't have their own kernel or initrd. They boot
+ # directly into stage 2.
+ ${optionalString (!config.boot.isContainer) ''
+ if [ ! -f ${kernelPath} ]; then
+ echo "The bootloader cannot find the proper kernel image."
+ echo "(Expecting ${kernelPath})"
+ false
+ fi
- ln -s ${kernelPath} $out/kernel
- ln -s ${config.system.modulesTree} $out/kernel-modules
+ ln -s ${kernelPath} $out/kernel
+ ln -s ${config.system.modulesTree} $out/kernel-modules
- ln -s ${config.system.build.initialRamdisk}/initrd $out/initrd
+ echo -n "$kernelParams" > $out/kernel-params
+
+ ln -s ${config.system.build.initialRamdisk}/initrd $out/initrd
+
+ ln -s ${config.hardware.firmware} $out/firmware
+ ''}
echo "$activationScript" > $out/activate
substituteInPlace $out/activate --subst-var out
@@ -56,9 +64,7 @@ let
ln -s ${config.system.build.etc}/etc $out/etc
ln -s ${config.system.path} $out/sw
ln -s "$systemd" $out/systemd
- ln -s ${config.hardware.firmware} $out/firmware
- echo -n "$kernelParams" > $out/kernel-params
echo -n "$configurationName" > $out/configuration-name
echo -n "systemd ${toString config.systemd.package.interfaceVersion}" > $out/init-interface-version
echo -n "$nixosVersion" > $out/nixos-version
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index 006909fbd0c..ee2f5e9b4f6 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -145,7 +145,7 @@ in
###### implementation
- config = {
+ config = mkIf (!config.boot.isContainer) {
system.build = { inherit kernel; };
@@ -230,9 +230,10 @@ in
{ description = "Load Kernel Modules";
wantedBy = [ "sysinit.target" "multi-user.target" ];
before = [ "sysinit.target" "shutdown.target" ];
+ conflicts = [ "shutdown.target" ];
unitConfig =
- { DefaultDependencies = "no";
- Conflicts = "shutdown.target";
+ { DefaultDependencies = false;
+ ConditionCapability = "CAP_SYS_MODULE";
};
serviceConfig =
{ Type = "oneshot";
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 8b3923e30a0..ef6ff71ed77 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -44,7 +44,7 @@ in
boot.loader.grub = {
enable = mkOption {
- default = true;
+ default = !config.boot.isContainer;
type = types.bool;
description = ''
Whether to enable the GNU GRUB boot loader.
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix
index 39928da8d19..027a7ac99d5 100644
--- a/nixos/modules/system/boot/modprobe.nix
+++ b/nixos/modules/system/boot/modprobe.nix
@@ -66,7 +66,7 @@ with pkgs.lib;
###### implementation
- config = {
+ config = mkIf (!config.boot.isContainer) {
environment.etc = singleton
{ source = pkgs.writeText "modprobe.conf"
diff --git a/nixos/modules/system/boot/shutdown.nix b/nixos/modules/system/boot/shutdown.nix
index ad71a2e816e..44cadcd64a7 100644
--- a/nixos/modules/system/boot/shutdown.nix
+++ b/nixos/modules/system/boot/shutdown.nix
@@ -6,20 +6,20 @@ with pkgs.lib;
# This unit saves the value of the system clock to the hardware
# clock on shutdown.
- systemd.units."save-hwclock.service" =
- { wantedBy = [ "shutdown.target" ];
+ systemd.services.save-hwclock =
+ { description = "Save Hardware Clock";
- text =
- ''
- [Unit]
- Description=Save Hardware Clock
- DefaultDependencies=no
- Before=shutdown.target
+ wantedBy = [ "shutdown.target" ];
- [Service]
- Type=oneshot
- ExecStart=${pkgs.utillinux}/sbin/hwclock --systohc ${if config.time.hardwareClockInLocalTime then "--localtime" else "--utc"}
- '';
+ unitConfig = {
+ DefaultDependencies = false;
+ ConditionVirtualization = "!systemd-nspawn";
+ };
+
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.utillinux}/sbin/hwclock --systohc ${if config.time.hardwareClockInLocalTime then "--localtime" else "--utc"}";
+ };
};
boot.kernel.sysctl."kernel.poweroff_cmd" = "${config.systemd.package}/sbin/poweroff";
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index b2b66280372..8ed3aecb691 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -328,7 +328,12 @@ in
};
- config = {
+ config = mkIf (!config.boot.isContainer) {
+
+ assertions = singleton
+ { assertion = any (fs: fs.mountPoint == "/") (attrValues config.fileSystems);
+ message = "The ‘fileSystems’ option does not specify your root file system.";
+ };
system.build.bootStage1 = bootStage1;
system.build.initialRamdisk = initialRamdisk;
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix
index a1faea886f9..c0518599f17 100644
--- a/nixos/modules/system/boot/systemd-unit-options.nix
+++ b/nixos/modules/system/boot/systemd-unit-options.nix
@@ -14,6 +14,18 @@ let
in if errors == [] then true
else builtins.trace (concatStringsSep "\n" errors) false;
+ unitOption = mkOptionType {
+ name = "systemd option";
+ merge = loc: defs:
+ let
+ defs' = filterOverrides defs;
+ defs'' = getValues defs';
+ in
+ if isList (head defs'')
+ then concatLists defs''
+ else mergeOneOption loc defs';
+ };
+
in rec {
unitOptions = {
@@ -37,7 +49,7 @@ in rec {
requires = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
Start the specified units when this unit is started, and stop
this unit when the specified units are stopped or fail.
@@ -46,7 +58,7 @@ in rec {
wants = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
Start the specified units when this unit is started.
'';
@@ -54,7 +66,7 @@ in rec {
after = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
If the specified units are started at the same time as
this unit, delay this unit until they have started.
@@ -63,7 +75,7 @@ in rec {
before = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
If the specified units are started at the same time as
this unit, delay them until this unit has started.
@@ -72,7 +84,7 @@ in rec {
bindsTo = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
Like ‘requires’, but in addition, if the specified units
unexpectedly disappear, this unit will be stopped as well.
@@ -81,7 +93,7 @@ in rec {
partOf = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
If the specified units are stopped or restarted, then this
unit is stopped or restarted as well.
@@ -90,7 +102,7 @@ in rec {
conflicts = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = ''
If the specified units are started, then this unit is stopped
and vice versa.
@@ -99,20 +111,20 @@ in rec {
requiredBy = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = "Units that require (i.e. depend on and need to go down with) this unit.";
};
wantedBy = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
description = "Units that want (i.e. depend on) this unit.";
};
unitConfig = mkOption {
default = {};
example = { RequiresMountsFor = "/data"; };
- type = types.attrs;
+ type = types.attrsOf unitOption;
description = ''
Each attribute in this set specifies an option in the
[Unit] section of the unit. See
@@ -137,7 +149,7 @@ in rec {
environment = mkOption {
default = {};
- type = types.attrs;
+ type = types.attrs; # FIXME
example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; };
description = "Environment variables passed to the service's processes.";
};
@@ -159,7 +171,7 @@ in rec {
{ StartLimitInterval = 10;
RestartSec = 5;
};
- type = types.addCheck types.attrs checkService;
+ type = types.addCheck (types.attrsOf unitOption) checkService;
description = ''
Each attribute in this set specifies an option in the
[Service] section of the unit. See
@@ -169,7 +181,7 @@ in rec {
};
script = mkOption {
- type = types.str;
+ type = types.lines;
default = "";
description = "Shell commands executed as the service's main process.";
};
@@ -181,7 +193,7 @@ in rec {
};
preStart = mkOption {
- type = types.string;
+ type = types.lines;
default = "";
description = ''
Shell commands executed before the service's main process
@@ -190,7 +202,7 @@ in rec {
};
postStart = mkOption {
- type = types.string;
+ type = types.lines;
default = "";
description = ''
Shell commands executed after the service's main process
@@ -198,8 +210,16 @@ in rec {
'';
};
+ preStop = mkOption {
+ type = types.lines;
+ default = "";
+ description = ''
+ Shell commands executed to stop the service.
+ '';
+ };
+
postStop = mkOption {
- type = types.string;
+ type = types.lines;
default = "";
description = ''
Shell commands executed after the service's main process
@@ -252,7 +272,7 @@ in rec {
listenStreams = mkOption {
default = [];
- type = types.listOf types.string;
+ type = types.listOf types.str;
example = [ "0.0.0.0:993" "/run/my-socket" ];
description = ''
For each item in this list, a ListenStream
@@ -263,7 +283,7 @@ in rec {
socketConfig = mkOption {
default = {};
example = { ListenStream = "/run/my-socket"; };
- type = types.attrs;
+ type = types.attrsOf unitOption;
description = ''
Each attribute in this set specifies an option in the
[Socket] section of the unit. See
@@ -280,7 +300,7 @@ in rec {
timerConfig = mkOption {
default = {};
example = { OnCalendar = "Sun 14:00:00"; Unit = "foo.service"; };
- type = types.attrs;
+ type = types.attrsOf unitOption;
description = ''
Each attribute in this set specifies an option in the
[Timer] section of the unit. See
@@ -328,7 +348,7 @@ in rec {
mountConfig = mkOption {
default = {};
example = { DirectoryMode = "0775"; };
- type = types.attrs;
+ type = types.attrsOf unitOption;
description = ''
Each attribute in this set specifies an option in the
[Mount] section of the unit. See
@@ -352,7 +372,7 @@ in rec {
automountConfig = mkOption {
default = {};
example = { DirectoryMode = "0775"; };
- type = types.attrs;
+ type = types.attrsOf unitOption;
description = ''
Each attribute in this set specifies an option in the
[Automount] section of the unit. See
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index c1fb2c45165..75c2c788f38 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -160,16 +160,48 @@ let
};
serviceConfig = { name, config, ... }: {
- config = {
- # Default path for systemd services. Should be quite minimal.
- path =
- [ pkgs.coreutils
- pkgs.findutils
- pkgs.gnugrep
- pkgs.gnused
- systemd
- ];
- };
+ config = mkMerge
+ [ { # Default path for systemd services. Should be quite minimal.
+ path =
+ [ pkgs.coreutils
+ pkgs.findutils
+ pkgs.gnugrep
+ pkgs.gnused
+ systemd
+ ];
+ environment.PATH = config.path;
+ }
+ (mkIf (config.preStart != "")
+ { serviceConfig.ExecStartPre = makeJobScript "${name}-pre-start" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${config.preStart}
+ '';
+ })
+ (mkIf (config.script != "")
+ { serviceConfig.ExecStart = makeJobScript "${name}-start" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${config.script}
+ '' + " " + config.scriptArgs;
+ })
+ (mkIf (config.postStart != "")
+ { serviceConfig.ExecStartPost = makeJobScript "${name}-post-start" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${config.postStart}
+ '';
+ })
+ (mkIf (config.preStop != "")
+ { serviceConfig.ExecStop = makeJobScript "${name}-pre-stop" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${config.preStop}
+ '';
+ })
+ (mkIf (config.postStop != "")
+ { serviceConfig.ExecStopPost = makeJobScript "${name}-post-stop" ''
+ #! ${pkgs.stdenv.shell} -e
+ ${config.postStop}
+ '';
+ })
+ ];
};
mountConfig = { name, config, ... }: {
@@ -223,41 +255,10 @@ let
${attrsToSection def.unitConfig}
[Service]
- Environment=PATH=${def.path}
- Environment=LD_LIBRARY_PATH=
${let env = cfg.globalEnvironment // def.environment;
in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)}
${optionalString (!def.restartIfChanged) "X-RestartIfChanged=false"}
${optionalString (!def.stopIfChanged) "X-StopIfChanged=false"}
-
- ${optionalString (def.preStart != "") ''
- ExecStartPre=${makeJobScript "${name}-pre-start" ''
- #! ${pkgs.stdenv.shell} -e
- ${def.preStart}
- ''}
- ''}
-
- ${optionalString (def.script != "") ''
- ExecStart=${makeJobScript "${name}-start" ''
- #! ${pkgs.stdenv.shell} -e
- ${def.script}
- ''} ${def.scriptArgs}
- ''}
-
- ${optionalString (def.postStart != "") ''
- ExecStartPost=${makeJobScript "${name}-post-start" ''
- #! ${pkgs.stdenv.shell} -e
- ${def.postStart}
- ''}
- ''}
-
- ${optionalString (def.postStop != "") ''
- ExecStopPost=${makeJobScript "${name}-post-stop" ''
- #! ${pkgs.stdenv.shell} -e
- ${def.postStop}
- ''}
- ''}
-
${attrsToSection def.serviceConfig}
'';
};
@@ -311,8 +312,6 @@ let
'';
};
- nixosUnits = mapAttrsToList makeUnit cfg.units;
-
units = pkgs.runCommand "units" { preferLocalBuild = true; }
''
mkdir -p $out
@@ -338,7 +337,7 @@ let
done
done
- for i in ${toString nixosUnits}; do
+ for i in ${toString (mapAttrsToList (n: v: v.unit) cfg.units)}; do
ln -s $i/* $out/
done
@@ -348,14 +347,14 @@ let
${concatStrings (mapAttrsToList (name: unit:
concatMapStrings (name2: ''
- mkdir -p $out/${name2}.wants
- ln -sfn ../${name} $out/${name2}.wants/
+ mkdir -p $out/'${name2}.wants'
+ ln -sfn '../${name}' $out/'${name2}.wants'/
'') unit.wantedBy) cfg.units)}
${concatStrings (mapAttrsToList (name: unit:
concatMapStrings (name2: ''
- mkdir -p $out/${name2}.requires
- ln -sfn ../${name} $out/${name2}.requires/
+ mkdir -p $out/'${name2}.requires'
+ ln -sfn '../${name}' $out/'${name2}.requires'/
'') unit.requiredBy) cfg.units)}
ln -s ${cfg.defaultUnit} $out/default.target
@@ -387,32 +386,41 @@ in
description = "Definition of systemd units.";
default = {};
type = types.attrsOf types.optionSet;
- options = {
- text = mkOption {
- type = types.str;
- description = "Text of this systemd unit.";
+ options = { name, config, ... }:
+ { options = {
+ text = mkOption {
+ type = types.str;
+ description = "Text of this systemd unit.";
+ };
+ enable = mkOption {
+ default = true;
+ type = types.bool;
+ description = ''
+ If set to false, this unit will be a symlink to
+ /dev/null. This is primarily useful to prevent specific
+ template instances (e.g. serial-getty@ttyS0)
+ from being started.
+ '';
+ };
+ requiredBy = mkOption {
+ default = [];
+ type = types.listOf types.string;
+ description = "Units that require (i.e. depend on and need to go down with) this unit.";
+ };
+ wantedBy = mkOption {
+ default = [];
+ type = types.listOf types.string;
+ description = "Units that want (i.e. depend on) this unit.";
+ };
+ unit = mkOption {
+ internal = true;
+ description = "The generated unit.";
+ };
+ };
+ config = {
+ unit = makeUnit name config;
+ };
};
- enable = mkOption {
- default = true;
- type = types.bool;
- description = ''
- If set to false, this unit will be a symlink to
- /dev/null. This is primarily useful to prevent specific
- template instances (e.g. serial-getty@ttyS0)
- from being started.
- '';
- };
- requiredBy = mkOption {
- default = [];
- type = types.listOf types.string;
- description = "Units that require (i.e. depend on and need to go down with) this unit.";
- };
- wantedBy = mkOption {
- default = [];
- type = types.listOf types.string;
- description = "Units that want (i.e. depend on) this unit.";
- };
- };
};
systemd.packages = mkOption {
@@ -486,6 +494,16 @@ in
'';
};
+ systemd.extraConfig = mkOption {
+ default = "";
+ type = types.lines;
+ example = "DefaultLimitCORE=infinity";
+ description = ''
+ Extra config options for systemd. See man systemd-system.conf for
+ available options.
+ '';
+ };
+
services.journald.console = mkOption {
default = "";
type = types.str;
@@ -516,9 +534,19 @@ in
'';
};
+ services.journald.extraConfig = mkOption {
+ default = "";
+ type = types.lines;
+ example = "Storage=volatile";
+ description = ''
+ Extra config options for systemd-journald. See man journald.conf
+ for available options.
+ '';
+ };
+
services.logind.extraConfig = mkOption {
default = "";
- type = types.str;
+ type = types.lines;
example = "HandleLidSwitch=ignore";
description = ''
Extra config options for systemd-logind. See man logind.conf for
@@ -555,6 +583,7 @@ in
environment.etc."systemd/system.conf".text =
''
[Manager]
+ ${config.systemd.extraConfig}
'';
environment.etc."systemd/journald.conf".text =
@@ -566,6 +595,7 @@ in
ForwardToConsole=yes
TTYPath=${config.services.journald.console}
''}
+ ${config.services.journald.extraConfig}
'';
environment.etc."systemd/logind.conf".text =
@@ -585,13 +615,6 @@ in
mkdir -p /var/log/journal
chmod 0755 /var/log/journal
- # Regenerate the hardware database /var/lib/udev/hwdb.bin
- # whenever systemd changes.
- if [ ! -e /var/lib/udev/prev-systemd -o "$(readlink /var/lib/udev/prev-systemd)" != ${systemd} ]; then
- echo "regenerating udev hardware database..."
- ${systemd}/bin/udevadm hwdb --update && ln -sfn ${systemd} /var/lib/udev/prev-systemd
- fi
-
# Make all journals readable to users in the wheel and adm
# groups, in addition to those in the systemd-journal group.
# Users can always read their own journals.
diff --git a/nixos/modules/tasks/cpu-freq.nix b/nixos/modules/tasks/cpu-freq.nix
index ce36a8bab09..705ec93a136 100644
--- a/nixos/modules/tasks/cpu-freq.nix
+++ b/nixos/modules/tasks/cpu-freq.nix
@@ -33,6 +33,8 @@ with pkgs.lib;
after = [ "systemd-modules-load.service" ];
wantedBy = [ "multi-user.target" ];
+ unitConfig.ConditionPathIsReadWrite = "/sys/devices/";
+
path = [ pkgs.cpufrequtils ];
preStart = ''
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index 3f484045ed4..b0bcd2eb373 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -81,6 +81,7 @@ in
options = {
fileSystems = mkOption {
+ default = {};
example = {
"/".device = "/dev/hda1";
"/data" = {
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index efd546f3baa..7c3c662eeac 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -76,7 +76,7 @@ in
};
systemd.services."zfs-mount" = {
- description = "Mount zfs volumes";
+ description = "Mount ZFS Volumes";
after = [ "zpool-import.service" ];
wantedBy = [ "local-fs.target" ];
serviceConfig = {
diff --git a/nixos/modules/tasks/kbd.nix b/nixos/modules/tasks/kbd.nix
index 9f294a5f93e..1083fb784fc 100644
--- a/nixos/modules/tasks/kbd.nix
+++ b/nixos/modules/tasks/kbd.nix
@@ -55,9 +55,9 @@ in
{ description = "Setup Virtual Console";
wantedBy = [ "sysinit.target" "multi-user.target" ];
before = [ "sysinit.target" "shutdown.target" ];
+ conflicts = [ "shutdown.target" ];
unitConfig =
{ DefaultDependencies = "no";
- Conflicts = "shutdown.target";
ConditionPathExists = "/dev/tty1";
};
serviceConfig =
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index d8522b6abba..b1ab989f130 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -270,6 +270,8 @@ in
before = [ "network.target" ];
wantedBy = [ "network.target" ];
+ unitConfig.ConditionCapability = "CAP_NET_ADMIN";
+
path = [ pkgs.iproute ];
serviceConfig.Type = "oneshot";
diff --git a/nixos/modules/tasks/scsi-link-power-management.nix b/nixos/modules/tasks/scsi-link-power-management.nix
index 4927952080f..071a8086598 100644
--- a/nixos/modules/tasks/scsi-link-power-management.nix
+++ b/nixos/modules/tasks/scsi-link-power-management.nix
@@ -31,6 +31,8 @@ with pkgs.lib;
task = true;
+ unitConfig.ConditionPathIsReadWrite = "/sys/class/scsi_host";
+
script = ''
shopt -s nullglob
for x in /sys/class/scsi_host/host*/link_power_management_policy; do
diff --git a/nixos/modules/testing/service-runner.nix b/nixos/modules/testing/service-runner.nix
new file mode 100644
index 00000000000..6f17ed77dad
--- /dev/null
+++ b/nixos/modules/testing/service-runner.nix
@@ -0,0 +1,114 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+let
+
+ makeScript = name: service: pkgs.writeScript "${name}-runner"
+ ''
+ #! ${pkgs.perl}/bin/perl -w -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl
+
+ use File::Slurp;
+
+ sub run {
+ my ($cmd) = @_;
+ my @args = split " ", $cmd;
+ my $prog;
+ if (substr($args[0], 0, 1) eq "@") {
+ $prog = substr($args[0], 1);
+ shift @args;
+ } else {
+ $prog = $args[0];
+ }
+ my $pid = fork;
+ if ($pid == 0) {
+ setpgrp; # don't receive SIGINT etc. from terminal
+ exec { $prog } @args;
+ die "failed to exec $prog\n";
+ } elsif (!defined $pid) {
+ die "failed to fork: $!\n";
+ }
+ return $pid;
+ };
+
+ sub run_wait {
+ my ($cmd) = @_;
+ my $pid = run $cmd;
+ die if waitpid($pid, 0) != $pid;
+ return $?;
+ };
+
+ # Set the environment. FIXME: escaping.
+ foreach my $key (keys %ENV) {
+ next if $key eq 'LOCALE_ARCHIVE';
+ delete $ENV{$key};
+ }
+ ${concatStrings (mapAttrsToList (n: v: ''
+ $ENV{'${n}'} = '${v}';
+ '') service.environment)}
+
+ # Run the ExecStartPre program. FIXME: this could be a list.
+ my $preStart = '${service.serviceConfig.ExecStartPre or ""}';
+ if ($preStart ne "") {
+ print STDERR "running ExecStartPre: $preStart\n";
+ my $res = run_wait $preStart;
+ die "$0: ExecStartPre failed with status $res\n" if $res;
+ };
+
+ # Run the ExecStart program.
+ my $cmd = '${service.serviceConfig.ExecStart}';
+ print STDERR "running ExecStart: $cmd\n";
+ my $mainPid = run $cmd;
+ $ENV{'MAINPID'} = $mainPid;
+
+ # Catch SIGINT, propagate to the main program.
+ sub intHandler {
+ print STDERR "got SIGINT, stopping service...\n";
+ kill 'INT', $mainPid;
+ };
+ $SIG{'INT'} = \&intHandler;
+ $SIG{'QUIT'} = \&intHandler;
+
+ # Run the ExecStartPost program.
+ my $postStart = '${service.serviceConfig.ExecStartPost or ""}';
+ if ($postStart ne "") {
+ print STDERR "running ExecStartPost: $postStart\n";
+ my $res = run_wait $postStart;
+ die "$0: ExecStartPost failed with status $res\n" if $res;
+ }
+
+ # Wait for the main program to exit.
+ die if waitpid($mainPid, 0) != $mainPid;
+ my $mainRes = $?;
+
+ # Run the ExecStopPost program.
+ my $postStop = '${service.serviceConfig.ExecStopPost or ""}';
+ if ($postStop ne "") {
+ print STDERR "running ExecStopPost: $postStop\n";
+ my $res = run_wait $postStop;
+ die "$0: ExecStopPost failed with status $res\n" if $res;
+ }
+
+ exit($mainRes & 127 ? 255 : $mainRes << 8);
+ '';
+
+in
+
+{
+ options = {
+ systemd.services = mkOption {
+ options =
+ { config, name, ... }:
+ { options.runner = mkOption {
+ internal = true;
+ description = ''
+ A script that runs the service outside of systemd,
+ useful for testing or for using NixOS services outside
+ of NixOS.
+ '';
+ };
+ config.runner = makeScript name config;
+ };
+ };
+ };
+}
diff --git a/nixos/modules/virtualisation/amazon-image.nix b/nixos/modules/virtualisation/amazon-image.nix
index cfc582170e6..abd2a1084bd 100644
--- a/nixos/modules/virtualisation/amazon-image.nix
+++ b/nixos/modules/virtualisation/amazon-image.nix
@@ -160,4 +160,9 @@ with pkgs.lib;
environment.systemPackages = [ pkgs.cryptsetup ];
boot.initrd.supportedFilesystems = [ "unionfs-fuse" ];
+
+ # Prevent logging in as root without a password. This doesn't really matter,
+ # since the only PAM services that allow logging in with a null
+ # password are local ones that are inaccessible on EC2 machines.
+ security.initialRootPassword = "!";
}
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
new file mode 100644
index 00000000000..bcbfaacd703
--- /dev/null
+++ b/nixos/modules/virtualisation/containers.nix
@@ -0,0 +1,137 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+ options = {
+
+ boot.isContainer = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ Whether this NixOS machine is a lightweight container running
+ in another NixOS system.
+ '';
+ };
+
+ systemd.containers = mkOption {
+ type = types.attrsOf (types.submodule (
+ { config, options, name, ... }:
+ {
+ options = {
+
+ root = mkOption {
+ type = types.path;
+ description = ''
+ The root directory of the container.
+ '';
+ };
+
+ config = mkOption {
+ description = ''
+ A specification of the desired configuration of this
+ container, as a NixOS module.
+ '';
+ };
+
+ path = mkOption {
+ type = types.path;
+ example = "/nix/var/nix/profiles/containers/webserver";
+ description = ''
+ As an alternative to specifying
+ , you can specify the path to
+ the evaluated NixOS system configuration, typically a
+ symlink to a system profile.
+ '';
+ };
+
+ };
+
+ config = mkMerge
+ [ { root = mkDefault "/var/lib/containers/${name}";
+ }
+ (mkIf options.config.isDefined {
+ path = (import ../../lib/eval-config.nix {
+ modules =
+ let extraConfig =
+ { boot.isContainer = true;
+ security.initialRootPassword = "!";
+ networking.hostName = mkDefault name;
+ };
+ in [ extraConfig config.config ];
+ prefix = [ "systemd" "containers" name ];
+ }).config.system.build.toplevel;
+ })
+ ];
+ }));
+
+ default = {};
+ example = literalExample
+ ''
+ { webserver =
+ { root = "/containers/webserver";
+ path = "/nix/var/nix/profiles/webserver";
+ };
+ database =
+ { root = "/containers/database";
+ config =
+ { config, pkgs, ... }:
+ { services.postgresql.enable = true;
+ services.postgresql.package = pkgs.postgresql92;
+ };
+ };
+ }
+ '';
+ description = ''
+ A set of NixOS system configurations to be run as lightweight
+ containers. Each container appears as a service
+ container-name
+ on the host system, allowing it to be started and stopped via
+ systemctl .
+ '';
+ };
+
+ };
+
+
+ config = {
+
+ systemd.services = mapAttrs' (name: container: nameValuePair "container-${name}"
+ { description = "Container '${name}'";
+
+ wantedBy = [ "multi-user.target" ];
+
+ unitConfig.RequiresMountsFor = [ container.root ];
+
+ preStart =
+ ''
+ mkdir -p -m 0755 ${container.root}/etc
+ if ! [ -e ${container.root}/etc/os-release ]; then
+ touch ${container.root}/etc/os-release
+ fi
+ '';
+
+ serviceConfig.ExecStart =
+ "${config.systemd.package}/bin/systemd-nspawn -M ${name} -D ${container.root} --bind-ro=/nix ${container.path}/init";
+
+ preStop =
+ ''
+ pid="$(cat /sys/fs/cgroup/systemd/machine/${name}.nspawn/system/tasks 2> /dev/null)"
+ if [ -n "$pid" ]; then
+ # Send the RTMIN+3 signal, which causes the container
+ # systemd to start halt.target.
+ echo "killing container systemd, PID = $pid"
+ kill -RTMIN+3 $pid
+ # Wait for the container to exit. We can't let systemd
+ # do this because it will send a signal to the entire
+ # cgroup.
+ for ((n = 0; n < 180; n++)); do
+ if ! kill -0 $pid 2> /dev/null; then break; fi
+ sleep 1
+ done
+ fi
+ '';
+ }) config.systemd.containers;
+
+ };
+}
\ No newline at end of file
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix
index d3884a503bc..d8668eb1607 100644
--- a/nixos/modules/virtualisation/libvirtd.nix
+++ b/nixos/modules/virtualisation/libvirtd.nix
@@ -82,8 +82,11 @@ in
mkdir -p /var/log/libvirt/qemu -m 755
rm -f /var/run/libvirtd.pid
- mkdir -p /var/lib/libvirt -m 700
- mkdir -p /var/lib/libvirt/dnsmasq -m 700
+ mkdir -p /var/lib/libvirt
+ mkdir -p /var/lib/libvirt/dnsmasq
+
+ chmod 755 /var/lib/libvirt
+ chmod 755 /var/lib/libvirt/dnsmasq
# Libvirt unfortunately writes mutable state (such as
# runtime changes to VM, network or filter configurations)
@@ -98,6 +101,19 @@ in
mkdir -p /etc/$(dirname $i) -m 755
cp -fpd ${pkgs.libvirt}/etc/$i /etc/$i
done
+
+ # libvirtd puts the full path of the emulator binary in the machine
+ # config file. But this path can unfortunately be garbage collected
+ # while still being used by the virtual machine. So update the
+ # emulator path on each startup to something valid (re-scan $PATH).
+ for file in /etc/libvirt/qemu/*.xml; do
+ # get (old) emulator path from config file
+ emulator=$(grep "^[[:space:]]*" "$file" | sed 's,^[[:space:]]*\(.*\).*,\1,')
+ # get a (definitely) working emulator path by re-scanning $PATH
+ new_emulator=$(command -v $(basename "$emulator"))
+ # write back
+ sed -i "s,^[[:space:]]*.*, $new_emulator ," "$file"
+ done
''; # */
serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon --verbose'';
diff --git a/nixos/modules/virtualisation/nova.nix b/nixos/modules/virtualisation/nova.nix
index 05c68e2bbff..e0d25183574 100644
--- a/nixos/modules/virtualisation/nova.nix
+++ b/nixos/modules/virtualisation/nova.nix
@@ -113,7 +113,7 @@ in
jobs.nova_objectstore =
{ name = "nova-objectstore";
- description = "Nova simple object store service";
+ description = "Nova Simple Object Store Service";
startOn = "ip-up";
@@ -129,7 +129,7 @@ in
jobs.nova_scheduler =
{ name = "nova-scheduler";
- description = "Nova scheduler service";
+ description = "Nova Scheduler Service";
startOn = "ip-up";
@@ -140,7 +140,7 @@ in
jobs.nova_compute =
{ name = "nova-compute";
- description = "Nova compute service";
+ description = "Nova Compute Service";
startOn = "ip-up";
@@ -157,7 +157,7 @@ in
jobs.nova_network =
{ name = "nova-network";
- description = "Nova network service";
+ description = "Nova Network Service";
startOn = "ip-up";
diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix
index beed36b6a51..71bdf31a98d 100644
--- a/nixos/modules/virtualisation/virtualbox-image.nix
+++ b/nixos/modules/virtualisation/virtualbox-image.nix
@@ -107,4 +107,9 @@ with pkgs.lib;
boot.loader.grub.device = "/dev/sda";
services.virtualbox.enable = true;
+
+ # Prevent logging in as root without a password. For NixOps, we
+ # don't need this because the user can login via SSH, and for the
+ # demo images, there is a demo user account that can sudo to root.
+ security.initialRootPassword = "!";
}
diff --git a/nixos/modules/virtualisation/xen-dom0.nix b/nixos/modules/virtualisation/xen-dom0.nix
index 4c24c6a7826..40f6929be4f 100644
--- a/nixos/modules/virtualisation/xen-dom0.nix
+++ b/nixos/modules/virtualisation/xen-dom0.nix
@@ -107,7 +107,7 @@ in
'';
jobs.xend =
- { description = "Xen control daemon";
+ { description = "Xen Control Daemon";
startOn = "stopped udevtrigger";
diff --git a/nixos/release.nix b/nixos/release.nix
index 1ffb334d90a..ff094cce05f 100644
--- a/nixos/release.nix
+++ b/nixos/release.nix
@@ -123,11 +123,13 @@ in rec {
inherit system;
});
+ /*
iso_minimal_new_kernel = forAllSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix;
type = "minimal-new-kernel";
inherit system;
});
+ */
iso_graphical = forAllSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-graphical.nix;
@@ -137,20 +139,13 @@ in rec {
# A variant with a more recent (but possibly less stable) kernel
# that might support more hardware.
+ /*
iso_new_kernel = forAllSystems (system: makeIso {
module = ./modules/installer/cd-dvd/installation-cd-new-kernel.nix;
type = "new-kernel";
inherit system;
});
-
- # A variant with efi booting support. Once cd-minimal has a newer kernel,
- # this should be enabled by default.
- iso_efi = forAllSystems (system: makeIso {
- module = ./modules/installer/cd-dvd/installation-cd-efi.nix;
- type = "efi";
- maintainers = [ "shlevy" ];
- inherit system;
- });
+ */
# A bootable VirtualBox virtual appliance as an OVA file (i.e. packaged OVF).
diff --git a/nixos/tests/default.nix b/nixos/tests/default.nix
index ce5776c8e46..574e1dd2f8b 100644
--- a/nixos/tests/default.nix
+++ b/nixos/tests/default.nix
@@ -16,6 +16,7 @@ with import ../lib/testing.nix { inherit system minimal; };
kde4 = makeTest (import ./kde4.nix);
#kexec = makeTest (import ./kexec.nix);
login = makeTest (import ./login.nix {});
+ logstash = makeTest (import ./logstash.nix);
latestKernel.login = makeTest (import ./login.nix ({ config, pkgs, ... }: { boot.kernelPackages = pkgs.linuxPackages_latest; }));
misc = makeTest (import ./misc.nix);
#mpich = makeTest (import ./mpich.nix);
diff --git a/nixos/tests/efi-installer.nix b/nixos/tests/efi-installer.nix
index 8a05dbf2a61..990f2b84a6c 100644
--- a/nixos/tests/efi-installer.nix
+++ b/nixos/tests/efi-installer.nix
@@ -12,7 +12,7 @@ let
(import ../lib/eval-config.nix {
inherit system;
modules =
- [ ../modules/installer/cd-dvd/installation-cd-efi.nix
+ [ ../modules/installer/cd-dvd/installation-cd-minimal.nix
../modules/testing/test-instrumentation.nix
{ key = "serial";
@@ -38,7 +38,6 @@ let
config = builtins.toFile "configuration.nix" ''
{ pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
- boot.kernelPackages = pkgs.linuxPackages_3_10;
boot.loader.grub.enable = false;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.gummiboot.enable = true;
diff --git a/nixos/tests/logstash.nix b/nixos/tests/logstash.nix
new file mode 100644
index 00000000000..ee309d39f87
--- /dev/null
+++ b/nixos/tests/logstash.nix
@@ -0,0 +1,40 @@
+{ pkgs, ... }:
+
+# This test runs logstash and checks if messages flows and elasticsearch is
+# started
+
+{
+ nodes = {
+ one =
+ { config, pkgs, ... }:
+ {
+ services = {
+ logstash = {
+ enable = true;
+ inputConfig = ''
+ exec { command => "echo flowers" interval => 1 type => "test" }
+ exec { command => "echo dragons" interval => 1 type => "test" }
+ '';
+ filterConfig = ''
+ if [type] == "test" {
+ grep { match => ["message", "flowers"] drop => true }
+ }
+ '';
+ outputConfig = ''
+ stdout { codec => rubydebug }
+ elasticsearch { embedded => true }
+ '';
+ };
+ };
+ };
+ };
+
+ testScript = ''
+ startAll;
+
+ $one->waitForUnit("logstash.service");
+ $one->waitUntilSucceeds("journalctl -n 20 _SYSTEMD_UNIT=logstash.service | grep flowers");
+ $one->fail("journalctl -n 20 _SYSTEMD_UNIT=logstash.service | grep dragons");
+ $one->waitUntilSucceeds("curl -s http://127.0.0.1:9200/_status?pretty=true | grep logstash");
+ '';
+}
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
index 12ac6f6f9a6..d355d705a24 100644
--- a/nixos/tests/misc.nix
+++ b/nixos/tests/misc.nix
@@ -59,6 +59,12 @@
subtest "override-env-var", sub {
$machine->succeed('[ "$EDITOR" = emacs ]');
};
+
+ # Test whether hostname (and by extension nss_myhostname) works.
+ subtest "hostname", sub {
+ $machine->succeed('[ "`hostname`" = machine ]');
+ $machine->succeed('[ "`hostname -s`" = machine ]');
+ };
'';
}
diff --git a/pkgs/applications/audio/caps/default.nix b/pkgs/applications/audio/caps/default.nix
index 81fb77c1c9a..49880f6c0f3 100644
--- a/pkgs/applications/audio/caps/default.nix
+++ b/pkgs/applications/audio/caps/default.nix
@@ -1,10 +1,10 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "caps-${version}";
- version = "0.9.7";
+ version = "0.9.16";
src = fetchurl {
url = "http://www.quitte.de/dsp/caps_${version}.tar.bz2";
- sha256 = "0ks98r3j404s9h88x50lj5lj4l64ijj29fz5i08iyq8jrb7r0zm0";
+ sha256 = "117l04w2zwqak856lihmaxg6f22vlz71knpxy0axiyri0x82lbwv";
};
configurePhase = ''
echo "PREFIX = $out" > defines.make
diff --git a/pkgs/applications/audio/drumkv1/default.nix b/pkgs/applications/audio/drumkv1/default.nix
index 7fdd04ce96b..6cad0e01a4e 100644
--- a/pkgs/applications/audio/drumkv1/default.nix
+++ b/pkgs/applications/audio/drumkv1/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "drumkv1-${version}";
- version = "0.3.2";
+ version = "0.3.5";
src = fetchurl {
url = "mirror://sourceforge/drumkv1/${name}.tar.gz";
- sha256 = "0bafg06iavri9dmg7hpz554kpqf1iv9crcdq46y4n4wyyxd7kajl";
+ sha256 = "125aa1lmmwjdbzyv13yaax4n6ni7h7v7c7clmjaz7bglzay7xq5w";
};
buildInputs = [ jackaudio libsndfile lv2 qt4 ];
diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix
index b0c5a88cb1a..d9998a9f814 100644
--- a/pkgs/applications/audio/fluidsynth/default.nix
+++ b/pkgs/applications/audio/fluidsynth/default.nix
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, alsaLib, glib, jackaudio, libsndfile, pkgconfig
-, pulseaudio }:
+, pulseaudio, cmake }:
stdenv.mkDerivation rec {
name = "fluidsynth-${version}";
- version = "1.1.5";
+ version = "1.1.6";
src = fetchurl {
url = "mirror://sourceforge/fluidsynth/${name}.tar.bz2";
- sha256 = "1x73a5rsyvfmh1j0484kzgnk251q61g1g2jdja673l8fizi0xd24";
+ sha256 = "00gn93bx4cz9bfwf3a8xyj2by7w23nca4zxf09ll53kzpzglg2yj";
};
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin
"-framework CoreAudio";
- buildInputs = [ glib libsndfile pkgconfig ]
+ buildInputs = [ cmake glib libsndfile pkgconfig ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib pulseaudio jackaudio ];
meta = with stdenv.lib; {
diff --git a/pkgs/applications/audio/jalv/default.nix b/pkgs/applications/audio/jalv/default.nix
index 5655c7d832b..fec9baa8695 100644
--- a/pkgs/applications/audio/jalv/default.nix
+++ b/pkgs/applications/audio/jalv/default.nix
@@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
name = "jalv-${version}";
- version = "1.4.0";
+ version = "1.4.2";
src = fetchurl {
url = "http://download.drobilla.net/${name}.tar.bz2";
- sha256 = "1hq968fhiz86428krqhjl3vlw71bigc9bsfcv97zgvsjh0fh6qa0";
+ sha256 = "132cq347xpa91d9m7nnmpla7gz4xg0njfw7kzwnp0gz172k0klp7";
};
buildInputs = [
diff --git a/pkgs/applications/audio/milkytracker/decompressor_gzip.patch b/pkgs/applications/audio/milkytracker/decompressor_gzip.patch
new file mode 100644
index 00000000000..c64421116de
--- /dev/null
+++ b/pkgs/applications/audio/milkytracker/decompressor_gzip.patch
@@ -0,0 +1,20 @@
+https://bugs.archlinux.org/task/31324
+https://410333.bugs.gentoo.org/attachment.cgi?id=322456
+
+diff -ur src.old/compression/DecompressorGZIP.cpp src/compression/DecompressorGZIP.cpp
+--- src.old/compression/DecompressorGZIP.cpp 2012-08-28 17:54:46.000000000 +0200
++++ src/compression/DecompressorGZIP.cpp 2012-08-28 17:55:21.000000000 +0200
+@@ -57,11 +57,11 @@
+
+ bool DecompressorGZIP::decompress(const PPSystemString& outFileName, Hints hint)
+ {
+- gzFile *gz_input_file = NULL;
++ gzFile gz_input_file = NULL;
+ int len = 0;
+ pp_uint8 *buf;
+
+- if ((gz_input_file = (void **)gzopen (fileName.getStrBuffer(), "r")) == NULL)
++ if ((gz_input_file = gzopen (fileName.getStrBuffer(), "r")) == NULL)
+ return false;
+
+ if ((buf = new pp_uint8[0x10000]) == NULL)
diff --git a/pkgs/applications/audio/milkytracker/default.nix b/pkgs/applications/audio/milkytracker/default.nix
new file mode 100644
index 00000000000..965c941113c
--- /dev/null
+++ b/pkgs/applications/audio/milkytracker/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchurl, SDL, alsaLib, autoconf, automake, jackaudio, perl
+, zlib, zziplib
+}:
+
+stdenv.mkDerivation rec {
+ version = "0.90.85";
+ name = "milkytracker-${version}";
+
+ src = fetchurl {
+ url = "http://milkytracker.org/files/milkytracker-0.90.85.tar.gz";
+ sha256 = "184pk0k9nv461a61sh6lb62wfadjwwk8ri3z5kpdbqnyssz0zfpv";
+ };
+
+ # Get two official patches.
+ no_zzip_patch = fetchurl {
+ url = "http://www.milkytracker.org/files/patches-0.90.85/no_zziplib_dep.patch";
+ sha256 = "1w550q7pxa7w6v2v19ljk03hayacrs6y887izg11a1983wk7qzb3";
+ };
+
+ fix_64bit_patch = fetchurl {
+ url = "http://www.milkytracker.org/files/patches-0.90.85/64bit_freebsd_fix.patch";
+ sha256 = "0gwd4zslbd8kih80k4v7n2c65kvm2cq3kl6d7y33z1l007vzyvf6";
+ };
+
+ patchPhase = ''
+ patch ./src/tracker/sdl/SDL_Main.cpp < ${fix_64bit_patch}
+ patch < ${no_zzip_patch}
+ patch ./src/compression/DecompressorGZIP.cpp < ${./decompressor_gzip.patch}
+ '';
+
+ preBuild=''
+ export CPATH=${zlib}/lib
+ '';
+
+ buildInputs = [ SDL alsaLib autoconf automake jackaudio perl zlib zziplib ];
+
+ meta = {
+ description = "Music tracker application, similar to Fasttracker II.";
+ homepage = http://milkytracker.org;
+ license = stdenv.lib.licenses.gpl3Plus;
+ platforms = [ "x86_64-linux" "i686-linux" ];
+ maintainers = [ stdenv.lib.maintainers.zoomulator ];
+ };
+}
diff --git a/pkgs/applications/audio/mopidy/default.nix b/pkgs/applications/audio/mopidy/default.nix
index 611d9f4226d..b684fee37d5 100644
--- a/pkgs/applications/audio/mopidy/default.nix
+++ b/pkgs/applications/audio/mopidy/default.nix
@@ -39,6 +39,6 @@ pythonPackages.buildPythonPackage rec {
local hard drive.
'';
maintainers = [ stdenv.lib.maintainers.rickynils ];
- platforms = [];
+ hydraPlatforms = [];
};
}
diff --git a/pkgs/applications/audio/qmmp/default.nix b/pkgs/applications/audio/qmmp/default.nix
index 8b99988f07b..8cb64820295 100644
--- a/pkgs/applications/audio/qmmp/default.nix
+++ b/pkgs/applications/audio/qmmp/default.nix
@@ -28,11 +28,11 @@
# handle that.
stdenv.mkDerivation rec {
- name = "qmmp-0.7.0";
+ name = "qmmp-0.7.3";
src = fetchurl {
url = "http://qmmp.ylsoftware.com/files/${name}.tar.bz2";
- sha256 = "0g8qcs82y3dy06lsgam2w6gh2ccx0frlw9fp4xg947vi3a16g6ig";
+ sha256 = "0qjmnyq3qmrm510g3lsa6vd80nmbz0859pwhnaaa19ah0jhf3r2p";
};
buildInputs =
@@ -55,5 +55,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [maintainers.bjornfor];
+ repositories.svn = http://qmmp.googlecode.com/svn/;
};
}
diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix
index 9f4859d6e07..c865314cb17 100644
--- a/pkgs/applications/audio/quodlibet/default.nix
+++ b/pkgs/applications/audio/quodlibet/default.nix
@@ -1,11 +1,18 @@
{ stdenv, fetchurl, python, buildPythonPackage, mutagen, pygtk, pygobject
-, pythonDBus, gst_python, gst_plugins_base, gst_plugins_good, gst_plugins_ugly }:
+, pythonDBus, gst_python, withGstPlugins ? false, gst_plugins_base ? null
+, gst_plugins_good ? null, gst_plugins_ugly ? null, gst_plugins_bad ? null }:
-let version = "2.5"; in
+assert withGstPlugins -> gst_plugins_base != null
+ || gst_plugins_good != null
+ || gst_plugins_ugly != null
+ || gst_plugins_bad != null;
+
+let version = "2.6.3"; in
buildPythonPackage {
# call the package quodlibet and just quodlibet
- name = "quodlibet-${version}";
+ name = "quodlibet-${version}"
+ + stdenv.lib.optionalString withGstPlugins "-with-gst-plugins";
namePrefix = "";
# XXX, tests fail
@@ -13,12 +20,12 @@ buildPythonPackage {
src = [
(fetchurl {
- url = "https://quodlibet.googlecode.com/files/quodlibet-${version}.tar.gz";
- sha256 = "0qrmlz7m1jpmriy8bgycjiwzbf3annznkn4x5k32yy9bylxa7lwb";
+ url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz";
+ sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z";
})
(fetchurl {
- url = "https://quodlibet.googlecode.com/files/quodlibet-plugins-${version}.tar.gz";
- sha256 = "0kf2mkq2zk38626bn48gscvy6ir04f5b2z57ahlxlqy8imv2cjff";
+ url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz";
+ sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc";
})
];
@@ -30,19 +37,23 @@ buildPythonPackage {
'';
patches = [ ./quodlibet-package-plugins.patch ];
- buildInputs = [
- gst_plugins_base gst_plugins_good gst_plugins_ugly
+ buildInputs = stdenv.lib.optionals withGstPlugins [
+ gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad
];
propagatedBuildInputs = [
mutagen pygtk pygobject pythonDBus gst_python
];
- postInstall = ''
+ postInstall = stdenv.lib.optionalString withGstPlugins ''
# Wrap quodlibet so it finds the GStreamer plug-ins
wrapProgram "$out/bin/quodlibet" --prefix \
GST_PLUGIN_PATH ":" \
- "${gst_plugins_base}/lib/gstreamer-0.10:${gst_plugins_good}/lib/gstreamer-0.10:${gst_plugins_ugly}/lib/gstreamer-0.10"
+ ${ stdenv.lib.concatStringsSep ":"
+ (map (s: s+"/lib/gstreamer-0.10")
+ (stdenv.lib.filter (s: s != null) [
+ gst_plugins_base gst_plugins_good gst_plugins_ugly gst_plugins_bad
+ ])) }
'';
meta = {
@@ -62,6 +73,7 @@ buildPythonPackage {
& internet radio, and all major audio formats.
'';
+ maintainer = [ stdenv.lib.maintainers.coroa ];
homepage = http://code.google.com/p/quodlibet/;
};
}
diff --git a/pkgs/applications/editors/emacs-modes/ess/default.nix b/pkgs/applications/editors/emacs-modes/ess/default.nix
index 4bd5148b950..a5b9cc184f3 100644
--- a/pkgs/applications/editors/emacs-modes/ess/default.nix
+++ b/pkgs/applications/editors/emacs-modes/ess/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, emacs, texinfo }:
-stdenv.mkDerivation {
- name = "ess-13.05";
+stdenv.mkDerivation rec {
+ name = "ess-13.09";
src = fetchurl {
- url = "http://ess.r-project.org/downloads/ess/ess-13.05.tgz";
- sha256 = "007rd8hg1aclr2i8178ym5c4bi7vgmwkp802v1mkgr85h50zlfdk";
+ url = "http://ess.r-project.org/downloads/ess/${name}.tgz";
+ sha256 = "1lki3vb6p7cw98zqq0gaia68flpqrjkd6dcl85fs0cc8qf55yqnh";
};
buildInputs = [ emacs texinfo ];
diff --git a/pkgs/applications/editors/emacs-modes/offlineimap/default.nix b/pkgs/applications/editors/emacs-modes/offlineimap/default.nix
new file mode 100644
index 00000000000..d94da4f88d9
--- /dev/null
+++ b/pkgs/applications/editors/emacs-modes/offlineimap/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchgit, emacs }:
+
+stdenv.mkDerivation rec {
+ rev = "646482203aacdf847d57d0a96263fddcfc33fb61";
+ name = "emacs-offlineimap-${rev}";
+
+ src = fetchgit {
+ inherit rev;
+ url = "git://git.naquadah.org/offlineimap-el.git";
+ sha256 = "0az4llfgva4wvpljyc5s2m7ggfnj06ssp32x8bncr5fzksha3r7b";
+ };
+
+ buildInputs = [ emacs ];
+
+ installPhase = ''
+ substituteInPlace offlineimap.el --replace "Machine.MachineUI" "machineui"
+ emacs --batch -f batch-byte-compile offlineimap.el
+ install -d $out/share/emacs/site-lisp
+ install offlineimap.el offlineimap.elc $out/share/emacs/site-lisp
+ '';
+
+ meta = {
+ description = "OfflineIMAP support for Emacs";
+ homepage = "http://julien.danjou.info/projects/emacs-packages#offlineimap";
+ platforms = stdenv.lib.platforms.all;
+ maintainers = [ stdenv.lib.maintainers.garbas ];
+ };
+}
diff --git a/pkgs/applications/editors/vim/qvim.nix b/pkgs/applications/editors/vim/qvim.nix
new file mode 100644
index 00000000000..15a147319a1
--- /dev/null
+++ b/pkgs/applications/editors/vim/qvim.nix
@@ -0,0 +1,115 @@
+args@{...}: with args;
+
+
+let inherit (args.composableDerivation) composableDerivation edf; in
+composableDerivation {
+ # use gccApple to compile on darwin
+ mkDerivation = ( if stdenv.isDarwin
+ then stdenvAdapters.overrideGCC stdenv gccApple
+ else stdenv ).mkDerivation;
+} (fix: {
+
+ name = "qvim-7.4";
+
+ enableParallelBuilding = true; # test this
+
+ src = fetchgit {
+ url = https://bitbucket.org/equalsraf/vim-qt.git ;
+ rev = "4160bfd5c1380e899d2f426b494fc4f1cf6ae85e";
+ sha256 = "1qa3xl1b9gqw66p71h53l7ibs4y3zfyj553jss70ybxaxchbhi5b";
+ };
+
+ # FIXME: adopt Darwin fixes from vim/default.nix, then chage meta.platforms.linux
+ # to meta.platforms.unix
+ preConfigure = assert (! stdenv.isDarwin); "";
+
+ configureFlags = [ "--with-vim-name=qvim" "--enable-gui=qt" "--with-features=${args.features}" ];
+
+ nativeBuildInputs
+ = [ ncurses pkgconfig libX11 libXext libSM libXpm libXt libXaw libXau
+ libXmu libICE qt4];
+
+ # most interpreters aren't tested yet.. (see python for example how to do it)
+ flags = {
+ ftNix = {
+ # because we cd to src in the main patch phase, we can't just add this
+ # patch to the list, we have to apply it manually
+ postPatch = ''
+ cd runtime
+ patch -p2 < ${./ft-nix-support.patch}
+ cd ..
+ '';
+ };
+ }
+ // edf { name = "darwin"; } #Disable Darwin (Mac OS X) support.
+ // edf { name = "xsmp"; } #Disable XSMP session management
+ // edf { name = "xsmp_interact"; } #Disable XSMP interaction
+ // edf { name = "mzscheme"; } #Include MzScheme interpreter.
+ // edf { name = "perl"; feat = "perlinterp"; enable = { nativeBuildInputs = [perl]; };} #Include Perl interpreter.
+
+ // edf {
+ name = "python";
+ feat = "pythoninterp";
+ enable = {
+ nativeBuildInputs = [ python ];
+ } // lib.optionalAttrs stdenv.isDarwin {
+ configureFlags
+ = [ "--enable-pythoninterp=yes"
+ "--with-python-config-dir=${python}/lib" ];
+ };
+ }
+
+ // edf { name = "tcl"; enable = { nativeBuildInputs = [tcl]; }; } #Include Tcl interpreter.
+ // edf { name = "ruby"; feat = "rubyinterp"; enable = { nativeBuildInputs = [ruby]; };} #Include Ruby interpreter.
+ // edf { name = "lua" ; feat = "luainterp"; enable = { nativeBuildInputs = [lua]; configureFlags = ["--with-lua-prefix=${args.lua}"];};}
+ // edf { name = "cscope"; } #Include cscope interface.
+ // edf { name = "workshop"; } #Include Sun Visual Workshop support.
+ // edf { name = "netbeans"; } #Disable NetBeans integration support.
+ // edf { name = "sniff"; feat = "sniff" ; } #Include Sniff interface.
+ // edf { name = "multibyte"; } #Include multibyte editing support.
+ // edf { name = "hangulinput"; feat = "hangulinput" ;} #Include Hangul input support.
+ // edf { name = "xim"; } #Include XIM input support.
+ // edf { name = "fontset"; } #Include X fontset output support.
+ // edf { name = "acl"; } #Don't check for ACL support.
+ // edf { name = "gpm"; } #Don't use gpm (Linux mouse daemon).
+ // edf { name = "nls"; enable = {nativeBuildInputs = [gettext];}; } #Don't support NLS (gettext()).
+ ;
+
+ cfg = {
+ pythonSupport = config.vim.python or true;
+ rubySupport = config.vim.ruby or true;
+ nlsSupport = config.vim.nls or false;
+ tclSupport = config.vim.tcl or false;
+ multibyteSupport = config.vim.multibyte or false;
+ cscopeSupport = config.vim.cscope or false;
+ netbeansSupport = config.netbeans or true; # eg envim is using it
+
+ # by default, compile with darwin support if we're compiling on darwin, but
+ # allow this to be disabled by setting config.vim.darwin to false
+ darwinSupport = stdenv.isDarwin && (config.vim.darwin or true);
+
+ # add .nix filetype detection and minimal syntax highlighting support
+ ftNixSupport = config.vim.ftNix or true;
+ };
+
+ postInstall = stdenv.lib.optionalString stdenv.isLinux ''
+ rpath=`patchelf --print-rpath $out/bin/qvim`;
+ for i in $nativeBuildInputs; do
+ echo adding $i/lib
+ rpath=$rpath:$i/lib
+ done
+ echo $nativeBuildInputs
+ echo $rpath
+ patchelf --set-rpath $rpath $out/bin/qvim
+ '';
+
+ dontStrip = 1;
+
+ meta = with stdenv.lib; {
+ description = "The most popular clone of the VI editor (Qt GUI fork)";
+ homepage = https://bitbucket.org/equalsraf/vim-qt/wiki/Home;
+ maintainers = with maintainers; [ smironov ];
+ platforms = platforms.linux;
+ };
+})
+
diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix
index c2a661c82fd..aa0bdbfe56c 100644
--- a/pkgs/applications/graphics/ImageMagick/default.nix
+++ b/pkgs/applications/graphics/ImageMagick/default.nix
@@ -1,6 +1,8 @@
{ stdenv
, fetchurl
+, pkgconfig
, bzip2
+, fontconfig
, freetype
, ghostscript ? null
, libjpeg
@@ -16,14 +18,14 @@
}:
let
- version = "6.8.6-9";
+ version = "6.8.7-5";
in
stdenv.mkDerivation rec {
name = "ImageMagick-${version}";
src = fetchurl {
url = "mirror://imagemagick/${name}.tar.xz";
- sha256 = "1bpj8676mph5cvyjsdgf27i6yg2iw9iskk5c69mvpxkyawgjw1vg";
+ sha256 = "1cn1kg7scs6r7r00qlqirhnmqjnmyczbidab3vgqarw9qszh2ri6";
};
enableParallelBuilding = true;
@@ -42,17 +44,18 @@ stdenv.mkDerivation rec {
'';
propagatedBuildInputs =
- [ bzip2 freetype libjpeg libpng libtiff libxml2 zlib librsvg
+ [ bzip2 fontconfig freetype libjpeg libpng libtiff libxml2 zlib librsvg
libtool jasper libX11
] ++ stdenv.lib.optional (ghostscript != null && stdenv.system != "x86_64-darwin") ghostscript;
- buildInputs = [ tetex ];
+ buildInputs = [ tetex pkgconfig ];
postInstall = ''(cd "$out/include" && ln -s ImageMagick* ImageMagick)'';
- meta = {
+ meta = with stdenv.lib; {
homepage = http://www.imagemagick.org/;
description = "A software suite to create, edit, compose, or convert bitmap images";
- platforms = stdenv.lib.platforms.linux;
+ platforms = platforms.linux ++ [ "x86_64-darwin" ];
+ maintainers = with maintainers; [ the-kenny ];
};
}
diff --git a/pkgs/applications/graphics/gimp/2.8.nix b/pkgs/applications/graphics/gimp/2.8.nix
index 4e12e232081..d6b005e8e3d 100644
--- a/pkgs/applications/graphics/gimp/2.8.nix
+++ b/pkgs/applications/graphics/gimp/2.8.nix
@@ -4,11 +4,11 @@
, python, pygtk, libart_lgpl, libexif, gettext, xlibs }:
stdenv.mkDerivation rec {
- name = "gimp-2.8.6";
+ name = "gimp-2.8.8";
src = fetchurl {
url = "ftp://ftp.gimp.org/pub/gimp/v2.8/${name}.tar.bz2";
- md5 = "12b3fdf33d1f07ae79b412a9e38b9693";
+ md5 = "ef2547c3514a1096931637bd6250635a";
};
buildInputs =
diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix
index d314d93ea4c..234249e8562 100644
--- a/pkgs/applications/graphics/gimp/plugins/default.nix
+++ b/pkgs/applications/graphics/gimp/plugins/default.nix
@@ -68,18 +68,18 @@ rec {
};
};
- fourier = pluginDerivation {
+ fourier = pluginDerivation rec {
/* menu:
Filters/Generic/FFT Forward
Filters/Generic/FFT Inverse
*/
- name = "fourier-0.3.3";
- buildInputs = [ gimp pkgs.fftwSinglePrec pkgconfig glib] ++ gimp.nativeBuildInputs;
+ name = "fourier-0.4.1";
+ buildInputs = [ gimp pkgs.fftw pkgconfig glib] ++ gimp.nativeBuildInputs;
postInstall = "fail";
installPhase = "installPlugins fourier";
src = fetchurl {
- url = http://people.via.ecp.fr/~remi/soft/gimp/fourier-0.3.3.tar.gz;
- sha256 = "0xxgp0lrjxsj54sgygi31c7q41jkqzn0v18qyznrviv8r099v29p";
+ url = "http://registry.gimp.org/files/${name}.tar.gz";
+ sha256 = "1pr3y3zl9w8xs1circdrxpr98myz9m8wfzy022al79z4pdanwvs1";
};
};
@@ -110,6 +110,9 @@ rec {
url = mirror://sourceforge/gimp-texturize/texturize-2.1_src.tgz;
sha256 = "0cdjq25g3yfxx6bzx6nid21kq659s1vl9id4wxyjs2dhcv229cg3";
};
+ patchPhase = ''
+ sed -i '/.*gimpimage_pdb.h.*/ d' src/*.c*
+ '';
installPhase = "installPlugins src/texturize";
};
@@ -140,21 +143,23 @@ rec {
installPhase = "installPlugins src/gimp-lqr-plugin";
};
- # this is more than a gimp plugin !
- # it can be made to compile the gimp plugin only though..
gmic =
- let imagemagick = pkgs.imagemagickBig; # maybe the non big version is enough?
- in pluginDerivation {
- name = "gmic-1.3.2.0";
- buildInputs = [ imagemagick pkgconfig gimp pkgs.fftwSinglePrec ] ++ gimp.nativeBuildInputs;
+ let
+ imagemagick = pkgs.imagemagickBig; # maybe the non big version is enough?
+ fftw = pkgs.fftw.override {pthreads = true;};
+ in pluginDerivation rec {
+ name = "gmic-1.5.7.2";
+ buildInputs = [imagemagick pkgconfig fftw gimp] ++ gimp.nativeBuildInputs;
src = fetchurl {
- url = mirror://sourceforge/gmic/gmic_1.3.2.0.tar.gz;
- sha256 = "0mxq664vzzc2l6k6sqm9syp34mihhi262i6fixk1g12lmc28797h";
+ url = mirror://sourceforge/gmic/gmic_1.5.7.2.tar.gz;
+ sha256 = "1cpbxb3p2c8bcv2cbr150whapzjc7w09i3jza0z9x3xj8c0vdyv1";
};
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${imagemagick}/include/ImageMagick"
'';
- installPhase = "installPlugins src/gmic4gimp";
+ sourceRoot = "${name}/src";
+ buildPhase = "make gimp";
+ installPhase = "installPlugins gmic_gimp";
meta = {
description = "script language for image processing which comes with its open-source interpreter";
homepage = http://gmic.sourceforge.net/repository.shtml;
@@ -170,9 +175,9 @@ rec {
# this is more than a gimp plugin !
# either load the raw image with gimp (and the import dialog will popup)
# or use the binary
- ufraw = pluginDerivation {
- name = "ufraw-0.15";
- buildInputs = [pkgs.lcms gimp] ++ gimp.nativeBuildInputs;
+ ufraw = pluginDerivation rec {
+ name = "ufraw-0.19.2";
+ buildInputs = [pkgs.gtkimageview pkgs.lcms gimp] ++ gimp.nativeBuildInputs;
# --enable-mime - install mime files, see README for more information
# --enable-extras - build extra (dcraw, nikon-curve) executables
# --enable-dst-correction - enable DST correction for file timestamps.
@@ -184,8 +189,8 @@ rec {
configureFlags = "--enable-extras --enable-dst-correction --enable-contrast";
src = fetchurl {
- url = mirror://sourceforge/ufraw/ufraw-0.15.tar.gz;
- sha256 = "0cf3csksjkyl91zxhjnn74vc31l14nm6n1i02s76xdvvkk9ics8k";
+ url = "mirror://sourceforge/ufraw/${name}.tar.gz";
+ sha256 = "1lxba7pb3vcsq94dwapg9bk9mb3ww6r3pvvcyb0ah5gh2sgzxgkk";
};
installPhase = "
installPlugins ufraw-gimp
diff --git a/pkgs/applications/graphics/grafx2/default.nix b/pkgs/applications/graphics/grafx2/default.nix
new file mode 100644
index 00000000000..6b7c9a27694
--- /dev/null
+++ b/pkgs/applications/graphics/grafx2/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, SDL, SDL_image, SDL_ttf, zlib, libpng, pkgconfig, lua5 }:
+
+stdenv.mkDerivation rec {
+
+ version = "2.4.2035";
+ name = "grafx2-${version}";
+
+ src = fetchurl {
+ url = "https://grafx2.googlecode.com/files/${name}-src.tgz";
+ sha256 = "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q";
+ };
+
+ buildInputs = [ SDL SDL_image SDL_ttf libpng zlib lua5 pkgconfig ];
+
+ preBuild = "cd src";
+
+ preInstall = '' mkdir -p "$out" '';
+
+ installPhase = ''make install prefix="$out"'';
+
+ meta = {
+ description = "GrafX2 is a bitmap paint program inspired by the Amiga programs Deluxe Paint and Brilliance.";
+ homepage = http://code.google.co/p/grafx2/;
+ license = stdenv.lib.licenses.gpl2;
+ platforms = [ "x86_64-linux" "i686-linux" ];
+ maintainers = [ stdenv.lib.maintainers.zoomulator ];
+ };
+}
diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix
index c02bc6024df..1f795a800ff 100644
--- a/pkgs/applications/graphics/graphicsmagick/default.nix
+++ b/pkgs/applications/graphics/graphicsmagick/default.nix
@@ -2,14 +2,14 @@
, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz
, libX11}:
-let version = "1.3.13"; in
+let version = "1.3.18"; in
stdenv.mkDerivation {
name = "graphicsmagick-${version}";
src = fetchurl {
url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz";
- sha256 = "08lgjvhvhw3by5h4kfpl7072dbvkcpsajy5f6izq69cv61vadqs5";
+ sha256 = "1axh4j2jr3l92dan15b2nmx9da4l7i0rcz9b5bvfd4q742zfwj7x";
};
configureFlags = "--enable-shared";
diff --git a/pkgs/applications/graphics/mirage/default.nix b/pkgs/applications/graphics/mirage/default.nix
index dd1fbcc7e07..cd5388c1b88 100644
--- a/pkgs/applications/graphics/mirage/default.nix
+++ b/pkgs/applications/graphics/mirage/default.nix
@@ -17,6 +17,10 @@ buildPythonPackage rec {
buildInputs = [ stdenv libX11 gettext ];
+ patchPhase = ''
+ sed -i "s@/usr/local/share/locale@$out/share/locale@" mirage.py
+ '';
+
pythonPath = [ pygtk pil ];
meta = {
diff --git a/pkgs/applications/graphics/mypaint/default.nix b/pkgs/applications/graphics/mypaint/default.nix
index a59498b8f14..be8df8ef16d 100644
--- a/pkgs/applications/graphics/mypaint/default.nix
+++ b/pkgs/applications/graphics/mypaint/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, gettext, glib, gtk, json_c, lcms2, libpng
-, makeWrapper, pkgconfig, pygtk, python, pythonPackages, scons, swig
+{ stdenv, fetchurl, gettext, glib, gtk, hicolor_icon_theme, json_c
+, lcms2, libpng , makeWrapper, pkgconfig, pygtk, python, pythonPackages
+, scons, swig
}:
stdenv.mkDerivation rec {
@@ -11,18 +12,21 @@ stdenv.mkDerivation rec {
sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq";
};
- buildInputs = [
+ buildInputs = [
gettext glib gtk json_c lcms2 libpng makeWrapper pkgconfig pygtk
python scons swig
];
-
- propagatedBuildInputs = [ pythonPackages.numpy ];
+
+ propagatedBuildInputs = [ hicolor_icon_theme pythonPackages.numpy ];
buildPhase = "scons prefix=$out";
installPhase = ''
scons prefix=$out install
- wrapProgram $out/bin/mypaint --prefix PYTHONPATH : $PYTHONPATH
+ sed -i -e 's|/usr/bin/env python2.7|${python}/bin/python|' $out/bin/mypaint
+ wrapProgram $out/bin/mypaint \
+ --prefix PYTHONPATH : $PYTHONPATH \
+ --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share"
'';
meta = with stdenv.lib; {
diff --git a/pkgs/applications/graphics/pencil/default.nix b/pkgs/applications/graphics/pencil/default.nix
new file mode 100644
index 00000000000..737baf375d1
--- /dev/null
+++ b/pkgs/applications/graphics/pencil/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, xulrunner }:
+
+stdenv.mkDerivation rec {
+ name = "pencil-2.0.5";
+
+ src = fetchurl {
+ url = "http://evoluspencil.googlecode.com/files/${name}.tar.gz";
+ sha256 = "0rn5nb08p8wph5s5gajkil6y06zgrm86p4gnjdgv76czx1fqazm0";
+ };
+
+ # Pre-built package
+ buildPhase = "true";
+
+ installPhase = ''
+ mkdir -p "$out"
+ cp -r usr/* "$out"
+ cp COPYING "$out/share/pencil"
+ sed -e "s|/usr/bin/xulrunner|${xulrunner}/bin/xulrunner|" \
+ -e "s|/usr/share/pencil|$out/share/pencil|" \
+ -i "$out/bin/pencil"
+ sed -e "s|/usr/bin/pencil|$out/bin/pencil|" \
+ -e "s|Icon=.*|Icon=$out/share/pencil/skin/classic/icon.svg|" \
+ -i "$out/share/applications/pencil.desktop"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "GUI prototyping/mockup tool";
+ homepage = http://pencil.evolus.vn/;
+ license = licenses.gpl2; # Commercial license is also available
+ maintainers = [ maintainers.bjornfor ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/graphics/sane/backends-git.nix b/pkgs/applications/graphics/sane/backends-git.nix
index c9cea4109dc..7ba6e1756ba 100644
--- a/pkgs/applications/graphics/sane/backends-git.nix
+++ b/pkgs/applications/graphics/sane/backends-git.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, fetchgit, hotplugSupport ? true, libusb ? null, gt68xxFirmware ? null }:
+{ stdenv, fetchurl, fetchgit, hotplugSupport ? true, libusb ? null
+, gt68xxFirmware ? null, snapscanFirmware ? null
+}:
let
firmware = gt68xxFirmware { inherit fetchurl; };
in
@@ -29,6 +31,11 @@ stdenv.mkDerivation {
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
+ else if snapscanFirmware != null then
+ "mkdir -p \${out}/share/sane/snapscan ; ln -s " + snapscanFirmware +
+ " \${out}/share/sane/snapscan/your-firmwarefile.bin ;" +
+ "mkdir -p \${out}/etc/sane.d ; " +
+ "echo epson2 > \${out}/etc/sane.d/dll.conf"
else "";
meta = {
diff --git a/pkgs/applications/graphics/sane/backends.nix b/pkgs/applications/graphics/sane/backends.nix
index a53466ae818..eaf1c3b725f 100644
--- a/pkgs/applications/graphics/sane/backends.nix
+++ b/pkgs/applications/graphics/sane/backends.nix
@@ -1,4 +1,6 @@
-{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null, pkgconfig ? null , gt68xxFirmware ? null }:
+{ stdenv, fetchurl, hotplugSupport ? true, libusb ? null, libv4l ? null
+, pkgconfig ? null, gt68xxFirmware ? null, snapscanFirmware ? null
+}:
assert hotplugSupport -> (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux");
@@ -36,6 +38,9 @@ stdenv.mkDerivation rec {
if gt68xxFirmware != null then
"mkdir -p \${out}/share/sane/gt68xx ; ln -s " + firmware.fw +
" \${out}/share/sane/gt68xx/" + firmware.name
+ else if snapscanFirmware != null then
+ "mkdir -p \${out}/share/sane/snapscan ; ln -s " + snapscanFirmware +
+ " \${out}/share/sane/snapscan/your-firmwarefile.bin"
else "";
meta = {
diff --git a/pkgs/applications/graphics/sane/xsane.nix b/pkgs/applications/graphics/sane/xsane.nix
index de8d4c33652..32b39c0160d 100644
--- a/pkgs/applications/graphics/sane/xsane.nix
+++ b/pkgs/applications/graphics/sane/xsane.nix
@@ -1,4 +1,9 @@
-{ stdenv, fetchurl, saneBackends, saneFrontends, libX11, gtk, pkgconfig, libpng, libusb ? null }:
+{ stdenv, fetchurl, saneBackends, saneFrontends, libX11, gtk, pkgconfig, libpng
+, libusb ? null
+, gimpSupport ? false, gimp_2_8 ? null
+}:
+
+assert gimpSupport -> gimp_2_8 != null;
stdenv.mkDerivation rec {
name = "xsane-0.998";
@@ -12,8 +17,9 @@ stdenv.mkDerivation rec {
sed -e '/SANE_CAP_ALWAYS_SETTABLE/d' -i src/xsane-back-gtk.c
'';
- buildInputs = [libpng saneBackends saneFrontends libX11 gtk pkgconfig ] ++
- (if libusb != null then [libusb] else []);
+ buildInputs = [libpng saneBackends saneFrontends libX11 gtk pkgconfig ]
+ ++ (if libusb != null then [libusb] else [])
+ ++ stdenv.lib.optional gimpSupport gimp_2_8;
meta = {
homepage = http://www.sane-project.org/;
diff --git a/pkgs/applications/graphics/smartdeblur/default.nix b/pkgs/applications/graphics/smartdeblur/default.nix
new file mode 100644
index 00000000000..83f3c751029
--- /dev/null
+++ b/pkgs/applications/graphics/smartdeblur/default.nix
@@ -0,0 +1,33 @@
+{ fetchurl, stdenv, cmake, qt4, fftw }:
+
+let
+ rev = "9895036d26";
+in
+stdenv.mkDerivation rec {
+ name = "smartdeblur-git-${rev}";
+
+ src = fetchurl {
+ url = "https://github.com/Y-Vladimir/SmartDeblur/tarball/${rev}";
+ name = "${name}.tar.gz";
+ sha256 = "126x9x1zhqdarjz9in0p1qhmqg3jwz7frizadjvx723g2ppi33s4";
+ };
+
+ preConfigure = ''
+ cd src
+ '';
+
+ enableParallelBuilding = true;
+
+ buildInputs = [ cmake qt4 fftw ];
+
+ cmakeFlags = "-DUSE_SYSTEM_FFTW=ON";
+
+ meta = {
+ homepage = "https://github.com/Y-Vladimir/SmartDeblur";
+ description = "Tool for restoring blurry and defocused images";
+ license = "GPLv3";
+ maintainers = with stdenv.lib.maintainers; [ viric ];
+ platforms = with stdenv.lib.platforms; linux;
+ };
+}
+
diff --git a/pkgs/applications/graphics/zgrviewer/default.nix b/pkgs/applications/graphics/zgrviewer/default.nix
index 5fe30bd7a03..93d1b28854a 100644
--- a/pkgs/applications/graphics/zgrviewer/default.nix
+++ b/pkgs/applications/graphics/zgrviewer/default.nix
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
meta = {
# Quicker to unpack locally than load Hydra
- platforms = [];
+ hydraPlatforms = [];
maintainers = with stdenv.lib.maintainers; [raskin];
license = with stdenv.lib.licenses; lgpl21Plus;
description = "GraphViz graph viewer/navigator";
diff --git a/pkgs/applications/misc/adobe-reader/default.nix b/pkgs/applications/misc/adobe-reader/default.nix
index 46ccdb39946..a186f5f5ee0 100644
--- a/pkgs/applications/misc/adobe-reader/default.nix
+++ b/pkgs/applications/misc/adobe-reader/default.nix
@@ -3,7 +3,7 @@
assert stdenv.system == "i686-linux";
-let version = "9.5.1"; in
+let version = "9.5.5"; in
stdenv.mkDerivation {
name = "adobe-reader-${version}-1";
@@ -12,7 +12,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/${version}/enu/AdbeRdr${version}-1_i486linux_enu.tar.bz2";
- sha256 = "19mwhbfsivb21zmrz2hllf0kh4i225ac697y026bakyysn0vig56";
+ sha256 = "0h35misxrqkl5zlmmvray1bqf4ywczkm89n9qw7d9arqbg3aj3pf";
};
# !!! Adobe Reader contains copies of OpenSSL, libcurl, and libicu.
diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix
index 10d92e4d517..41f4b4f0904 100644
--- a/pkgs/applications/misc/calibre/default.nix
+++ b/pkgs/applications/misc/calibre/default.nix
@@ -4,11 +4,11 @@
}:
stdenv.mkDerivation rec {
- name = "calibre-1.8.0";
+ name = "calibre-1.13.0";
src = fetchurl {
url = "mirror://sourceforge/calibre/${name}.tar.xz";
- sha256 = "0awh24n5bvypmiylngmz0w0126yz1jxlrjfy9b4w5aflg7vgr0qq";
+ sha256 = "0j0l81jkjzd8n3ciqwxh8zxz945y594xjfsizp3cxjjfhj90aagj";
};
inherit python;
diff --git a/pkgs/applications/misc/dunst/default.nix b/pkgs/applications/misc/dunst/default.nix
index cb594e494db..1b61d75ddf2 100644
--- a/pkgs/applications/misc/dunst/default.nix
+++ b/pkgs/applications/misc/dunst/default.nix
@@ -5,7 +5,7 @@
stdenv.mkDerivation rec {
rev = "6a3a855b48a3db64821d1cf8a91c5ee2815a2b2d";
- name = "dunst-${rev}";
+ name = "dunst-0-${stdenv.lib.strings.substring 0 7 rev}";
# 1.0.0 release doesn't include 100% CPU fix
# https://github.com/knopwob/dunst/issues/98
diff --git a/pkgs/applications/misc/fbreader/default.nix b/pkgs/applications/misc/fbreader/default.nix
index fa361308ff1..612285c697c 100644
--- a/pkgs/applications/misc/fbreader/default.nix
+++ b/pkgs/applications/misc/fbreader/default.nix
@@ -25,10 +25,11 @@ stdenv.mkDerivation {
--replace "/usr/share" "$out/share"
'';
- meta = {
+ meta = with stdenv.lib; {
description = "An e-book reader for Linux";
homepage = http://www.fbreader.org/;
- license = "GPL";
- maintainer = [ stdenv.lib.maintainers.coroa ];
+ license = licenses.gpl3;
+ platforms = platforms.linux; # possibly also on unix general
+ maintainer = [ maintainers.coroa ];
};
}
diff --git a/pkgs/applications/misc/girara/default.nix b/pkgs/applications/misc/girara/default.nix
index e112427126a..7af8cbeccc6 100644
--- a/pkgs/applications/misc/girara/default.nix
+++ b/pkgs/applications/misc/girara/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, gtk, gettext }:
stdenv.mkDerivation rec {
- name = "girara-0.1.5";
+ name = "girara-0.1.9";
src = fetchurl {
url = "http://pwmt.org/projects/girara/download/${name}.tar.gz";
- sha256 = "1hfi3jmx8ydvrqm3h6p6py2csavh7xx0223vxyca51kjl9mfnbld";
+ sha256 = "1kd20dalnpy07hajv0rkmkbsym4bpfxh0gby7j2mvkvl5qr3vx70";
};
buildInputs = [ pkgconfig gtk gettext ];
diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix
new file mode 100644
index 00000000000..3c47e3bf8a8
--- /dev/null
+++ b/pkgs/applications/misc/gnuradio/default.nix
@@ -0,0 +1,76 @@
+{ stdenv, fetchurl
+# core dependencies
+, cmake, pkgconfig, git, boost, cppunit, fftw
+# python wrappers
+, python, swig2, numpy, scipy, matplotlib
+# grc - the gnu radio companion
+, cheetahTemplate, pygtk
+# gr-wavelet: collection of wavelet blocks
+, gsl
+# gr-qtgui: the Qt-based GUI
+, qt4, qwt, pyqt4 #, pyqwt
+# gr-wxgui: the Wx-based GUI
+, wxPython, lxml
+# gr-audio: audio subsystems (system/OS dependent)
+, alsaLib
+# uhd: the Ettus USRP Hardware Driver Interface
+, uhd
+# gr-video-sdl: PAL and NTSC display
+, SDL
+, libusb1, orc, pyopengl
+, makeWrapper }:
+
+stdenv.mkDerivation rec {
+ name = "gnuradio-${version}";
+ version = "3.7.1";
+
+ src = fetchurl {
+ url = "http://gnuradio.org/releases/gnuradio/${name}.tar.gz";
+ sha256 = "1kfni8vpgr6v9rdiz3zsmwc07qj6zka9x22z2y0y4rak2xnzdxz9";
+ };
+
+ buildInputs = [
+ cmake pkgconfig git boost cppunit fftw python swig2 orc lxml qt4 qwt
+ alsaLib SDL libusb1 uhd gsl makeWrapper
+ ];
+
+ propagatedBuildInputs = [
+ cheetahTemplate numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl
+ ];
+
+ preConfigure = ''
+ export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable"
+ '';
+
+ # - Ensure we get an interactive backend for matplotlib. If not the gr_plot_*
+ # programs will not display anything. Yes, $MATPLOTLIBRC must point to the
+ # *dirname* where matplotlibrc is located, not the file itself.
+ # - GNU Radio core is C++ but the user interface (GUI and API) is Python, so
+ # we must wrap the stuff in bin/.
+ postInstall = ''
+ printf "backend : Qt4Agg\n" > "$out/share/gnuradio/matplotlibrc"
+
+ for file in "$out"/bin/*; do
+ wrapProgram "$file" \
+ --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") \
+ --set MATPLOTLIBRC "$out/share/gnuradio"
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Software Defined Radio (SDR) software";
+ longDescription = ''
+ GNU Radio is a free & open-source software development toolkit that
+ provides signal processing blocks to implement software radios. It can be
+ used with readily-available low-cost external RF hardware to create
+ software-defined radios, or without hardware in a simulation-like
+ environment. It is widely used in hobbyist, academic and commercial
+ environments to support both wireless communications research and
+ real-world radio systems.
+ '';
+ homepage = http://www.gnuradio.org;
+ license = licenses.gpl3;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.bjornfor ];
+ };
+}
diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix
index baf97e7a824..b8bf0f38d10 100644
--- a/pkgs/applications/misc/ikiwiki/default.nix
+++ b/pkgs/applications/misc/ikiwiki/default.nix
@@ -23,7 +23,7 @@ assert mercurialSupport -> (mercurial != null);
let
name = "ikiwiki";
- version = "3.20130518";
+ version = "3.20130904.1";
lib = stdenv.lib;
in
@@ -32,7 +32,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://ftp.de.debian.org/debian/pool/main/i/ikiwiki/${name}_${version}.tar.gz";
- sha256 = "00mmxxlbzv6bz3cz3746r5lqwby6liwsg7m3jfba8258y52w13qp";
+ sha256 = "1nxycsz49y6801lbrvazzg7qc9q2vpr2ny1sba26f9gwc00c650h";
};
buildInputs = [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
diff --git a/pkgs/applications/misc/krename/default.nix b/pkgs/applications/misc/krename/default.nix
index e5af706d41c..75d8e5ecb89 100644
--- a/pkgs/applications/misc/krename/default.nix
+++ b/pkgs/applications/misc/krename/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, cmake, automoc4, kdelibs, taglib, exiv2, podofo, gettext, qt4, phonon }:
stdenv.mkDerivation rec {
- name = "krename-4.0.4";
+ name = "krename-4.0.9";
src = fetchurl {
url = "mirror://sourceforge/krename/${name}.tar.bz2";
- sha256 = "12qhclw1vbg5bv6619qd4408y8d1w26499gcr8gwhgfzk0v83hic";
+ sha256 = "11bdg5vdcs393n0aibhm3jh3wxlk5kz78jhkwf7cj9086qkg9wds";
};
buildInputs = [ cmake automoc4 kdelibs taglib exiv2 podofo gettext qt4 phonon ];
diff --git a/pkgs/applications/misc/mupdf/default.nix b/pkgs/applications/misc/mupdf/default.nix
index 220309a8e22..17b86910de0 100644
--- a/pkgs/applications/misc/mupdf/default.nix
+++ b/pkgs/applications/misc/mupdf/default.nix
@@ -10,8 +10,10 @@ stdenv.mkDerivation rec {
buildInputs = [ pkgconfig zlib freetype libjpeg jbig2dec openjpeg libX11 libXext ];
+ enableParallelBuilding = true;
+
preBuild = ''
- export makeFlags="prefix=$out"
+ export makeFlags="prefix=$out build=release"
export NIX_CFLAGS_COMPILE=" $NIX_CFLAGS_COMPILE -I$(echo ${openjpeg}/include/openjpeg-*) "
'';
diff --git a/pkgs/applications/misc/redshift/default.nix b/pkgs/applications/misc/redshift/default.nix
index 3bed6e1a2d7..ae983aedc67 100644
--- a/pkgs/applications/misc/redshift/default.nix
+++ b/pkgs/applications/misc/redshift/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/redshift-gtk" --prefix PYTHONPATH : $PYTHONPATH:${pygtk}/lib/${python.libPrefix}/site-packages/gtk-2.0:${pyxdg}/lib/${python.libPrefix}/site-packages/pyxdg:$out/lib/${python.libPrefix}/site-packages
'';
- meta = {
+ meta = with stdenv.lib; {
description = "changes the color temperature of your screen gradually";
longDescription = ''
The color temperature is set according to the position of the
@@ -39,5 +39,6 @@ stdenv.mkDerivation rec {
'';
license = "GPLv3+";
homepage = "http://jonls.dk/redshift";
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/misc/rxvt_unicode/default.nix b/pkgs/applications/misc/rxvt_unicode/default.nix
index c05dd028eb3..640ace40277 100644
--- a/pkgs/applications/misc/rxvt_unicode/default.nix
+++ b/pkgs/applications/misc/rxvt_unicode/default.nix
@@ -38,13 +38,6 @@ stdenv.mkDerivation (rec {
ln -s $out/{lib/urxvt,lib/perl5/site_perl}
'';
- # we link the separate terminfo output to the main output
- # as I don't think there's a usecase for wanting urxvt without its terminfo files
- # and we don't want users to install them separately
- postInstall = ''
- ln -s $terminfo/share/terminfo $out/share
- '';
-
meta = {
description = "A clone of the well-known terminal emulator rxvt";
homepage = "http://software.schmorp.de/pkg/rxvt-unicode.html";
diff --git a/pkgs/applications/misc/vifm/default.nix b/pkgs/applications/misc/vifm/default.nix
index 7230e84601e..4af565d717a 100644
--- a/pkgs/applications/misc/vifm/default.nix
+++ b/pkgs/applications/misc/vifm/default.nix
@@ -2,14 +2,14 @@
let
name = "vifm-${version}";
- version = "0.7.5";
+ version = "0.7.6";
in stdenv.mkDerivation {
inherit name;
src = fetchurl {
url="mirror://sourceforge/project/vifm/vifm/${name}.tar.bz2";
- sha256 ="1r1d92zrff94rfx011dw2qsgdwd2ksqlz15la74d6h7sfcsnyd01";
+ sha256 ="03v50hmgfvrci5fz31zmklmp6ix7qpqnhvm6639wbk3g5mcrh5w6";
};
#phaseNames = ["doConfigure" "doMakeInstall"];
diff --git a/pkgs/applications/misc/vue/default.nix b/pkgs/applications/misc/vue/default.nix
index c90e4d24f37..542f11f6e67 100644
--- a/pkgs/applications/misc/vue/default.nix
+++ b/pkgs/applications/misc/vue/default.nix
@@ -11,10 +11,10 @@ let
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
baseName="vue";
- version="3.1.2";
+ version="3.2.2";
name="${baseName}-${version}";
- url="http://releases.atech.tufts.edu/vue/v${version}/VUE_3_1_2.zip";
- hash="0ga98gnp4qhcrb31cb8j0mwbrh6ym6hr4k5y4blxvyfff9c0vq47";
+ url="releases.atech.tufts.edu/jenkins/job/VUE/64/deployedArtifacts/download/artifact.2";
+ hash="0sb1kgan8fvph2cqfxk3906cwx5wy83zni2vlz4zzi6yg4zvfxld";
};
in
rec {
@@ -30,9 +30,8 @@ rec {
phaseNames = ["doDeploy"];
doDeploy = a.fullDepEntry ''
- unzip ${src}
mkdir -p "$out"/{share/vue,bin}
- cp VUE.jar "$out/share/vue/vue.jar"
+ cp ${src} "$out/share/vue/vue.jar"
echo '#!${a.stdenv.shell}' >> "$out/bin/vue"
echo '${a.jre}/bin/java -jar "'"$out/share/vue/vue.jar"'" "$@"' >> "$out/bin/vue"
chmod a+x "$out/bin/vue"
diff --git a/pkgs/applications/misc/xmobar/default.nix b/pkgs/applications/misc/xmobar/default.nix
index 273998dde5d..7d4d2715d04 100644
--- a/pkgs/applications/misc/xmobar/default.nix
+++ b/pkgs/applications/misc/xmobar/default.nix
@@ -1,5 +1,5 @@
{ cabal, filepath, libXrandr, mtl, parsec, regexCompat, stm, time
-, utf8String, X11, X11Xft
+, utf8String, wirelesstools, X11, X11Xft
}:
cabal.mkDerivation (self: {
@@ -11,8 +11,8 @@ cabal.mkDerivation (self: {
buildDepends = [
filepath mtl parsec regexCompat stm time utf8String X11 X11Xft
];
- extraLibraries = [ libXrandr ];
- configureFlags = "-fwith_xft";
+ extraLibraries = [ libXrandr wirelesstools ];
+ configureFlags = "-fwith_xft -fwith_iwlib";
meta = {
homepage = "http://projects.haskell.org/xmobar/";
description = "A Minimalistic Text Based Status Bar";
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index e5eae771d8b..f3431f9480f 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -1,17 +1,15 @@
{ stdenv, fetchurl, pkgconfig, gtk, girara, gettext, docutils, file, makeWrapper }:
stdenv.mkDerivation rec {
-
- version = "0.2.2";
-
+ version = "0.2.5";
name = "zathura-core-${version}";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/download/zathura-${version}.tar.gz";
- sha256 = "1ja2j9ygymr259fxf02j1vkvalypac48gpadq8fn3qbclxxj61k5";
+ sha256 = "1lw9q0x4b7x6z86hwgs93f8srimd0sj8fwg91185f63yz9g800fr";
};
- buildInputs = [ pkgconfig gtk girara gettext makeWrapper ];
+ buildInputs = [ pkgconfig file gtk girara gettext makeWrapper ];
# Bug in zathura build system: we should remove empty manfiles in order them
# to be compiled properly
diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix
index 8bdc7865832..74288657fb3 100644
--- a/pkgs/applications/misc/zathura/default.nix
+++ b/pkgs/applications/misc/zathura/default.nix
@@ -3,13 +3,19 @@
rec {
inherit (pkgs) stdenv;
- zathura_core = callPackage ./core { };
+ zathura_core = callPackage ./core {
+ gtk = pkgs.gtk3;
+ };
zathura_pdf_poppler = callPackage ./pdf-poppler { };
- zathura_djvu = callPackage ./djvu { };
+ zathura_djvu = callPackage ./djvu {
+ gtk = pkgs.gtk3;
+ };
- zathura_ps = callPackage ./ps { };
+ zathura_ps = callPackage ./ps {
+ gtk = pkgs.gtk3;
+ };
zathuraWrapper = stdenv.mkDerivation {
diff --git a/pkgs/applications/misc/zathura/djvu/default.nix b/pkgs/applications/misc/zathura/djvu/default.nix
index 9486acfef65..1a2347f2727 100644
--- a/pkgs/applications/misc/zathura/djvu/default.nix
+++ b/pkgs/applications/misc/zathura/djvu/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, gtk, zathura_core, girara, djvulibre, gettext }:
stdenv.mkDerivation rec {
- name = "zathura-djvu-0.2.1";
+ name = "zathura-djvu-0.2.3";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
- sha256 = "d8bb3c9e30244a0733e49740ee2dd099ce39fa16f2c320af27a0c09d9a25bcc3";
+ sha256 = "12gd8kb0al5mknh4rlvxzgzwz3vhjggqjh8ws27phaq14paq4vn1";
};
buildInputs = [ pkgconfig djvulibre gettext zathura_core gtk girara ];
diff --git a/pkgs/applications/misc/zathura/pdf-poppler/default.nix b/pkgs/applications/misc/zathura/pdf-poppler/default.nix
index faf4e49b968..71c418f168c 100644
--- a/pkgs/applications/misc/zathura/pdf-poppler/default.nix
+++ b/pkgs/applications/misc/zathura/pdf-poppler/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, pkgconfig, zathura_core, girara, poppler, gettext }:
stdenv.mkDerivation rec {
- version = "0.2.2";
+ version = "0.2.4";
name = "zathura-pdf-poppler-${version}";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
- sha256 = "0px59f0bnmb9992n3c9iyzcwd6w7vg8ga069vc8qj4726ljml4c7";
+ sha256 = "1x1n21naixb87g1knznjfjfibazzwbn1cv7d42kxgwlnf1p1wbzm";
};
buildInputs = [ pkgconfig poppler gettext zathura_core girara ];
diff --git a/pkgs/applications/misc/zathura/ps/default.nix b/pkgs/applications/misc/zathura/ps/default.nix
index 7c0dd552a66..eef02001601 100644
--- a/pkgs/applications/misc/zathura/ps/default.nix
+++ b/pkgs/applications/misc/zathura/ps/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, gtk, zathura_core, girara, libspectre, gettext }:
stdenv.mkDerivation rec {
- name = "zathura-ps-0.2.0";
+ name = "zathura-ps-0.2.2";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
- sha256 = "717eda01213b162421b6b52f29d6b981edc302fddf351ccb2c093b6842751414";
+ sha256 = "1a6ps5v1wk18qvslbkjln6w8wfzzr6fi13ls96vbdc03vdhn4m76";
};
buildInputs = [ pkgconfig libspectre gettext zathura_core gtk girara ];
diff --git a/pkgs/applications/networking/bittorrentsync/default.nix b/pkgs/applications/networking/bittorrentsync/default.nix
index c2d2f28751a..895ebd7911b 100644
--- a/pkgs/applications/networking/bittorrentsync/default.nix
+++ b/pkgs/applications/networking/bittorrentsync/default.nix
@@ -14,9 +14,9 @@ let
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
- version = "1.1.70";
- sha256 = if stdenv.system == "x86_64-linux" then "1hnyncq5439fxn1q8dkzcg2alxjkanr4q4pgqqf3nngz4cdar5vi"
- else if stdenv.system == "i686-linux" then "1ijdmzl8bnb4k99vrjn5gd31hy64p9wiyxw5wc5gbpgap191h5i5"
+ version = "1.2.82";
+ sha256 = if stdenv.system == "x86_64-linux" then "0cqrscav57xwz7rag6wy06xw6z7ca97xailprgg6jdjv4pnc91ra"
+ else if stdenv.system == "i686-linux" then "1b9rnfk0wkhj1zybvfqwgd9dcqnxwdnp7m0vf6lhrgi75cydj7is"
else throw "Bittorrent Sync for: ${stdenv.system} not supported!";
in stdenv.mkDerivation {
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index fa91a877fdc..87cdf673041 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -46,16 +46,17 @@ let
prePatch = "patchShebangs .";
- patches = singleton (
- if versionOlder version "31.0.0.0"
- then ./sandbox_userns_30.patch
- else ./sandbox_userns_31.patch
- );
+ patches = singleton ./sandbox_userns_31.patch;
postPatch = ''
sed -i -r -e 's/-f(stack-protector)(-all)?/-fno-\1/' build/common.gypi
+ '' + (if versionOlder version "32.0.0.0" then ''
sed -i -e 's|/usr/bin/gcc|gcc|' third_party/WebKit/Source/core/core.gypi
- '' + optionalString useOpenSSL ''
+ '' else ''
+ sed -i -e 's|/usr/bin/gcc|gcc|' \
+ third_party/WebKit/Source/build/scripts/scripts.gypi \
+ third_party/WebKit/Source/build/scripts/preprocessor.pm
+ '') + optionalString useOpenSSL ''
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
'';
diff --git a/pkgs/applications/networking/browsers/chromium/sandbox_userns_30.patch b/pkgs/applications/networking/browsers/chromium/sandbox_userns_30.patch
deleted file mode 100644
index 9a412352c52..00000000000
--- a/pkgs/applications/networking/browsers/chromium/sandbox_userns_30.patch
+++ /dev/null
@@ -1,293 +0,0 @@
-commit 41510de6ae32e6161073992bd1243f7f33148a06
-Author: aszlig
-Date: Thu May 16 14:17:56 2013 +0200
-
- zygote: Add support for user namespaces on Linux.
-
- The implementation is done by patching the Zygote host to execute the sandbox
- binary with CLONE_NEWUSER and setting the uid and gid mapping so that the child
- process is using uid 0 and gid 0 which map to the current user of the parent.
- Afterwards, the sandbox will continue as if it was called as a setuid binary.
-
- In addition, this adds new_user_namespace as an option in process_util in order
- to set the UID and GID mapping correctly. The reason for this is that just
- passing CLONE_NEWUSER to clone_flags doesn't help in LaunchProcess(), because
- without setting the mappings exec*() will clear the process's capability sets.
-
- If the kernel doesn't support unprivileged user namespaces and the sandbox
- binary doesn't have the setuid flag, the Zygote main process will run without a
- sandbox. This is to mimic the behaviour if no SUID sandbox binary path is set.
-
- Signed-off-by: aszlig
-
-diff --git a/base/process/launch.h b/base/process/launch.h
-index 45b1053..ce71418 100644
---- a/base/process/launch.h
-+++ b/base/process/launch.h
-@@ -51,6 +51,7 @@ struct LaunchOptions {
- new_process_group(false)
- #if defined(OS_LINUX)
- , clone_flags(0)
-+ , new_user_namespace(false)
- #endif // OS_LINUX
- #if defined(OS_CHROMEOS)
- , ctrl_terminal_fd(-1)
-@@ -125,6 +126,9 @@ struct LaunchOptions {
- #if defined(OS_LINUX)
- // If non-zero, start the process using clone(), using flags as provided.
- int clone_flags;
-+
-+ // If true, start the process in a new user namespace.
-+ bool new_user_namespace;
- #endif // defined(OS_LINUX)
-
- #if defined(OS_CHROMEOS)
-diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
-index 52e149c..312f835 100644
---- a/base/process/launch_posix.cc
-+++ b/base/process/launch_posix.cc
-@@ -37,6 +37,13 @@
- #include "base/threading/platform_thread.h"
- #include "base/threading/thread_restrictions.h"
-
-+#if defined(OS_LINUX)
-+#include
-+#if !defined(CLONE_NEWUSER)
-+#define CLONE_NEWUSER 0x10000000
-+#endif
-+#endif
-+
- #if defined(OS_CHROMEOS)
- #include
- #endif
-@@ -416,13 +423,23 @@ bool LaunchProcess(const std::vector& argv,
-
- pid_t pid;
- #if defined(OS_LINUX)
-- if (options.clone_flags) {
-+ int map_pipe_fd[2];
-+ int flags = options.clone_flags;
-+
-+ if (options.new_user_namespace) {
-+ flags |= CLONE_NEWUSER;
-+ if (pipe(map_pipe_fd) < 0) {
-+ DPLOG(ERROR) << "user namespace pipe";
-+ return false;
-+ }
-+ }
-+
-+ if (options.clone_flags || options.new_user_namespace) {
- // Signal handling in this function assumes the creation of a new
- // process, so we check that a thread is not being created by mistake
- // and that signal handling follows the process-creation rules.
-- RAW_CHECK(
-- !(options.clone_flags & (CLONE_SIGHAND | CLONE_THREAD | CLONE_VM)));
-- pid = syscall(__NR_clone, options.clone_flags, 0, 0, 0);
-+ RAW_CHECK(!(flags & (CLONE_SIGHAND | CLONE_THREAD | CLONE_VM)));
-+ pid = syscall(__NR_clone, flags, 0, 0, 0);
- } else
- #endif
- {
-@@ -440,6 +457,21 @@ bool LaunchProcess(const std::vector& argv,
- } else if (pid == 0) {
- // Child process
-
-+#if defined(OS_LINUX)
-+ if (options.new_user_namespace) {
-+ // Close the write end of the pipe so we get an EOF when the parent closes
-+ // the FD. This is to avoid race conditions when the UID/GID mappings are
-+ // written _after_ execvp().
-+ close(map_pipe_fd[1]);
-+
-+ char dummy;
-+ if (HANDLE_EINTR(read(map_pipe_fd[0], &dummy, 1)) != 0) {
-+ RAW_LOG(ERROR, "Unexpected input in uid/gid mapping pipe.");
-+ _exit(127);
-+ }
-+ }
-+#endif
-+
- // DANGER: fork() rule: in the child, if you don't end up doing exec*(),
- // you call _exit() instead of exit(). This is because _exit() does not
- // call any previously-registered (in the parent) exit handlers, which
-@@ -555,6 +587,40 @@ bool LaunchProcess(const std::vector& argv,
- _exit(127);
- } else {
- // Parent process
-+#if defined(OS_LINUX)
-+ if (options.new_user_namespace) {
-+ // We need to write UID/GID mapping here to map the current user outside
-+ // the namespace to the root user inside the namespace in order to
-+ // correctly "fool" the child process.
-+ char buf[256];
-+ int map_fd, map_len;
-+
-+ snprintf(buf, sizeof(buf), "/proc/%d/uid_map", pid);
-+ map_fd = open(buf, O_RDWR);
-+ DPCHECK(map_fd >= 0);
-+ snprintf(buf, sizeof(buf), "0 %d 1", geteuid());
-+ map_len = strlen(buf);
-+ if (write(map_fd, buf, map_len) != map_len) {
-+ RAW_LOG(WARNING, "Can't write to uid_map.");
-+ }
-+ close(map_fd);
-+
-+ snprintf(buf, sizeof(buf), "/proc/%d/gid_map", pid);
-+ map_fd = open(buf, O_RDWR);
-+ DPCHECK(map_fd >= 0);
-+ snprintf(buf, sizeof(buf), "0 %d 1", getegid());
-+ map_len = strlen(buf);
-+ if (write(map_fd, buf, map_len) != map_len) {
-+ RAW_LOG(WARNING, "Can't write to gid_map.");
-+ }
-+ close(map_fd);
-+
-+ // Close the pipe on the parent, so the child can continue doing the
-+ // execvp() call.
-+ close(map_pipe_fd[1]);
-+ }
-+#endif
-+
- if (options.wait) {
- // While this isn't strictly disk IO, waiting for another process to
- // finish is the sort of thing ThreadRestrictions is trying to prevent.
-diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
-index bb84e62..bce0d18 100644
---- a/content/browser/zygote_host/zygote_host_impl_linux.cc
-+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
-@@ -119,25 +119,31 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
-
- sandbox_binary_ = sandbox_cmd.c_str();
-
-- // A non empty sandbox_cmd means we want a SUID sandbox.
-- using_suid_sandbox_ = !sandbox_cmd.empty();
-+ bool userns_sandbox = false;
-+ const std::vector cmd_line_unwrapped(cmd_line.argv());
-
-- if (using_suid_sandbox_) {
-+ if (!sandbox_cmd.empty()) {
- struct stat st;
- if (stat(sandbox_binary_.c_str(), &st) != 0) {
- LOG(FATAL) << "The SUID sandbox helper binary is missing: "
- << sandbox_binary_ << " Aborting now.";
- }
-
-- if (access(sandbox_binary_.c_str(), X_OK) == 0 &&
-- (st.st_uid == 0) &&
-- (st.st_mode & S_ISUID) &&
-- (st.st_mode & S_IXOTH)) {
-+ if (access(sandbox_binary_.c_str(), X_OK) == 0) {
-+ using_suid_sandbox_ = true;
-+
- cmd_line.PrependWrapper(sandbox_binary_);
-
- scoped_ptr
- sandbox_client(sandbox::SetuidSandboxClient::Create());
- sandbox_client->SetupLaunchEnvironment();
-+
-+ if (!((st.st_uid == 0) &&
-+ (st.st_mode & S_ISUID) &&
-+ (st.st_mode & S_IXOTH))) {
-+ userns_sandbox = true;
-+ sandbox_client->SetNoSuid();
-+ }
- } else {
- LOG(FATAL) << "The SUID sandbox helper binary was found, but is not "
- "configured correctly. Rather than run without sandboxing "
-@@ -161,7 +167,19 @@ void ZygoteHostImpl::Init(const std::string& sandbox_cmd) {
- base::ProcessHandle process = -1;
- base::LaunchOptions options;
- options.fds_to_remap = &fds_to_map;
-+ if (userns_sandbox)
-+ options.new_user_namespace = true;
- base::LaunchProcess(cmd_line.argv(), options, &process);
-+
-+ if (process == -1 && userns_sandbox) {
-+ LOG(ERROR) << "User namespace sandbox failed to start, running without "
-+ << "sandbox! You need at least kernel 3.8.0 with CONFIG_USER_NS "
-+ << "enabled in order to use the sandbox without setuid bit.";
-+ using_suid_sandbox_ = false;
-+ options.new_user_namespace = false;
-+ base::LaunchProcess(cmd_line_unwrapped, options, &process);
-+ }
-+
- CHECK(process != -1) << "Failed to launch zygote process";
-
- if (using_suid_sandbox_) {
-diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc
-index 1f0e9f5..ade5aab 100644
---- a/content/zygote/zygote_main_linux.cc
-+++ b/content/zygote/zygote_main_linux.cc
-@@ -420,6 +420,13 @@ static bool EnterSandbox(sandbox::SetuidSandboxClient* setuid_sandbox,
- *has_started_new_init = true;
- }
-
-+ // Don't set non-dumpable, as it causes trouble when the host tries to find
-+ // the zygote process (XXX: Not quite sure why this happens with user
-+ // namespaces). Fortunately, we also have the seccomp filter sandbox which
-+ // should disallow the use of ptrace.
-+ if (setuid_sandbox->IsNoSuid())
-+ return true;
-+
- #if !defined(OS_OPENBSD)
- // Previously, we required that the binary be non-readable. This causes the
- // kernel to mark the process as non-dumpable at startup. The thinking was
-diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.cc b/sandbox/linux/suid/client/setuid_sandbox_client.cc
-index 34231d4..36e3201 100644
---- a/sandbox/linux/suid/client/setuid_sandbox_client.cc
-+++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc
-@@ -166,6 +166,10 @@ bool SetuidSandboxClient::IsInNewNETNamespace() const {
- return env_->HasVar(kSandboxNETNSEnvironmentVarName);
- }
-
-+bool SetuidSandboxClient::IsNoSuid() const {
-+ return env_->HasVar(kSandboxNoSuidVarName);
-+}
-+
- bool SetuidSandboxClient::IsSandboxed() const {
- return sandboxed_;
- }
-@@ -175,5 +179,9 @@ void SetuidSandboxClient::SetupLaunchEnvironment() {
- SetSandboxAPIEnvironmentVariable(env_);
- }
-
-+void SetuidSandboxClient::SetNoSuid() {
-+ env_->SetVar(kSandboxNoSuidVarName, "1");
-+}
-+
- } // namespace sandbox
-
-diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.h b/sandbox/linux/suid/client/setuid_sandbox_client.h
-index a9f6536..2e8113a 100644
---- a/sandbox/linux/suid/client/setuid_sandbox_client.h
-+++ b/sandbox/linux/suid/client/setuid_sandbox_client.h
-@@ -39,6 +39,8 @@ class SetuidSandboxClient {
- bool IsInNewPIDNamespace() const;
- // Did the setuid helper create a new network namespace ?
- bool IsInNewNETNamespace() const;
-+ // Is sandboxed without SUID binary ?
-+ bool IsNoSuid() const;
- // Are we done and fully sandboxed ?
- bool IsSandboxed() const;
-
-@@ -46,6 +48,8 @@ class SetuidSandboxClient {
- // helper.
- void SetupLaunchEnvironment();
-
-+ void SetNoSuid();
-+
- private:
- // Holds the environment. Will never be NULL.
- base::Environment* env_;
-diff --git a/sandbox/linux/suid/common/sandbox.h b/sandbox/linux/suid/common/sandbox.h
-index aad4ff8..bd710d5 100644
---- a/sandbox/linux/suid/common/sandbox.h
-+++ b/sandbox/linux/suid/common/sandbox.h
-@@ -18,6 +18,7 @@ static const char kAdjustLowMemMarginSwitch[] = "--adjust-low-mem";
-
- static const char kSandboxDescriptorEnvironmentVarName[] = "SBX_D";
- static const char kSandboxHelperPidEnvironmentVarName[] = "SBX_HELPER_PID";
-+static const char kSandboxNoSuidVarName[] = "SBX_NO_SUID";
-
- static const long kSUIDSandboxApiNumber = 1;
- static const char kSandboxEnvironmentApiRequest[] = "SBX_CHROME_API_RQ";
diff --git a/pkgs/applications/networking/browsers/chromium/sources.nix b/pkgs/applications/networking/browsers/chromium/sources.nix
index aae71e8dfb6..8ee5752f4ac 100644
--- a/pkgs/applications/networking/browsers/chromium/sources.nix
+++ b/pkgs/applications/networking/browsers/chromium/sources.nix
@@ -1,18 +1,18 @@
# This file is autogenerated from update.sh in the same directory.
{
dev = {
- version = "32.0.1671.3";
- url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-32.0.1671.3.tar.xz";
- sha256 = "0bv86ig3mrd95zh78880bcyh9b8w46s7slxq3mwwmrmqp0s8qaq0";
+ version = "33.0.1712.4";
+ url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-33.0.1712.4.tar.xz";
+ sha256 = "1c1m0y3nnz2lclqi21j6hgqmb46p1hv7c22zz9fn7dax7jkimydk";
};
beta = {
- version = "31.0.1650.34";
- url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-31.0.1650.34.tar.xz";
- sha256 = "0c73kvp09cmq4x42rcf45v0mnbyb8rcyi5i4pj0pvfn451vbngdq";
+ version = "32.0.1700.19";
+ url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-32.0.1700.19.tar.xz";
+ sha256 = "0d0kgy160pyg472ka43gxk7n09pqhhs9nd93jyxrp9qsyllfc425";
};
stable = {
- version = "30.0.1599.114";
- url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-30.0.1599.114.tar.xz";
- sha256 = "0q5pq8bj4y0c7hd121db1fa9g3apkpkhb6cf14ag7abgrda2pzw2";
+ version = "31.0.1650.57";
+ url = "http://commondatastorage.googleapis.com/chromium-browser-official/chromium-31.0.1650.57.tar.xz";
+ sha256 = "1xv7frf47hhvqm6f3n2l308yfrs4d8ri70q6pndx7hslhyiixzl9";
};
}
diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix
index 45606c9af82..1f37911b832 100644
--- a/pkgs/applications/networking/browsers/firefox/default.nix
+++ b/pkgs/applications/networking/browsers/firefox/default.nix
@@ -15,12 +15,11 @@
assert stdenv.gcc ? libc && stdenv.gcc.libc != null;
-let optional = stdenv.lib.optional;
-in rec {
+rec {
- firefoxVersion = "25.0";
+ firefoxVersion = "25.0.1";
- xulVersion = "25.0"; # this attribute is used by other packages
+ xulVersion = "25.0.1"; # this attribute is used by other packages
src = fetchurl {
@@ -30,7 +29,7 @@ in rec {
# Fall back to this url for versions not available at releases.mozilla.org.
"http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${firefoxVersion}/source/firefox-${firefoxVersion}.source.tar.bz2"
];
- sha1 = "854722e283659d2b6b2eacd38f757b3c5b63a448";
+ sha1 = "592ebd242c4839ef0e18707a7e959d8bed2a98f3";
};
commonConfigureFlags =
diff --git a/pkgs/applications/networking/browsers/icecat-3/default.nix b/pkgs/applications/networking/browsers/icecat-3/default.nix
index 7e181669cd1..84269a290e9 100644
--- a/pkgs/applications/networking/browsers/icecat-3/default.nix
+++ b/pkgs/applications/networking/browsers/icecat-3/default.nix
@@ -114,5 +114,6 @@ stdenv.mkDerivation {
passthru = {
inherit gtk version;
isFirefox3Like = true;
+ broken = true;
};
}
diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
index 0363176257f..d4d95f7e5b9 100644
--- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
+++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer-11/default.nix
@@ -44,9 +44,9 @@ let
throw "no x86_64 debugging version available"
else rec {
# -> http://labs.adobe.com/downloads/flashplayer10.html
- version = "11.2.202.297";
+ version = "11.2.202.310";
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
- sha256 = "0jfigq56p6zp61pmc4jl12p8gv2jhfmim18j1b30iikw3iv26lh8";
+ sha256 = "03r9r7h3l4i15hw62k9il6pjzq122nldbgxr37b4y10xp08a9izj";
}
else if stdenv.system == "i686-linux" then
if debug then {
@@ -55,9 +55,9 @@ let
url = http://fpdownload.macromedia.com/pub/flashplayer/updaters/11/flashplayer_11_plugin_debug.i386.tar.gz;
sha256 = "1z3649lv9sh7jnwl8d90a293nkaswagj2ynhsr4xmwiy7c0jz2lk";
} else rec {
- version = "11.2.202.297";
+ version = "11.2.202.310";
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
- sha256 = "0mpj25b2ar7gccqmw5lffdzlr3yyfalphpgwnl18s05wy1fx484y";
+ sha256 = "0qf09p92silp81pjfcg2vcfcfi1padizmb58q5iaarnapgkawlbh";
}
else throw "Flash Player is not supported on this platform";
diff --git a/pkgs/applications/networking/browsers/netsurf/haru.nix b/pkgs/applications/networking/browsers/netsurf/haru.nix
index 883cf94b06f..47f0c2f6455 100644
--- a/pkgs/applications/networking/browsers/netsurf/haru.nix
+++ b/pkgs/applications/networking/browsers/netsurf/haru.nix
@@ -21,5 +21,6 @@ stdenv.mkDerivation {
license = "ZLIB/LIBPNG"; # see README.
maintainers = [args.lib.maintainers.marcweber];
platforms = args.lib.platforms.linux;
+ broken = true;
};
}
diff --git a/pkgs/applications/networking/browsers/netsurf/libParserUtils.nix b/pkgs/applications/networking/browsers/netsurf/libParserUtils.nix
index 8ee8518c531..fec93c39ab9 100644
--- a/pkgs/applications/networking/browsers/netsurf/libParserUtils.nix
+++ b/pkgs/applications/networking/browsers/netsurf/libParserUtils.nix
@@ -16,5 +16,6 @@ stdenv.mkDerivation {
license = "MIT";
maintainers = [args.lib.maintainers.marcweber];
platforms = args.lib.platforms.linux;
+ broken = true;
};
}
diff --git a/pkgs/applications/networking/browsers/netsurf/libnsgif.nix b/pkgs/applications/networking/browsers/netsurf/libnsgif.nix
index 63ae2ef86d4..5894e5c1c03 100644
--- a/pkgs/applications/networking/browsers/netsurf/libnsgif.nix
+++ b/pkgs/applications/networking/browsers/netsurf/libnsgif.nix
@@ -16,5 +16,6 @@ stdenv.mkDerivation {
license = "MIT";
maintainers = [args.lib.maintainers.marcweber];
platforms = args.lib.platforms.linux;
+ broken = true;
};
}
diff --git a/pkgs/applications/networking/dropbox/default.nix b/pkgs/applications/networking/dropbox/default.nix
index 99589a3d71b..17703b2b3fc 100644
--- a/pkgs/applications/networking/dropbox/default.nix
+++ b/pkgs/applications/networking/dropbox/default.nix
@@ -25,9 +25,9 @@ let
else if stdenv.system == "i686-linux" then "ld-linux.so.2"
else throw "Dropbox client for: ${stdenv.system} not supported!";
- version = "2.4.3";
- sha256 = if stdenv.system == "x86_64-linux" then "0g8iqgc18qbw8fvdjf0fhbal34rvwr5izrf5acfzqjg99dgih81r"
- else if stdenv.system == "i686-linux" then "1nhmk319whj6cil6wg9hrfln9bxin3fnf6sxb0zg2ycfpnnqi0la"
+ version = "2.4.7";
+ sha256 = if stdenv.system == "x86_64-linux" then "08fh0zx9q83dvivnbx5zr1cwb69ihhlx9mkbd3ikynk1wd8df8n8"
+ else if stdenv.system == "i686-linux" then "0rhblpahg2axglpi8iavsglffw83rj71qy113wj2dh6q72124j2h"
else throw "Dropbox client for: ${stdenv.system} not supported!";
# relative location where the dropbox libraries are stored
diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/default.nix b/pkgs/applications/networking/feedreaders/newsbeuter/default.nix
index 3bca5cc91da..029a6f8e633 100644
--- a/pkgs/applications/networking/feedreaders/newsbeuter/default.nix
+++ b/pkgs/applications/networking/feedreaders/newsbeuter/default.nix
@@ -2,11 +2,11 @@
, gettext, libiconvOrEmpty, makeWrapper, perl }:
stdenv.mkDerivation rec {
- name = "newsbeuter-2.6";
+ name = "newsbeuter-2.7";
src = fetchurl {
url = "http://www.newsbeuter.org/downloads/${name}.tar.gz";
- sha256 = "1hywz5206k0ykjklkjvnfy9fm4jfv9phz8dkzzwhfcjvqv9zv29i";
+ sha256 = "0flhzzlbdirjmrq738gmcxqqnifg3kb7plcwqcxshpizmjkhswp6";
};
buildInputs
diff --git a/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
new file mode 100644
index 00000000000..17e97d92b89
--- /dev/null
+++ b/pkgs/applications/networking/feedreaders/newsbeuter/dev.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchgit, sqlite, curl, pkgconfig, libxml2, stfl, json-c-0-11, ncurses
+, gettext, libiconvOrEmpty, makeWrapper, perl }:
+
+stdenv.mkDerivation rec {
+ name = "newsbeuter-dev-20131118";
+
+ src = fetchgit {
+ url = "https://github.com/akrennmair/newsbeuter.git";
+ rev = "18b73f7d44a99a698d4878fe7d226f55842132c2";
+ };
+
+ buildInputs
+ # use gettext instead of libintlOrEmpty so we have access to the msgfmt
+ # command
+ = [ pkgconfig sqlite curl libxml2 stfl json-c-0-11 ncurses gettext perl ]
+ ++ libiconvOrEmpty
+ ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
+
+ preBuild = ''
+ sed -i -e 104,108d config.sh
+ sed -i "1 s%^.*$%#!${perl}/bin/perl%" txt2h.pl
+ export LDFLAGS=-lncursesw
+ '';
+
+ NIX_CFLAGS_COMPILE =
+ "-I${libxml2}/include/libxml2 -I${json-c-0-11}/include/json-c";
+
+ NIX_LDFLAGS = "-lsqlite3 -lcurl -lxml2 -lstfl -ljson";
+
+ installPhase = ''
+ DESTDIR=$out prefix=\"\" make install
+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
+ for prog in $out/bin/*; do
+ wrapProgram "$prog" --prefix DYLD_LIBRARY_PATH : "${stfl}/lib"
+ done
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = http://www.newsbeuter.org;
+ description = "An open-source RSS/Atom feed reader for text terminals";
+ maintainers = with maintainers; [ lovek323 ];
+ license = licenses.mit;
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/applications/networking/ftp/filezilla/default.nix b/pkgs/applications/networking/ftp/filezilla/default.nix
index 24fdd105341..b7c9a76e151 100644
--- a/pkgs/applications/networking/ftp/filezilla/default.nix
+++ b/pkgs/applications/networking/ftp/filezilla/default.nix
@@ -1,30 +1,33 @@
-{ stdenv, fetchurl, dbus, gnutls2, wxGTK28, libidn, tinyxml, gettext, pkgconfig, xdg_utils, gtk2, sqlite }:
+{ stdenv, fetchurl, dbus, gnutls2, wxGTK28, libidn, tinyxml, gettext
+, pkgconfig, xdg_utils, gtk2, sqlite }:
-let version = "3.6.0.2"; in
+let version = "3.7.3"; in
stdenv.mkDerivation {
name = "filezilla-${version}";
src = fetchurl {
url = "mirror://sourceforge/project/filezilla/FileZilla_Client/${version}/FileZilla_${version}_src.tar.bz2";
- sha256 = "01n6k1q21i21451rdx3rgc4hhxghdn5b0ldzpjsp44ipgww5wsjk";
+ sha256 = "0hn043jjb7qh040dgyhffp9jrrmca1xxbc998vyqyg83lrq2j09b";
};
configureFlags = [
"--disable-manualupdatecheck"
];
- buildInputs = [ dbus gnutls2 wxGTK28 libidn tinyxml gettext pkgconfig xdg_utils gtk2 sqlite ];
+ buildInputs = [
+ dbus gnutls2 wxGTK28 libidn tinyxml gettext pkgconfig xdg_utils gtk2 sqlite
+ ];
- meta = {
+ meta = with stdenv.lib; {
homepage = "http://filezilla-project.org/";
description = "Graphical FTP, FTPS and SFTP client";
- license = "GPLv2";
-
+ license = licenses.gpl2;
longDescription = ''
FileZilla Client is a free, open source FTP client. It supports
FTP, SFTP, and FTPS (FTP over SSL/TLS). The client is available
under many platforms, binaries for Windows, Linux and Mac OS X are
provided.
'';
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/networking/instant-messengers/fuze/default.nix b/pkgs/applications/networking/instant-messengers/fuze/default.nix
new file mode 100644
index 00000000000..9ccada87fe2
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/fuze/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchurl, dpkg, openssl, alsaLib, libXext, libXfixes, libXrandr
+, libjpeg, curl, libX11, libXmu, libXv, libXtst, qt4, mesa, zlib
+, gnome, libidn, rtmpdump, c-ares, openldap, makeWrapper, cacert
+}:
+assert stdenv.system == "x86_64-linux";
+let
+ curl_custom =
+ stdenv.lib.overrideDerivation curl (args: {
+ configureFlags = args.configureFlags ++ ["--with-ca-bundle=${cacert}/etc/ca-bundle.crt"] ;
+ } );
+in
+stdenv.mkDerivation {
+ name = "fuze-1.0.5";
+ src = fetchurl {
+ url = http://apt.fuzebox.com/apt/pool/lucid/main/f/fuzelinuxclient/fuzelinuxclient_1.0.5.lucid_amd64.deb;
+ sha256 = "0gvxc8qj526cigr1lif8vdn1aawj621camkc8kvps23r7zijhnqv";
+ };
+ buildInputs = [ dpkg makeWrapper ];
+ libPath =
+ stdenv.lib.makeLibraryPath [
+ openssl alsaLib libXext libXfixes libXrandr libjpeg curl_custom
+ libX11 libXmu libXv qt4 libXtst mesa stdenv.gcc.gcc zlib
+ gnome.GConf libidn rtmpdump c-ares openldap
+ ];
+ buildCommand = ''
+ dpkg-deb -x $src .
+ mkdir -p $out/lib $out/bin
+ cp -R usr/lib/fuzebox $out/lib
+
+ patchelf \
+ --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+ --set-rpath $out/lib/fuzebox:$libPath \
+ $out/lib/fuzebox/FuzeLinuxApp
+
+ wrapProgram $out/lib/fuzebox/FuzeLinuxApp --prefix LD_LIBRARY_PATH : $libPath
+ for f in $out/lib/fuzebox/*.so.*; do
+ patchelf \
+ --set-rpath $out/lib/fuzebox:$libPath \
+ $f
+ done
+
+ ln -s ${openssl}/lib/libssl.so.1.0.0 $out/lib/fuzebox/libssl.so.0.9.8
+ ln -s ${openssl}/lib/libcrypto.so.1.0.0 $out/lib/fuzebox/libcrypto.so.0.9.8
+
+ ln -s $out/lib/fuzebox/FuzeLinuxApp $out/bin/fuze
+ '';
+
+ meta = {
+ description = "Fuze for Linux";
+ homepage = http://www.fuzebox.com;
+ license = "unknown";
+ };
+}
diff --git a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
index 108e549d01f..f3a88dee2cf 100644
--- a/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
+++ b/pkgs/applications/networking/instant-messengers/teamspeak/client.nix
@@ -1,23 +1,34 @@
-{ stdenv, fetchurl, zlib, glib, libpng, freetype, xorg, fontconfig, alsaLib }:
+{ stdenv, fetchurl, zlib, glib, libpng, freetype, xorg, fontconfig, alsaLib,
+ qt4, pulseaudio ? null }:
let
+ version = "3.0.13.1";
+
+ arch = if stdenv.is64bit then "amd64" else "x86";
+
libDir = if stdenv.is64bit then "lib64" else "lib";
deps =
[ zlib glib libpng freetype xorg.libSM xorg.libICE xorg.libXrender
xorg.libXrandr xorg.libXfixes xorg.libXcursor xorg.libXinerama
- fontconfig xorg.libXext xorg.libX11 alsaLib
+ fontconfig xorg.libXext xorg.libX11 alsaLib qt4 pulseaudio
];
in
stdenv.mkDerivation {
- name = "teamspeak-client-3.0.0-beta35";
+ name = "teamspeak-client-${version}";
src = fetchurl {
- url = http://ftp.4players.de/pub/hosted/ts3/releases/beta-35/TeamSpeak3-Client-linux_amd64-3.0.0-beta35.run;
- sha256 = "0vygsvjs11lr5lv4x7awv7hvkycvmm9qs2vklfjs91w3f434cmrx";
+ urls = [
+ "http://dl.4players.de/ts/releases/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run"
+ "http://teamspeak.gameserver.gamed.de/ts3/releases/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run"
+ "http://files.teamspeak-services.com/releases/${version}/TeamSpeak3-Client-linux_${arch}-${version}.run"
+ ];
+ sha256 = if stdenv.is64bit
+ then "0mj8vpsnv906n3wgjwhiby5gk26jr5jbd94swmsf0s9kqwhsj6i1"
+ else "1hlw7lc0nl1mrsyd052s6ws64q5aabnw6qpv8mrdxb3hyp7g2qh1";
};
unpackPhase =
@@ -28,22 +39,27 @@ stdenv.mkDerivation {
buildPhase =
''
- ls -l
- for i in ts3client_linux_*; do
- echo "patching $i..."
- patchelf \
- --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
- --set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_GCC/nix-support/orig-gcc)/${libDir} \
- --force-rpath \
- $i
- done
+ mv ts3client_linux_${arch} ts3client
+ echo "patching ts3client..."
+ patchelf \
+ --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+ --set-rpath ${stdenv.lib.makeLibraryPath deps}:$(cat $NIX_GCC/nix-support/orig-gcc)/${libDir} \
+ --force-rpath \
+ ts3client
'';
-
installPhase =
''
+ # Delete unecessary libraries - these are provided by nixos.
+ rm *.so.*
+
+ # Install files.
mkdir -p $out/lib/teamspeak
mv * $out/lib/teamspeak/
+
+ # Make a symlink to the binary from bin.
+ mkdir -p $out/bin/
+ ln -s $out/lib/teamspeak/ts3client $out/bin/ts3client
'';
dontStrip = true;
@@ -53,6 +69,7 @@ stdenv.mkDerivation {
description = "The TeamSpeak voice communication tool";
homepage = http://teamspeak.com/;
license = "http://www.teamspeak.com/?page=downloads&type=ts3_linux_client_latest";
+ platforms = stdenv.lib.platforms.linux;
};
}
diff --git a/pkgs/applications/networking/instant-messengers/toxic/default.nix b/pkgs/applications/networking/instant-messengers/toxic/default.nix
index c2af1274a24..59aef8c6c43 100644
--- a/pkgs/applications/networking/instant-messengers/toxic/default.nix
+++ b/pkgs/applications/networking/instant-messengers/toxic/default.nix
@@ -2,8 +2,8 @@
, libtoxcore, pkgconfig }:
let
- version = "75d356e52a";
- date = "20131011";
+ version = "5570b7c98aa";
+ date = "20131112";
in
stdenv.mkDerivation rec {
name = "toxic-${date}-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/Tox/toxic/tarball/${version}";
name = "${name}.tar.gz";
- sha256 = "14wyvms8l07sl88g8y6g2jv95sq7cnhbaqf4n32xxilch8rymq47";
+ sha256 = "02jfdp10qcw4w62qpra59m9yzzk7a3k2nypkbq5q7ydksbqlx8sj";
};
preConfigure = ''
diff --git a/pkgs/applications/networking/irc/quassel/default.nix b/pkgs/applications/networking/irc/quassel/default.nix
index 67ff1ca02c4..44792693b36 100644
--- a/pkgs/applications/networking/irc/quassel/default.nix
+++ b/pkgs/applications/networking/irc/quassel/default.nix
@@ -11,11 +11,11 @@ let
in with stdenv; mkDerivation rec {
- name = "quassel-0.9.0";
+ name = "quassel-0.9.2";
src = fetchurl {
url = "http://quassel-irc.org/pub/${name}.tar.bz2";
- sha256 = "09v0igjkzan3hllk47w39hkav6v1419vpxn2lfd8473kwdmf0grf";
+ sha256 = "1h2kzi4pgfv3qmvhxix9fffdjixs3bsya0i5c18dkh894mh02kgh";
};
buildInputs = [ cmake qt4 ]
diff --git a/pkgs/applications/networking/jmeter/default.nix b/pkgs/applications/networking/jmeter/default.nix
index c3212f6aa56..ddb7b63fc6f 100644
--- a/pkgs/applications/networking/jmeter/default.nix
+++ b/pkgs/applications/networking/jmeter/default.nix
@@ -1,10 +1,10 @@
{ fetchurl, stdenv, ant }:
stdenv.mkDerivation rec {
- name = "jmeter-2.9";
+ name = "jmeter-2.10";
src = fetchurl {
- url = "http://ftp.unicamp.br/pub/apache//jmeter/binaries/apache-jmeter-2.9.tgz";
- sha256 = "14r3zn910m97jqrf6k5c4lwy214snaap2242qg76h65zk9qr20ni";
+ url = "http://ftp.unicamp.br/pub/apache//jmeter/binaries/apache-${name}.tgz";
+ sha256 = "1ygm0h02sllh4mfl5imj46v80wnbs1x7n88gfjm523ixmgsa0fvy";
};
installPhase = ''
diff --git a/pkgs/applications/networking/mailreaders/mutt/default.nix b/pkgs/applications/networking/mailreaders/mutt/default.nix
index fa006dc5f0d..97722a51bb5 100644
--- a/pkgs/applications/networking/mailreaders/mutt/default.nix
+++ b/pkgs/applications/networking/mailreaders/mutt/default.nix
@@ -15,22 +15,16 @@ assert sslSupport -> openssl != null;
assert saslSupport -> cyrus_sasl != null;
let
- gpgmePatch = fetchurl {
- # Solution for gpgme >= 1.2: http://dev.mutt.org/trac/ticket/3300
- url = "http://dev.mutt.org/trac/raw-attachment/ticket/3300/mutt-1.5.21-gpgme-init.patch";
- sha256 = "1qa1c8gns4q3as1h2lk3x4di2k3hr804ar7xlc6xh9r0zjhzmlk4";
- };
+ version = "1.5.22";
in
stdenv.mkDerivation rec {
- name = "mutt-1.5.21";
+ name = "mutt-${version}";
src = fetchurl {
url = "ftp://ftp.mutt.org/mutt/devel/${name}.tar.gz";
- sha256 = "1864cwz240gh0zy56fb47qqzwyf6ghg01037rb4p2kqgimpg6h91";
+ sha256 = "19zk81spnb0gc8y5mwmcfn33g77wv1xz5bmgic8aan07xn8fislg";
};
- patches = [ (if gpgmeSupport then gpgmePatch else null) ];
-
buildInputs = [
ncurses which perl
(if headerCache then gdbm else null)
@@ -58,8 +52,12 @@ stdenv.mkDerivation rec {
(if gpgmeSupport then "--enable-gpgme" else "--disable-gpgme")
];
- meta = {
+ meta = with stdenv.lib; {
+ description = "A small but very powerful text-based mail client";
homepage = http://www.mutt.org;
+ license = "GPLv2+";
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ the-kenny ];
};
}
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
index ebab3a42af6..5797354d33b 100644
--- a/pkgs/applications/networking/mailreaders/notmuch/default.nix
+++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -3,11 +3,11 @@
}:
stdenv.mkDerivation rec {
- name = "notmuch-0.15.2";
+ name = "notmuch-0.16";
src = fetchurl {
url = "http://notmuchmail.org/releases/${name}.tar.gz";
- sha256 = "03cwylm0y9xld0hn753v0hn62f96nagdmzxv8jlz8vdbh9iszs56";
+ sha256 = "0i7k85lfp9l0grmq7cvai2f3pw15jcrhcp96mmamr15y2pn2syg7";
};
buildInputs = [ bash emacs gdb glib gmime gnupg pkgconfig talloc xapian ];
diff --git a/pkgs/applications/networking/mailreaders/sup/default.nix b/pkgs/applications/networking/mailreaders/sup/default.nix
index dd2837da40a..a8fb387e729 100644
--- a/pkgs/applications/networking/mailreaders/sup/default.nix
+++ b/pkgs/applications/networking/mailreaders/sup/default.nix
@@ -1,9 +1,9 @@
-{ stdenv, fetchurl, ruby, rake, rubygems, makeWrapper, ncursesw_sup
+{ stdenv, fetchgit, ruby, rake, rubygems, makeWrapper, ncursesw_sup
, xapian_ruby, gpgme, libiconvOrEmpty, mime_types, chronic, trollop, lockfile
, gettext, iconv, locale, text, highline, rmail_sup, unicode, gnupg, which }:
stdenv.mkDerivation rec {
- version = "f27661b1656ae1f0d28fd89595b5a16f268d8d3d";
+ version = "20131130";
name = "sup-${version}";
meta = {
@@ -16,9 +16,10 @@ stdenv.mkDerivation rec {
dontStrip = true;
- src = fetchurl {
- url = "https://github.com/sup-heliotrope/sup/archive/${version}.tar.gz";
- sha256 = "08fxf1knji3260d0mrp86x6yayp43iq7kc5rfay3hga8i2sckdia";
+ src = fetchgit {
+ url = git://github.com/sup-heliotrope/sup.git;
+ rev = "a5a1e39034204ac4b05c9171a71164712690b010";
+ sha256 = "0w2w7dcif1ri1qq81csz7gj45rqd9z7hjd6x29awibybyyqyvj5s";
};
buildInputs =
diff --git a/pkgs/applications/networking/newsreaders/liferea/default.nix b/pkgs/applications/networking/newsreaders/liferea/default.nix
index 55e0ed88814..093b801401d 100644
--- a/pkgs/applications/networking/newsreaders/liferea/default.nix
+++ b/pkgs/applications/networking/newsreaders/liferea/default.nix
@@ -18,6 +18,9 @@ stdenv.mkDerivation rec {
libnotify
];
+ preFixup = ''
+ rm $out/share/icons/hicolor/icon-theme.cache'';
+
meta = {
description = "A GTK-based news feed agregator";
homepage = http://lzone.de/liferea/;
diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix
new file mode 100644
index 00000000000..5aff37580d3
--- /dev/null
+++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, qt4, which, dbus_libs, boost, libtorrentRasterbar
+, pkgconfig }:
+
+stdenv.mkDerivation rec {
+ name = "qbittorrent-3.1.2";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/qbittorrent/${name}.tar.xz";
+ sha256 = "1viia11qixp1qqxcyiw1x4if63cfyqk4rscpzp1vnhnzm06irv7y";
+ };
+
+ buildInputs = [ qt4 which dbus_libs boost libtorrentRasterbar
+ pkgconfig ];
+
+ configureFlags = "--with-libboost-inc=${boost}/include "
+ + "--with-libboost-lib=${boost}/lib";
+
+ enableParallelBuilding = true;
+
+ meta = {
+ description = "Free Software alternative to µtorrent";
+ homepage = http://www.qbittorrent.org/;
+ maintainers = with stdenv.lib.maintainers; [ viric ];
+ };
+}
diff --git a/pkgs/applications/networking/remote/freerdp/unstable.nix b/pkgs/applications/networking/remote/freerdp/unstable.nix
index ef8ddf8b0e3..cce3d23d194 100644
--- a/pkgs/applications/networking/remote/freerdp/unstable.nix
+++ b/pkgs/applications/networking/remote/freerdp/unstable.nix
@@ -25,7 +25,7 @@ assert printerSupport -> cups != null;
let rev = "ec6effcb1e7759551cf31f5b18d768afc67db97d"; in
stdenv.mkDerivation rec {
- name = "freerdp-1.1pre${rev}";
+ name = "freerdp-1.1pre-${stdenv.lib.strings.substring 0 7 rev}";
src = fetchgit {
url = git://github.com/FreeRDP/FreeRDP.git;
diff --git a/pkgs/applications/networking/remote/remmina/default.nix b/pkgs/applications/networking/remote/remmina/default.nix
index b2b24a2565c..24bc20af652 100644
--- a/pkgs/applications/networking/remote/remmina/default.nix
+++ b/pkgs/applications/networking/remote/remmina/default.nix
@@ -1,8 +1,21 @@
{ stdenv, fetchurl, cmake, pkgconfig, makeWrapper
, glib, gtk, gettext, libxkbfile, libgnome_keyring, libX11
-, freerdp, libssh, libgcrypt, gnutls }:
+, freerdp, libssh, libgcrypt, gnutls, makeDesktopItem }:
-let version = "1.0.0"; in
+let
+ version = "1.0.0";
+
+ desktopItem = makeDesktopItem {
+ name = "remmina";
+ desktopName = "Remmina";
+ genericName = "Remmina Remote Desktop Client";
+ exec = "remmina";
+ icon = "remmina";
+ comment = "Connect to remote desktops";
+ categories = "GTK;GNOME;X-GNOME-NetworkSettings;Network;";
+ };
+
+in
stdenv.mkDerivation {
name = "remmina-${version}";
@@ -18,14 +31,21 @@ stdenv.mkDerivation {
cmakeFlags = "-DWITH_VTE=OFF -DWITH_TELEPATHY=OFF -DWITH_AVAHI=OFF";
+ patches = [ ./lgthread.patch ];
+
postInstall = ''
+ mkdir -pv $out/share/applications
+ mkdir -pv $out/share/icons
+ cp ${desktopItem}/share/applications/* $out/share/applications
+ cp -r $out/share/remmina/icons/* $out/share/icons
wrapProgram $out/bin/remmina --prefix LD_LIBRARY_PATH : "${libX11}/lib"
'';
- meta = {
+ meta = with stdenv.lib; {
license = "GPLv2";
homepage = "http://remmina.sourceforge.net/";
description = "Remmina is a remote desktop client written in GTK+";
maintainers = [];
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/networking/remote/remmina/lgthread.patch b/pkgs/applications/networking/remote/remmina/lgthread.patch
new file mode 100644
index 00000000000..2d8e60f7572
--- /dev/null
+++ b/pkgs/applications/networking/remote/remmina/lgthread.patch
@@ -0,0 +1,16 @@
+Fix [undefined reference to `g_thread_init'] as suggested by
+http://ragnermagalhaes.blogspot.ru/2007/09/undefined-reference-to-gthreadinit.html
+
+diff -ru FreeRDP-Remmina-356c033.orig/remmina/CMakeLists.txt FreeRDP-Remmina-356c033/remmina/CMakeLists.txt
+--- FreeRDP-Remmina-356c033.orig/remmina/CMakeLists.txt 2013-11-05 12:43:27.660276912 +0400
++++ FreeRDP-Remmina-356c033/remmina/CMakeLists.txt 2013-11-05 12:53:39.607018349 +0400
+@@ -132,6 +132,8 @@
+ endif()
+ endif()
+
++set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgthread-2.0" )
++
+ add_subdirectory(po)
+ add_subdirectory(icons)
+ add_subdirectory(desktop)
+
diff --git a/pkgs/applications/networking/remote/teamviewer/8.nix b/pkgs/applications/networking/remote/teamviewer/8.nix
index 8113e33e0a7..ca938c08653 100644
--- a/pkgs/applications/networking/remote/teamviewer/8.nix
+++ b/pkgs/applications/networking/remote/teamviewer/8.nix
@@ -1,26 +1,20 @@
-{ stdenv, fetchurl, libX11, libXtst, libXext, libXdamage, libXfixes, wine, makeWrapper
-, bash }:
+{ stdenv, fetchurl, libX11, libXtst, libXext, libXdamage, libXfixes, wineUnstable, makeWrapper, libXau
+, bash, patchelf }:
-# Work in progress.
-
-# It doesn't want to start unless teamviewerd is running as root.
-# I haven't tried to make the daemon run.
-
-assert stdenv.system == "i686-linux";
let
- topath = "${wine}/bin";
+ topath = "${wineUnstable}/bin";
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
- [ stdenv.gcc.gcc libX11 libXtst libXext libXdamage libXfixes wine ]);
+ [ stdenv.gcc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
in
stdenv.mkDerivation {
name = "teamviewer-8.0.17147";
src = fetchurl {
url = "http://download.teamviewer.com/download/teamviewer_linux_x64.deb";
- sha256 = "01iynk954pphl5mq4avs843xyzvdfzng1lpsy7skgwvw0k9cx5ab";
+ sha256 = "0s5m15f99rdmspzwx3gb9mqd6jx1bgfm0d6rfd01k9rf7gi7qk0k";
};
- buildInputs = [ makeWrapper ];
+ buildInputs = [ makeWrapper patchelf ];
unpackPhase = ''
ar x $src
@@ -36,9 +30,13 @@ stdenv.mkDerivation {
#!${bash}/bin/sh
export LD_LIBRARY_PATH=${toldpath}\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
export PATH=${topath}\''${PATH:+:\$PATH}
- $out/share/teamviewer8/tv_bin/script/teamviewer
+ $out/share/teamviewer8/tv_bin/script/teamviewer "\$@"
EOF
chmod +x $out/bin/teamviewer
+
+ patchelf --set-rpath "${stdenv.gcc.gcc}/lib64:${stdenv.gcc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd
+ patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd
+ ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/
'';
meta = {
diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix
index 599229753b5..7e5fdc6ccd3 100644
--- a/pkgs/applications/networking/sniffers/wireshark/default.nix
+++ b/pkgs/applications/networking/sniffers/wireshark/default.nix
@@ -4,14 +4,14 @@
, makeDesktopItem
}:
-let version = "1.8.7"; in
+let version = "1.8.11"; in
stdenv.mkDerivation {
name = "wireshark-${version}";
src = fetchurl {
url = "mirror://sourceforge/wireshark/wireshark-${version}.tar.bz2";
- sha256 = "0hm8zisy5dg7sfhh7rvgnpffq2qcw0syd8k5kns8j0j13sf44zjw";
+ sha256 = "1nwgizs9z1dalicpp2fd9pqafidy49j0v3d1rml0spfqrkbjpfpw";
};
buildInputs =
diff --git a/pkgs/applications/networking/znc/modules.nix b/pkgs/applications/networking/znc/modules.nix
index ba6d36a3c76..478900bae4c 100644
--- a/pkgs/applications/networking/znc/modules.nix
+++ b/pkgs/applications/networking/znc/modules.nix
@@ -10,7 +10,7 @@ let
inherit buildPhase;
inherit installPhase;
- meta.platforms = stdenv.lib.platforms.unix;
+ meta = a.meta // { platforms = stdenv.lib.platforms.unix; };
passthru.module_name = module_name;
});
@@ -30,7 +30,7 @@ in rec {
description = "Push notification service module for ZNC";
homepage = https://github.com/jreese/znc-push;
repositories.git = https://github.com/jreese/znc-push.git;
- license = stdenv.lib.license.mit;
+ license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.offline ];
};
};
diff --git a/pkgs/applications/office/gnucash/default.nix b/pkgs/applications/office/gnucash/default.nix
index eddaf8f33e7..b399c80ebff 100644
--- a/pkgs/applications/office/gnucash/default.nix
+++ b/pkgs/applications/office/gnucash/default.nix
@@ -1,7 +1,7 @@
{ fetchurl, stdenv, pkgconfig, libxml2, gconf, glib, gtk, libgnomeui, libofx
, libgtkhtml, gtkhtml, libgnomeprint, goffice, enchant, gettext, libbonoboui
, intltool, perl, guile, slibGuile, swig, isocodes, bzip2, makeWrapper, libglade
-, libgsf, libart_lgpl
+, libgsf, libart_lgpl, perlPackages
}:
/* If you experience GConf errors when running GnuCash on NixOS, see
@@ -21,23 +21,31 @@ stdenv.mkDerivation rec {
pkgconfig libxml2 gconf glib gtk libgnomeui libgtkhtml gtkhtml
libgnomeprint goffice enchant gettext intltool perl guile slibGuile
swig isocodes bzip2 makeWrapper libofx libglade libgsf libart_lgpl
+ perlPackages.DateManip perlPackages.FinanceQuote
];
configureFlags = "CFLAGS=-O3 CXXFLAGS=-O3 --disable-dbi --enable-ofx";
postInstall = ''
- sed -i $out/bin/update-gnucash-gconf \
+ # Auto-updaters don't make sense in Nix.
+ rm $out/bin/gnc-fq-update
+
+ sed -i $out/bin/update-gnucash-gconf \
-e 's|--config-source=[^ ]* --install-schema-file|--makefile-install-rule|'
- for prog in "$out/bin/"*
+
+ for prog in $(echo "$out/bin/"*)
do
+ # Don't wrap the gnc-fq-* scripts, since gnucash calls them as
+ # "perl