Merge branch master into x-updates

Conflicts (trivial, minor update on master, major here):
	pkgs/development/libraries/mesa/default.nix
This commit is contained in:
Vladimír Čunát 2013-11-16 20:32:20 +01:00
commit 68430cf3d7
360 changed files with 7686 additions and 9191 deletions

View file

@ -1 +1 @@
13.10
14.02

View file

@ -118,6 +118,56 @@ interpretation:</para>
package).</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>platforms</varname></term>
<listitem><para>The list of Nix platform types on which the
package is supported. If this attribute is set, the package will
refuse to build, and wont show up in <literal>nix-env
-qa</literal> output, on any platform not listed
here. An example is:
<programlisting>
meta.platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
</programlisting>
The set <varname>lib.platforms</varname> defines various common
lists of platforms types, so its more typical to write:
<programlisting>
meta.platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
</programlisting>
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>hydraPlatforms</varname></term>
<listitem><para>The list of Nix platform types for which the Hydra
instance at <literal>hydra.nixos.org</literal> should build the
package. (Hydra is the Nix-based continuous build system.) It
defaults to the value of <varname>meta.platforms</varname>. Thus,
the only reason to set <varname>meta.hydraPlatforms</varname> is
if you want <literal>hydra.nixos.org</literal> to build the
package on a subset of <varname>meta.platforms</varname>, or not
at all, e.g.
<programlisting>
meta.platforms = stdenv.lib.platforms.linux;
meta.hydraPlatforms = [];
</programlisting>
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>broken</varname></term>
<listitem><para>If set to <literal>true</literal>, the package is
marked as “broken”, meaning that it wont show up in
<literal>nix-env -qa</literal>, and cannot be built or installed.
Sush packages should be removed from Nixpkgs eventually unless
they are fixed.</para></listitem>
</varlistentry>
</variablelist>

View file

@ -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
[];

View file

@ -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.

View file

@ -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;
}

View file

@ -63,4 +63,5 @@
winden = "Antonio Vargas Gonzalez <windenntw@gmail.com>";
z77z = "Marco Maggesi <maggesi@math.unifi.it>";
zef = "Zef Hemel <zef@zef.me>";
zoomulator = "Kim Simmons <zoomulator@gmail.com>";
}

View file

@ -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:

View file

@ -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."

View file

@ -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"];

View file

@ -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.

View file

@ -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;
}

View file

@ -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

View file

@ -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 \

View file

@ -369,9 +369,23 @@ $ nixos-rebuild build-vm
$ ./result/bin/run-*-vm
</screen>
The VM does not have use any data from your host system, so your
existing user accounts and home directories will not be
available.</para>
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):
<screen>
$ QEMU_NET_OPTS="hostfwd=tcp::2222-:22" ./result/bin/run-*-vm
</screen>
allowing you to log in via SSH (assuming you have set the appropriate
passwords or SSH authorized keys):
<screen>
$ ssh -p 2222 localhost
</screen>
</para>
</section>

View file

@ -5,6 +5,7 @@
<info>
<title>NixOS Manual</title>
<subtitle>Version <xi:include href="version" parse="text" /></subtitle>
<author>
<personname>

View file

@ -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
@ -72,7 +72,8 @@ 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")]

View file

@ -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 '<nixos>' -A config.system.nixosVersion | sed s/'"'//g)
version=$(nix-instantiate --eval-only '<nixpkgs/nixos>' -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 '<nixos>' \
nix-build '<nixpkgs/nixos>' \
-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

View file

@ -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 ];

View file

@ -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;
});

View file

@ -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.
};

View file

@ -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 <command>su</command> or
<command>sudo</command>). The string <literal>!</literal>
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 <<EOF
Warning: Your root account has a null password, allowing local users
to login as root. Please set a non-null password using \`passwd', or
disable password-based root logins using \`passwd -l'.
EOF
fi
unset _l
fi
'';

View file

@ -1,4 +1,6 @@
{pkgs, config, ...}:
{ config, pkgs, ... }:
with pkgs.lib;
let kernelVersion = config.boot.kernelPackages.kernel.version; in
@ -8,9 +10,9 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in
options = {
networking.enableB43Firmware = pkgs.lib.mkOption {
networking.enableB43Firmware = mkOption {
default = false;
type = pkgs.lib.types.bool;
type = types.bool;
description = ''
Turn on this option if you want firmware for the NICs supported by the b43 module.
'';
@ -21,11 +23,11 @@ let kernelVersion = config.boot.kernelPackages.kernel.version; in
###### implementation
config = pkgs.lib.mkIf config.networking.enableB43Firmware {
assertions = [ {
assertion = builtins.lessThan 0 (builtins.compareVersions kernelVersion "3.2");
message = "b43 firmware for kernels older than 3.2 not packaged yet!";
} ];
config = mkIf config.networking.enableB43Firmware {
assertions = singleton
{ assertion = lessThan 0 (builtins.compareVersions kernelVersion "3.2");
message = "b43 firmware for kernels older than 3.2 not packaged yet!";
};
hardware.firmware = [ pkgs.b43Firmware_5_1_138 ];
};

View file

@ -11,7 +11,7 @@ let
# CD. These are installed into the "nixos" channel of the root
# user, as expected by nixos-rebuild/nixos-install.
channelSources = pkgs.runCommand "nixos-${config.system.nixosVersion}"
{ expr = builtins.readFile ../../../lib/channel-expr.nix; }
{ expr = readFile ../../../lib/channel-expr.nix; }
''
mkdir -p $out/nixos
cp -prd ${pkgs.path} $out/nixos/nixpkgs

View file

@ -32,6 +32,12 @@ with pkgs.lib;
# in the Nix store on the CD.
isoImage.storeContents = [ pkgs.stdenv pkgs.busybox ];
# EFI booting
isoImage.makeEfiBootable = true;
# Add Memtest86+ to the CD.
boot.loader.grub.memtest86 = true;
# Get a console as soon as the initrd loads fbcon on EFI boot
boot.initrd.kernelModules = [ "fbcon" ];
}

View file

@ -1,14 +0,0 @@
{ config, pkgs, ... }:
{
# Move into base image once using 3.10 or later
require = [ ./installation-cd-minimal.nix ];
boot.kernelPackages = pkgs.linuxPackages_3_10;
# Get a console as soon as the initrd loads fbcon on EFI boot
boot.initrd.kernelModules = [ "fbcon" ];
isoImage.makeEfiBootable = true;
}

View file

@ -44,31 +44,29 @@ let
# The efi boot image
efiDir = pkgs.runCommand "efi-directory" {} ''
mkdir -p $out/efi/boot
cp -v ${pkgs.gummiboot}/lib/gummiboot/gummiboot${targetArch}.efi $out/efi/boot/boot${targetArch}.efi
mkdir -p $out/loader/entries
echo "title NixOS LiveCD" > $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.

View file

@ -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 = <<EOF;

View file

@ -106,6 +106,7 @@
firebird = 95;
redis = 96;
haproxy = 97;
mongodb = 98;
# When adding a uid, make sure it doesn't match an existing gid.

View file

@ -33,7 +33,7 @@ with pkgs.lib;
system.defaultChannel = mkOption {
internal = true;
type = types.str;
default = https://nixos.org/channels/nixos-13.10;
default = https://nixos.org/channels/nixos-unstable;
description = "Default NixOS channel to which the root user is subscribed.";
};
@ -53,7 +53,7 @@ with pkgs.lib;
mkDefault (if pathExists fn then readFile fn else "master");
# Note: code names must only increase in alphabetical order.
system.nixosCodeName = "Aardvark";
system.nixosCodeName = "Baboon";
# Generate /etc/os-release. See
# http://0pointer.de/public/systemd-man/os-release.html for the

View file

@ -46,7 +46,6 @@
./programs/bash/command-not-found.nix
./programs/blcr.nix
./programs/environment.nix
./programs/gurobi.nix
./programs/info.nix
./programs/shadow.nix
./programs/shell.nix
@ -55,6 +54,7 @@
./programs/venus.nix
./programs/wvdial.nix
./programs/zsh/zsh.nix
./programs/screen.nix
./rename.nix
./security/apparmor.nix
./security/apparmor-suid.nix
@ -119,7 +119,6 @@
./services/misc/felix.nix
./services/misc/folding-at-home.nix
./services/misc/gpsd.nix
./services/misc/gurobi.nix
./services/misc/nix-daemon.nix
./services/misc/nix-gc.nix
./services/misc/nixos-manual.nix
@ -278,5 +277,5 @@
./virtualisation/libvirtd.nix
#./virtualisation/nova.nix
./virtualisation/virtualbox-guest.nix
./virtualisation/xen-dom0.nix
#./virtualisation/xen-dom0.nix
]

View file

@ -1,43 +0,0 @@
{ config, pkgs, ... }:
with pkgs.lib;
let
cfg = config.programs.gurobi;
in {
options = {
programs.gurobi = {
license = mkOption {
default = null;
description = "Path to the Gurobi license file if not using a token server";
type = types.nullOr types.path;
};
tokenServerAddress = mkOption {
default = null;
description = "Address of the token server";
type = types.nullOr types.string;
};
};
};
config = mkIf (cfg.license != null || cfg.tokenServerAddress != null) {
assertions = [ {
assertion = cfg.license == null || cfg.tokenServerAddress == null;
message = "Please only set one of a gurobi license file and a gurobi token server address";
} ];
environment.variables.GRB_LICENSE_FILE = if cfg.license != null
then cfg.license
else pkgs.writeTextFile {
name = "gurobi-generated-license";
text = "TOKENSERVER=${cfg.tokenServerAddress}";
};
environment.systemPackages = [ pkgs.gurobi ];
};
}

View file

@ -0,0 +1,30 @@
{ config, pkgs, ... }:
let
inherit (pkgs.lib) mkOption mkIf types;
cfg = config.programs.screen;
in
{
###### interface
options = {
programs.screen = {
screenrc = mkOption {
default = "";
description = ''
The contents of /etc/screenrc file.
'';
type = types.lines;
};
};
};
###### implementation
config = mkIf (cfg.screenrc != "") {
environment.etc."screenrc".text = cfg.screenrc;
};
}

View file

@ -40,7 +40,7 @@ in
};
dates = mkOption {
default = "*:0,15,30,45";
default = "*:0/15";
type = types.string;
description = ''
Specification (in the format described by
@ -161,13 +161,13 @@ in
'';
systemd.services.venus =
{ description = "Planet Venus, an awesome river of news feed reader";
{ description = "Planet Venus Feed Reader";
path = [ pkgs.venus ];
script = "exec venus-planet ${configFile}";
serviceConfig.User = "${cfg.user}";
serviceConfig.Group = "${cfg.group}";
environment.OPENSSL_X509_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt";
startOn = cfg.dates;
startAt = cfg.dates;
};
};

View file

@ -90,8 +90,9 @@ in
config = mkIf config.services.mongodb.enable {
users.extraUsers = singleton
{ name = cfg.user;
users.extraUsers.mongodb = mkIf (cfg.user == "mongodb")
{ name = "mongodb";
uid = config.ids.uids.mongodb;
description = "MongoDB server user";
};

View file

@ -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";

View file

@ -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}
}
''}";
};
};
})];
};
}

View file

@ -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

View file

@ -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";
};
};
};
}

View file

@ -23,6 +23,7 @@ let
manual = import ../../../doc/manual {
inherit pkgs;
version = config.system.nixosVersion;
revision = config.system.nixosRevision;
options = eval.options;
};

View file

@ -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";
};

View file

@ -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 = {

View file

@ -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 ];

View file

@ -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";
};

View file

@ -55,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 {
@ -95,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 <literal>networking.nameservers</literal> option. This
option overrides the <literal>appendNameservers</literal> 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
<literal>networking.nameservers</literal> 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.
'';
};
@ -144,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";
};

View file

@ -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:

View file

@ -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 <option>userlistFile</option> is a list of user
@ -61,35 +61,37 @@ let
The default <literal>false</literal> means whitelist/allow.
'')
(yesNoOption "forceLocalLoginsSSL" "force_local_logins_ssl" false ''
Only applies if <option>sslEnable</option> is true. Non anonymous (local) users
must use a secure SSL connection to send a password.
Only applies if <option>sslEnable</option> 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 <option>sslEnable</option> is true. Non anonymous (local) users
must use a secure SSL connection for sending/receiving data on data connection.
Only applies if <option>sslEnable</option> 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 <option>userlistFile</option>.
'';
description = "See <option>userlistFile</option>.";
};
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";
};
};

View file

@ -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)}
'';

View file

@ -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" ];

View file

@ -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

View file

@ -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: {

View file

@ -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;

View file

@ -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";
};
};
};

View file

@ -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 = {

View file

@ -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
];
};
}

View file

@ -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;

View file

@ -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
''}

View file

@ -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"}"

View file

@ -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";
};
};
};

View file

@ -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"

View file

@ -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)
}

View file

@ -348,14 +348,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
@ -486,6 +486,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;
@ -518,7 +528,7 @@ in
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 +565,7 @@ in
environment.etc."systemd/system.conf".text =
''
[Manager]
${config.systemd.extraConfig}
'';
environment.etc."systemd/journald.conf".text =

View file

@ -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 = {

View file

@ -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 = "!";
}

View file

@ -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)

View file

@ -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";

View file

@ -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 = "!";
}

View file

@ -107,7 +107,7 @@ in
'';
jobs.xend =
{ description = "Xen control daemon";
{ description = "Xen Control Daemon";
startOn = "stopped udevtrigger";

View file

@ -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).

View file

@ -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);

View file

@ -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 <nixos/modules/testing/test-instrumentation.nix> ];
boot.kernelPackages = pkgs.linuxPackages_3_10;
boot.loader.grub.enable = false;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.gummiboot.enable = true;

40
nixos/tests/logstash.nix Normal file
View file

@ -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");
'';
}

View file

@ -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)

View file

@ -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 ];
};
}

View file

@ -39,6 +39,6 @@ pythonPackages.buildPythonPackage rec {
local hard drive.
'';
maintainers = [ stdenv.lib.maintainers.rickynils ];
platforms = [];
hydraPlatforms = [];
};
}

View file

@ -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/;
};
}

View file

@ -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 ];
};
}

View file

@ -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;
};
})

View file

@ -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 ];
};
}

View file

@ -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 =

View file

@ -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

View file

@ -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 = {

View file

@ -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 = {

View file

@ -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 = {

View file

@ -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/;

View file

@ -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;
};
}

View file

@ -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";

View file

@ -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.

View file

@ -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

View file

@ -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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -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

View file

@ -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-*) "
'';

View file

@ -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;
};
}

View file

@ -114,5 +114,6 @@ stdenv.mkDerivation {
passthru = {
inherit gtk version;
isFirefox3Like = true;
broken = true;
};
}

View file

@ -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";

View file

@ -21,5 +21,6 @@ stdenv.mkDerivation {
license = "ZLIB/LIBPNG"; # see README.
maintainers = [args.lib.maintainers.marcweber];
platforms = args.lib.platforms.linux;
broken = true;
};
}

View file

@ -16,5 +16,6 @@ stdenv.mkDerivation {
license = "MIT";
maintainers = [args.lib.maintainers.marcweber];
platforms = args.lib.platforms.linux;
broken = true;
};
}

View file

@ -16,5 +16,6 @@ stdenv.mkDerivation {
license = "MIT";
maintainers = [args.lib.maintainers.marcweber];
platforms = args.lib.platforms.linux;
broken = true;
};
}

View file

@ -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;
};
}

View file

@ -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 = ''

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