Merge remote-tracking branch 'upstream/master' into hardened-stdenv

This commit is contained in:
Robin Gloster 2016-02-07 11:17:57 +00:00
commit 9229e9c656
469 changed files with 23339 additions and 14678 deletions

View file

@ -27,6 +27,7 @@
anderspapitto = "Anders Papitto <anderspapitto@gmail.com>";
andres = "Andres Loeh <ksnixos@andres-loeh.de>";
andrewrk = "Andrew Kelley <superjoe30@gmail.com>";
aneeshusa = "Aneesh Agrawal <aneeshusa@gmail.com>";
antono = "Antono Vasiljev <self@antono.info>";
ardumont = "Antoine R. Dumont <eniotna.t@gmail.com>";
aristid = "Aristid Breitkreuz <aristidb@gmail.com>";
@ -159,6 +160,7 @@
jzellner = "Jeff Zellner <jeffz@eml.cc>";
kamilchm = "Kamil Chmielewski <kamil.chm@gmail.com>";
kampfschlaefer = "Arnold Krille <arnold@arnoldarts.de>";
kevincox = "Kevin Cox <kevincox@kevincox.ca>";
khumba = "Bryan Gardiner <bog@khumba.net>";
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
koral = "Koral <koral@mailoo.org>";
@ -300,6 +302,7 @@
taeer = "Taeer Bar-Yam <taeer@necsi.edu>";
tailhook = "Paul Colomiets <paul@colomiets.name>";
taktoa = "Remy Goldschmidt <taktoa@gmail.com>";
tavyc = "Octavian Cerna <octavian.cerna@gmail.com>";
telotortium = "Robert Irelan <rirelan@gmail.com>";
thall = "Niclas Thall <niclas.thall@gmail.com>";
thammers = "Tobias Hammerschmidt <jawr@gmx.de>";
@ -315,6 +318,7 @@
tstrobel = "Thomas Strobel <ts468@cam.ac.uk>";
ttuegel = "Thomas Tuegel <ttuegel@gmail.com>";
tv = "Tomislav Viljetić <tv@shackspace.de>";
tvestelind = "Tomas Vestelind <tomas.vestelind@fripost.org>";
twey = "James Twey Kay <twey@twey.co.uk>";
urkud = "Yury G. Kudryashov <urkud+nix@ya.ru>";
vandenoever = "Jos van den Oever <jos@vandenoever.info>";

View file

@ -157,7 +157,7 @@ boot.kernel.sysctl."net.ipv4.tcp_keepalive_time" = 60;
fileSystems."/boot" =
{ device = "/dev/sda1";
fsType = "ext4";
options = "rw,data=ordered,relatime";
options = [ "rw" "data=ordered" "relatime" ];
};
</programlisting>
</para>

View file

@ -165,13 +165,13 @@ look like this:
fileSystems."/" =
{ device = "/dev/disk/by-label/nixos";
fsType = "ext3";
options = "rw,data=ordered,relatime";
options = [ "rw" "data=ordered" "relatime" ];
};
fileSystems."/boot" =
{ device = "/dev/sda1";
fsType = "ext3";
options = "rw,errors=continue,user_xattr,acl,barrier=1,data=writeback,relatime";
options = [ "rw" "errors=continue" "user_xattr" "acl" "barrier=1" "data=writeback" "relatime" ];
};
swapDevices =

View file

@ -42,6 +42,7 @@ nixos.path = ./nixpkgs-unstable-2015-12-06/nixos;
<itemizedlist>
<listitem><para><literal>services/monitoring/longview.nix</literal></para></listitem>
<listitem><para><literal>services/web-apps/pump.io.nix</literal></para></listitem>
<listitem><para><literal>services/security/haka.nix</literal></para></listitem>
</itemizedlist>
</para>
@ -154,6 +155,23 @@ nginx.override {
rights, new <literal>aliasFiles</literal> and <literal>mapFiles</literal>
options and more.</para>
</listitem>
<listitem>
<para>Filesystem options should now be configured as a list of strings, not
a comma-separated string. The old style will continue to work, but print a
warning, until the 16.09 release. An example of the new style:
<programlisting>
fileSystems."/example" = {
device = "/dev/sdc";
fsType = "btrfs";
options = [ "noatime" "compress=lzo" "space_cache" "autodefrag" ];
};
</programlisting>
</para>
</listitem>
</itemizedlist>

View file

@ -98,11 +98,9 @@ in
script = ''
set -u
set -o pipefail
PATH=${pkgs.procps}/bin:${pkgs.gnugrep}/bin:${pkgs.gnused}/bin
# Calculate memory to use for zram
totalmem=$(free | grep -e "^Mem:" | sed -e 's/^Mem: *//' -e 's/ *.*//')
totalmem=$(${pkgs.gnugrep}/bin/grep 'MemTotal: ' /proc/meminfo | ${pkgs.gawk}/bin/awk '{print $2}')
mem=$(((totalmem * ${toString cfg.memoryPercent} / 100 / ${toString cfg.numDevices}) * 1024))
echo $mem > /sys/class/block/${dev}/disksize

View file

@ -249,7 +249,7 @@ in
fileSystems."/" =
{ fsType = "tmpfs";
options = "mode=0755";
options = [ "mode=0755" ];
};
# Note that /dev/root is a symlink to the actual root device
@ -266,20 +266,20 @@ in
fileSystems."/nix/.ro-store" =
{ fsType = "squashfs";
device = "/iso/nix-store.squashfs";
options = "loop";
options = [ "loop" ];
neededForBoot = true;
};
fileSystems."/nix/.rw-store" =
{ fsType = "tmpfs";
options = "mode=0755";
options = [ "mode=0755" ];
neededForBoot = true;
};
fileSystems."/nix/store" =
{ fsType = "unionfs-fuse";
device = "unionfs";
options = "allow_other,cow,nonempty,chroot=/mnt-root,max_files=32768,hide_meta_files,dirs=/nix/.rw-store=rw:/nix/.ro-store=ro";
options = [ "allow_other" "cow" "nonempty" "chroot=/mnt-root" "max_files=32768" "hide_meta_files" "dirs=/nix/.rw-store=rw:/nix/.ro-store=ro" ];
};
boot.initrd.availableKernelModules = [ "squashfs" "iso9660" "usb-storage" ];

View file

@ -349,7 +349,7 @@ foreach my $fs (read_file("/proc/self/mountinfo")) {
fileSystems.\"$mountPoint\" =
{ device = \"$base$path\";
fsType = \"none\";
options = \"bind\";
options = \[ \"bind\" \];
};
EOF
@ -409,7 +409,7 @@ EOF
if (scalar @extraOptions > 0) {
$fileSystems .= <<EOF;
options = \"${\join ",", uniq(@extraOptions)}\";
options = \[ ${\join " ", map { "\"" . $_ . "\"" } uniq(@extraOptions)} \];
EOF
}

View file

@ -149,10 +149,11 @@ nixBuild() {
local j="$1"; shift 1
instArgs+=("$i" "$j")
;;
-I)
# We don't want this in buildArgs
-I) # We don't want this in buildArgs
shift 1
;;
--no-out-link) # We don't want this in buildArgs
;;
"<"*) # nix paths
instArgs+=("$i")
;;
@ -329,7 +330,7 @@ fi
if [ -z "$rollback" ]; then
echo "building the system configuration..." >&2
if [ "$action" = switch -o "$action" = boot ]; then
pathToConfig="$(nixBuild '<nixpkgs/nixos>' -A system "${extraBuildFlags[@]}")"
pathToConfig="$(nixBuild '<nixpkgs/nixos>' --no-out-link -A system "${extraBuildFlags[@]}")"
copyToTarget "$pathToConfig"
targetHostCmd nix-env -p "$profile" --set "$pathToConfig"
elif [ "$action" = test -o "$action" = build -o "$action" = dry-build -o "$action" = dry-activate ]; then

View file

@ -394,6 +394,7 @@
./services/security/fprintd.nix
./services/security/fprot.nix
./services/security/frandom.nix
./services/security/haka.nix
./services/security/haveged.nix
./services/security/hologram.nix
./services/security/munge.nix
@ -459,10 +460,10 @@
./system/boot/coredump.nix
./system/boot/emergency-mode.nix
./system/boot/initrd-network.nix
./system/boot/initrd-ssh.nix
./system/boot/kernel.nix
./system/boot/kexec.nix
./system/boot/loader/efi.nix
./system/boot/loader/loader.nix
./system/boot/loader/generations-dir/generations-dir.nix
./system/boot/loader/generic-extlinux-compatible
./system/boot/loader/grub/grub.nix
@ -470,15 +471,16 @@
./system/boot/loader/grub/memtest.nix
./system/boot/loader/gummiboot/gummiboot.nix
./system/boot/loader/init-script/init-script.nix
./system/boot/loader/loader.nix
./system/boot/loader/raspberrypi/raspberrypi.nix
./system/boot/luksroot.nix
./system/boot/modprobe.nix
./system/boot/networkd.nix
./system/boot/resolved.nix
./system/boot/shutdown.nix
./system/boot/stage-1.nix
./system/boot/stage-2.nix
./system/boot/systemd.nix
./system/boot/networkd.nix
./system/boot/resolved.nix
./system/boot/timesyncd.nix
./system/boot/tmp.nix
./system/etc/etc.nix

View file

@ -186,6 +186,9 @@ in
ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}
# Allow DSA keys for now. (These were deprecated in OpenSSH 7.0.)
PubkeyAcceptedKeyTypes +ssh-dss
${cfg.extraConfig}
'';

View file

@ -4,112 +4,39 @@ with lib;
let
canonicalHandlers = {
powerEvent = {
event = "button/power.*";
action = config.services.acpid.powerEventCommands;
};
lidEvent = {
event = "button/lid.*";
action = config.services.acpid.lidEventCommands;
};
acEvent = {
event = "ac_adapter.*";
action = config.services.acpid.acEventCommands;
};
};
acpiConfDir = pkgs.runCommand "acpi-events" {}
''
mkdir -p $out
${
# Generate a configuration file for each event. (You can't have
# multiple events in one config file...)
let f = event:
let f = name: handler:
''
fn=$out/${event.name}
echo "event=${event.event}" > $fn
echo "action=${pkgs.writeScript "${event.name}.sh" event.action}" >> $fn
fn=$out/${name}
echo "event=${handler.event}" > $fn
echo "action=${pkgs.writeScript "${name}.sh" (concatStringsSep "\n" [ "#! ${pkgs.bash}/bin/sh" handler.action ])}" >> $fn
'';
in lib.concatMapStrings f events
in concatStringsSep "\n" (mapAttrsToList f (canonicalHandlers // config.services.acpid.handlers))
}
'';
events = [powerEvent lidEvent acEvent muteEvent volumeDownEvent volumeUpEvent cdPlayEvent cdNextEvent cdPrevEvent];
# Called when the power button is pressed.
powerEvent =
{ name = "power-button";
event = "button/power.*";
action =
''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.powerEventCommands}
'';
};
# Called when the laptop lid is opened/closed.
lidEvent =
{ name = "lid";
event = "button/lid.*";
action =
''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.lidEventCommands}
'';
};
# Called when the AC power is connected or disconnected.
acEvent =
{ name = "ac-power";
event = "ac_adapter.*";
action =
''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.acEventCommands}
'';
};
muteEvent = {
name = "mute";
event = "button/mute.*";
action = ''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.muteCommands}
'';
};
volumeDownEvent = {
name = "volume-down";
event = "button/volumedown.*";
action = ''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.volumeDownEventCommands}
'';
};
volumeUpEvent = {
name = "volume-up";
event = "button/volumeup.*";
action = ''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.volumeUpEventCommands}
'';
};
cdPlayEvent = {
name = "cd-play";
event = "cd/play.*";
action = ''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.cdPlayEventCommands}
'';
};
cdNextEvent = {
name = "cd-next";
event = "cd/next.*";
action = ''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.cdNextEventCommands}
'';
};
cdPrevEvent = {
name = "cd-prev";
event = "cd/prev.*";
action = ''
#! ${pkgs.bash}/bin/sh
${config.services.acpid.cdPrevEventCommands}
'';
};
in
{
@ -126,6 +53,29 @@ in
description = "Whether to enable the ACPI daemon.";
};
handlers = mkOption {
type = types.attrsOf (types.submodule {
options = {
event = mkOption {
type = types.str;
example = [ "button/power.*" "button/lid.*" "ac_adapter.*" "button/mute.*" "button/volumedown.*" "cd/play.*" "cd/next.*" ];
description = "Event type.";
};
action = mkOption {
type = types.lines;
description = "Shell commands to execute when the event is triggered.";
};
};
});
description = "Event handlers.";
default = {};
example = { mute = { event = "button/mute.*"; action = "amixer set Master toggle"; }; };
};
powerEventCommands = mkOption {
type = types.lines;
default = "";
@ -144,42 +94,6 @@ in
description = "Shell commands to execute on an ac_adapter.* event.";
};
muteCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an button/mute.* event.";
};
volumeDownEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an button/volumedown.* event.";
};
volumeUpEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an button/volumeup.* event.";
};
cdPlayEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an cd/play.* event.";
};
cdNextEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an cd/next.* event.";
};
cdPrevEventCommands = mkOption {
type = types.lines;
default = "";
description = "Shell commands to execute on an cd/prev.* event.";
};
};
};

View file

@ -16,6 +16,12 @@ let
destination = "/etc/udev/rules.d/10-local.rules";
};
extraHwdbFile = pkgs.writeTextFile {
name = "extra-hwdb-file";
text = cfg.extraHwdb;
destination = "/etc/udev/hwdb.d/10-local.hwdb";
};
nixosRules = ''
# Miscellaneous devices.
KERNEL=="kvm", MODE="0666"
@ -55,7 +61,9 @@ let
--replace \"/sbin/modprobe \"${config.system.sbin.modprobe}/sbin/modprobe \
--replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \
--replace \"/sbin/blkid \"${pkgs.utillinux}/sbin/blkid \
--replace \"/bin/mount \"${pkgs.utillinux}/bin/mount
--replace \"/bin/mount \"${pkgs.utillinux}/bin/mount \
--replace /usr/bin/readlink ${pkgs.coreutils}/bin/readlink \
--replace /usr/bin/basename ${pkgs.coreutils}/bin/basename
done
echo -n "Checking that all programs called by relative paths in udev rules exist in ${udev}/lib/udev... "
@ -86,10 +94,30 @@ let
done
echo "OK"
echo "Consider fixing the following udev rules:"
for i in ${toString cfg.packages}; do
grep -l '\(RUN+\|IMPORT{program}\)="\(/usr\)\?/s\?bin' $i/*/udev/rules.d/* || true
done
filesToFixup="$(for i in "$out"/*; do
grep -l '\B\(/usr\)\?/s\?bin' "$i" || :
done)"
if [ -n "$filesToFixup" ]; then
echo "Consider fixing the following udev rules:"
echo "$filesToFixup" | while read localFile; do
remoteFile="origin unknown"
for i in ${toString cfg.packages}; do
for j in "$i"/*/udev/rules.d/*; do
[ -e "$out/$(basename "$j")" ] || continue
[ "$(basename "$j")" = "$(basename "$localFile")" ] || continue
remoteFile="originally from $j"
break 2
done
done
refs="$(
grep -o '\B\(/usr\)\?/s\?bin/[^ "]\+' "$localFile" \
| sed -e ':r;N;''${s/\n/ and /;br};s/\n/, /g;br'
)"
echo "$localFile ($remoteFile) contains references to $refs."
done
exit 1
fi
${optionalString config.networking.usePredictableInterfaceNames ''
cp ${./80-net-setup-link.rules} $out/80-net-setup-link.rules
@ -104,6 +132,27 @@ let
''; # */
};
hwdbBin = stdenv.mkDerivation {
name = "hwdb.bin";
preferLocalBuild = true;
allowSubstitutes = false;
buildCommand = ''
mkdir -p etc/udev/hwdb.d
for i in ${toString ([udev] ++ cfg.packages)}; do
echo "Adding hwdb files for package $i"
for j in $i/{etc,lib}/udev/hwdb.d/*; do
ln -s $j etc/udev/hwdb.d/$(basename $j)
done
done
echo "Generating hwdb database..."
${udev}/bin/udevadm hwdb --update --root=$(pwd)
mv etc/udev/hwdb.bin $out
'';
};
# Udev has a 512-character limit for ENV{PATH}, so create a symlink
# tree to work around this.
udevPath = pkgs.buildEnv {
@ -168,6 +217,21 @@ in
'';
};
extraHwdb = mkOption {
default = "";
example = ''
evdev:input:b0003v05AFp8277*
KEYBOARD_KEY_70039=leftalt
KEYBOARD_KEY_700e2=leftctrl
'';
type = types.lines;
description = ''
Additional <command>hwdb</command> files. They'll be written
into file <filename>10-local.hwdb</filename>. Thus they are
read before all other files.
'';
};
};
hardware.firmware = mkOption {
@ -216,7 +280,7 @@ in
services.udev.extraRules = nixosRules;
services.udev.packages = [ extraUdevRules ];
services.udev.packages = [ extraUdevRules extraHwdbFile ];
services.udev.path = [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.utillinux udev ];
@ -224,6 +288,9 @@ in
[ { source = udevRules;
target = "udev/rules.d";
}
{ source = hwdbBin;
target = "udev/hwdb.bin";
}
];
system.requiredKernelConfig = with config.lib.kernelConfig; [
@ -241,13 +308,6 @@ in
echo "" > /proc/sys/kernel/hotplug
fi
# 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
# Allow the kernel to find our firmware.
if [ -e /sys/module/firmware_class/parameters/path ]; then
echo -n "${config.hardware.firmware}/lib/firmware" > /sys/module/firmware_class/parameters/path
@ -256,6 +316,7 @@ in
systemd.services.systemd-udevd =
{ environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
restartTriggers = cfg.packages;
};
};

View file

@ -9,6 +9,11 @@ let
conf = writeText "smtpd.conf" cfg.serverConfiguration;
args = concatStringsSep " " cfg.extraServerArgs;
sendmail = pkgs.runCommand "opensmtpd-sendmail" {} ''
mkdir -p $out/bin
ln -s ${opensmtpd}/sbin/smtpctl $out/bin/sendmail
'';
in {
###### interface
@ -23,6 +28,15 @@ in {
description = "Whether to enable the OpenSMTPD server.";
};
addSendmailToSystemPath = mkOption {
type = types.bool;
default = true;
description = ''
Whether to add OpenSMTPD's sendmail binary to the
system path or not.
'';
};
extraServerArgs = mkOption {
type = types.listOf types.str;
default = [];
@ -64,7 +78,7 @@ in {
###### implementation
config = mkIf config.services.opensmtpd.enable {
config = mkIf cfg.enable {
users.extraGroups = {
smtpd.gid = config.ids.gids.smtpd;
smtpq.gid = config.ids.gids.smtpq;
@ -98,9 +112,6 @@ in {
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
};
environment.systemPackages = [ (pkgs.runCommand "opensmtpd-sendmail" {} ''
mkdir -p $out/bin
ln -s ${opensmtpd}/sbin/smtpctl $out/bin/sendmail
'') ];
environment.systemPackages = mkIf cfg.addSendmailToSystemPath [ sendmail ];
};
}

View file

@ -23,7 +23,7 @@ in
Type = "oneshot";
ExecStart = ''
${pkgs.sundtek}/bin/mediasrv -d -v -p ${pkgs.sundtek}/bin ;\
${pkgs.sundtek}/bin/mediaclient --start=5 --wait-for-devices
${pkgs.sundtek}/bin/mediaclient --start --wait-for-devices
'';
ExecStop = "${pkgs.sundtek}/bin/mediaclient --shutdown";
RemainAfterExit = true;

View file

@ -53,13 +53,13 @@ in {
config = mkIf cfg.enable {
assertions = [{
assertion = config.networking.useDHCP == false;
assertion = !config.networking.useDHCP;
message = "You can not use services.networking.connman with services.networking.useDHCP";
}{
assertion = config.networking.wireless.enable == true;
assertion = config.networking.wireless.enable;
message = "You must use services.networking.connman with services.networking.wireless";
}{
assertion = config.networking.networkmanager.enable == false;
assertion = !config.networking.networkmanager.enable;
message = "You can not use services.networking.connman with services.networking.networkmanager";
}];

View file

@ -52,6 +52,8 @@ let
));
in listToAttrs (map mkAuthKeyFile usersWithKeys);
supportOldHostKeys = !versionAtLeast config.system.stateVersion "15.07";
in
{
@ -177,7 +179,7 @@ in
default =
[ { type = "rsa"; bits = 4096; path = "/etc/ssh/ssh_host_rsa_key"; }
{ type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; }
] ++ optionals (!versionAtLeast config.system.stateVersion "15.07")
] ++ optionals supportOldHostKeys
[ { type = "dsa"; path = "/etc/ssh/ssh_host_dsa_key"; }
{ type = "ecdsa"; bits = 521; path = "/etc/ssh/ssh_host_ecdsa_key"; }
];
@ -347,6 +349,15 @@ in
${flip concatMapStrings cfg.hostKeys (k: ''
HostKey ${k.path}
'')}
# Allow DSA client keys for now. (These were deprecated
# in OpenSSH 7.0.)
PubkeyAcceptedKeyTypes +ssh-dss
# Re-enable DSA host keys for now.
${optionalString supportOldHostKeys ''
HostKeyAlgorithms +ssh-dss
''}
'';
assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true;

View file

@ -0,0 +1,156 @@
# This module defines global configuration for Haka.
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.haka;
haka = cfg.package;
hakaConf = pkgs.writeText "haka.conf"
''
[general]
configuration = ${if lib.strings.hasPrefix "/" cfg.configFile
then "${cfg.configFile}"
else "${haka}/share/haka/sample/${cfg.configFile}"}
${optionalString (builtins.lessThan 0 cfg.threads) "thread = ${cfg.threads}"}
[packet]
${optionalString cfg.pcap ''module = "packet/pcap"''}
${optionalString cfg.nfqueue ''module = "packet/nqueue"''}
${optionalString cfg.dump.enable ''dump = "yes"''}
${optionalString cfg.dump.enable ''dump_input = "${cfg.dump.input}"''}
${optionalString cfg.dump.enable ''dump_output = "${cfg.dump.output}"''}
interfaces = "${lib.strings.concatStringsSep "," cfg.interfaces}"
[log]
# Select the log module
module = "log/syslog"
# Set the default logging level
#level = "info,packet=debug"
[alert]
# Select the alert module
module = "alert/syslog"
# Disable alert on standard output
#alert_on_stdout = no
# alert/file module option
#file = "/dev/null"
'';
in
{
###### interface
options = {
services.haka = {
enable = mkEnableOption "Haka";
package = mkOption {
default = pkgs.haka;
type = types.package;
description = "
Which Haka derivation to use.
";
};
configFile = mkOption {
default = "empty.lua";
example = "/srv/haka/myfilter.lua";
type = types.string;
description = ''
Specify which configuration file Haka uses.
It can be absolute path or a path relative to the sample directory of
the haka git repo.
'';
};
interfaces = mkOption {
default = [ "eth0" ];
example = [ "any" ];
type = with types; listOf string;
description = ''
Specify which interface(s) Haka listens to.
Use 'any' to listen to all interfaces.
'';
};
threads = mkOption {
default = 0;
example = 4;
type = types.int;
description = ''
The number of threads that will be used.
All system threads are used by default.
'';
};
pcap = mkOption {
default = true;
example = false;
type = types.bool;
description = "Whether to enable pcap";
};
nfqueue = mkEnableOption "nfqueue";
dump.enable = mkEnableOption "dump";
dump.input = mkOption {
default = "/tmp/input.pcap";
example = "/path/to/file.pcap";
type = types.path;
description = "Path to file where incoming packets are dumped";
};
dump.output = mkOption {
default = "/tmp/output.pcap";
example = "/path/to/file.pcap";
type = types.path;
description = "Path to file where outgoing packets are dumped";
};
};
};
###### implementation
config = mkIf cfg.enable {
assertions = [
{ assertion = cfg.pcap != cfg.nfqueue;
message = "either pcap or nfqueue can be enabled, not both.";
}
{ assertion = cfg.nfqueue -> !dump.enable;
message = "dump can only be used with nfqueue.";
}
{ assertion = cfg.interfaces != [];
message = "at least one interface must be specified.";
}];
environment.systemPackages = [ haka ];
systemd.services.haka = {
description = "Haka";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
ExecStart = "${haka}/bin/haka -c ${hakaConf}";
ExecStop = "${haka}/bin/hakactl stop";
User = "root";
Type = "forking";
};
};
};
}

View file

@ -64,7 +64,13 @@ in
else if any (w: w.name == defaultDM) cfg.session.list then
defaultDM
else
throw "Default desktop manager ($(defaultDM)) not found.";
throw ''
Default desktop manager (${defaultDM}) not found.
Probably you want to change
services.xserver.desktopManager.default = "${defaultDM}";
to one of
${concatMapStringsSep "\n " (w: "services.xserver.desktopManager.default = \"${w.name}\";") cfg.session.list}
'';
};
};

View file

@ -64,7 +64,7 @@ in {
environment.gnome3.packageSet = mkOption {
type = types.nullOr types.package;
default = null;
example = literalExample "pkgs.gnome3_16";
example = literalExample "pkgs.gnome3_18";
description = "Which GNOME 3 package set to use.";
apply = p: if p == null then pkgs.gnome3 else p;
};

View file

@ -108,6 +108,12 @@ in
sed -e '/nix\\store\|nix\/store/ d' -i $HOME/.config/Trolltech.conf
fi
# Load PulseAudio module for routing support.
# See http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
${optionalString config.hardware.pulseaudio.enable ''
${config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
# Start KDE.
exec ${kde_workspace}/bin/startkde
'';

View file

@ -55,7 +55,15 @@ in
services.xserver.desktopManager.session = singleton {
name = "kde5";
bgSupport = true;
start = ''exec ${kde5.plasma-workspace}/bin/startkde;'';
start = ''
# Load PulseAudio module for routing support.
# See http://colin.guthr.ie/2009/10/so-how-does-the-kde-pulseaudio-support-work-anyway/
${optionalString config.hardware.pulseaudio.enable ''
${config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
exec ${kde5.plasma-workspace}/bin/startkde
'';
};
security.setuidOwners = singleton {

View file

@ -90,9 +90,6 @@ let
# Publish access credentials in the root window.
${config.hardware.pulseaudio.package}/bin/pactl load-module module-x11-publish "display=$DISPLAY"
# Keep track of devices. Mostly useful for Phonon/KDE.
${config.hardware.pulseaudio.package}/bin/pactl load-module module-device-manager "do_routing=1"
''}
# Tell systemd about our $DISPLAY. This is needed by the

View file

@ -86,7 +86,7 @@ in
};
background = mkOption {
type = types.path;
type = types.str;
description = ''
The background image or color to use.
'';

View file

@ -323,7 +323,7 @@ foreach my $device (keys %$prevSwaps) {
# Should we have systemd re-exec itself?
my $prevSystemd = abs_path("/proc/1/exe") or die;
my $prevSystemd = abs_path("/proc/1/exe") // "/unknown";
my $newSystemd = abs_path("@systemd@/lib/systemd/systemd") or die;
my $restartSystemd = $prevSystemd ne $newSystemd;

View file

@ -3,9 +3,28 @@
with lib;
let
cfg = config.boot.initrd.network;
udhcpcScript = pkgs.writeScript "udhcp-script"
''
#! /bin/sh
if [ "$1" = bound ]; then
ip address add "$ip/$mask" dev "$interface"
if [ -n "$router" ]; then
ip route add default via "$router" dev "$interface"
fi
if [ -n "$dns" ]; then
rm -f /etc/resolv.conf
for i in $dns; do
echo "nameserver $dns" >> /etc/resolv.conf
done
fi
fi
'';
in
{
options = {
@ -14,82 +33,25 @@ in
type = types.bool;
default = false;
description = ''
Add network connectivity support to initrd.
Network options are configured via <literal>ip</literal> kernel
option, according to the kernel documentation.
Add network connectivity support to initrd. The network may be
configured using the <literal>ip</literal> kernel parameter,
as described in <link
xlink:href="https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt">the
kernel documentation</link>. Otherwise, if
<option>networking.useDHCP</option> is enabled, an IP address
is acquired using DHCP.
'';
};
boot.initrd.network.ssh.enable = mkOption {
type = types.bool;
default = false;
boot.initrd.network.postCommands = mkOption {
default = "";
type = types.lines;
description = ''
Start SSH service during initrd boot. It can be used to debug failing
boot on a remote server, enter pasphrase for an encrypted partition etc.
Service is killed when stage-1 boot is finished.
Shell commands to be executed after stage 1 of the
boot has initialised the network.
'';
};
boot.initrd.network.ssh.port = mkOption {
type = types.int;
default = 22;
description = ''
Port on which SSH initrd service should listen.
'';
};
boot.initrd.network.ssh.shell = mkOption {
type = types.str;
default = "/bin/ash";
description = ''
Login shell of the remote user. Can be used to limit actions user can do.
'';
};
boot.initrd.network.ssh.hostRSAKey = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
RSA SSH private key file in the Dropbear format.
WARNING: This key is contained insecurely in the global Nix store. Do NOT
use your regular SSH host private keys for this purpose or you'll expose
them to regular users!
'';
};
boot.initrd.network.ssh.hostDSSKey = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
DSS SSH private key file in the Dropbear format.
WARNING: This key is contained insecurely in the global Nix store. Do NOT
use your regular SSH host private keys for this purpose or you'll expose
them to regular users!
'';
};
boot.initrd.network.ssh.hostECDSAKey = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
ECDSA SSH private key file in the Dropbear format.
WARNING: This key is contained insecurely in the global Nix store. Do NOT
use your regular SSH host private keys for this purpose or you'll expose
them to regular users!
'';
};
boot.initrd.network.ssh.authorizedKeys = mkOption {
type = types.listOf types.str;
default = config.users.extraUsers.root.openssh.authorizedKeys.keys;
description = ''
Authorized keys for the root user on initrd.
'';
};
};
@ -99,51 +61,43 @@ in
boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.mkinitcpio-nfs-utils}/bin/ipconfig
'' + optionalString cfg.ssh.enable ''
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
cp -pv ${pkgs.glibc}/lib/libnss_files.so.* $out/lib
'';
boot.initrd.extraUtilsCommandsTest = optionalString cfg.ssh.enable ''
$out/bin/dropbear -V
'';
boot.initrd.preLVMCommands = mkBefore (
# Search for interface definitions in command line.
''
for o in $(cat /proc/cmdline); do
case $o in
ip=*)
ipconfig $o && hasNetwork=1
;;
esac
done
''
boot.initrd.postEarlyDeviceCommands = ''
# Search for interface definitions in command line
for o in $(cat /proc/cmdline); do
case $o in
ip=*)
ipconfig $o && hasNetwork=1
;;
esac
done
'' + optionalString cfg.ssh.enable ''
if [ -n "$hasNetwork" ]; then
mkdir /dev/pts
mount -t devpts devpts /dev/pts
# Otherwise, use DHCP.
+ optionalString config.networking.useDHCP ''
if [ -z "$hasNetwork" ]; then
mkdir -p /etc
echo 'root:x:0:0:root:/root:${cfg.ssh.shell}' > /etc/passwd
echo '${cfg.ssh.shell}' > /etc/shells
echo 'passwd: files' > /etc/nsswitch.conf
# Bring up all interfaces.
for iface in $(cd /sys/class/net && ls); do
echo "bringing up network interface $iface..."
ip link set "$iface" up
done
mkdir -p /var/log
touch /var/log/lastlog
# Acquire a DHCP lease.
echo "acquiring IP address via DHCP..."
udhcpc --quit --now --script ${udhcpcScript} && hasNetwork=1
fi
''
mkdir -p /etc/dropbear
${optionalString (cfg.ssh.hostRSAKey != null) "ln -s ${cfg.ssh.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"}
${optionalString (cfg.ssh.hostDSSKey != null) "ln -s ${cfg.ssh.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"}
${optionalString (cfg.ssh.hostECDSAKey != null) "ln -s ${cfg.ssh.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"}
mkdir -p /root/.ssh
${concatStrings (map (key: ''
echo -n ${escapeShellArg key} >> /root/.ssh/authorized_keys
'') cfg.ssh.authorizedKeys)}
dropbear -s -j -k -E -m -p ${toString cfg.ssh.port}
fi
'';
+ ''
if [ -n "$hasNetwork" ]; then
echo "networking is up!"
${cfg.postCommands}
fi
'');
};
}

View file

@ -0,0 +1,124 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.boot.initrd.network.ssh;
in
{
options = {
boot.initrd.network.ssh.enable = mkOption {
type = types.bool;
default = false;
description = ''
Start SSH service during initrd boot. It can be used to debug failing
boot on a remote server, enter pasphrase for an encrypted partition etc.
Service is killed when stage-1 boot is finished.
'';
};
boot.initrd.network.ssh.port = mkOption {
type = types.int;
default = 22;
description = ''
Port on which SSH initrd service should listen.
'';
};
boot.initrd.network.ssh.shell = mkOption {
type = types.str;
default = "/bin/ash";
description = ''
Login shell of the remote user. Can be used to limit actions user can do.
'';
};
boot.initrd.network.ssh.hostRSAKey = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
RSA SSH private key file in the Dropbear format.
WARNING: This key is contained insecurely in the global Nix store. Do NOT
use your regular SSH host private keys for this purpose or you'll expose
them to regular users!
'';
};
boot.initrd.network.ssh.hostDSSKey = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
DSS SSH private key file in the Dropbear format.
WARNING: This key is contained insecurely in the global Nix store. Do NOT
use your regular SSH host private keys for this purpose or you'll expose
them to regular users!
'';
};
boot.initrd.network.ssh.hostECDSAKey = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
ECDSA SSH private key file in the Dropbear format.
WARNING: This key is contained insecurely in the global Nix store. Do NOT
use your regular SSH host private keys for this purpose or you'll expose
them to regular users!
'';
};
boot.initrd.network.ssh.authorizedKeys = mkOption {
type = types.listOf types.str;
default = config.users.extraUsers.root.openssh.authorizedKeys.keys;
description = ''
Authorized keys for the root user on initrd.
'';
};
};
config = mkIf (config.boot.initrd.network.enable && cfg.enable) {
boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.dropbear}/bin/dropbear
cp -pv ${pkgs.glibc}/lib/libnss_files.so.* $out/lib
'';
boot.initrd.extraUtilsCommandsTest = ''
$out/bin/dropbear -V
'';
boot.initrd.network.postCommands = ''
mkdir /dev/pts
mount -t devpts devpts /dev/pts
echo '${cfg.shell}' > /etc/shells
echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd
echo 'passwd: files' > /etc/nsswitch.conf
mkdir -p /var/log
touch /var/log/lastlog
mkdir -p /etc/dropbear
${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"}
${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"}
${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"}
mkdir -p /root/.ssh
${concatStrings (map (key: ''
echo -n ${escapeShellArg key} >> /root/.ssh/authorized_keys
'') cfg.authorizedKeys)}
dropbear -s -j -k -E -m -p ${toString cfg.port}
'';
};
}

View file

@ -150,10 +150,6 @@ udevadm trigger --action=add
udevadm settle
# Additional devices initialization.
@postEarlyDeviceCommands@
# Load boot-time keymap before any LVM/LUKS initialization
@extraUtils@/bin/busybox loadkmap < "@busyboxKeymap@"

View file

@ -66,10 +66,6 @@ let
copy_bin_and_libs $BIN
done
# Copy modprobe.
copy_bin_and_libs ${pkgs.kmod}/bin/kmod
ln -sf kmod $out/bin/modprobe
# Copy resize2fs if needed.
${optionalString (any (fs: fs.autoResize) (attrValues config.fileSystems)) ''
# We need mke2fs in the initrd.
@ -161,7 +157,9 @@ let
--replace /sbin/blkid ${extraUtils}/bin/blkid \
--replace ${pkgs.lvm2}/sbin ${extraUtils}/bin \
--replace /sbin/mdadm ${extraUtils}/bin/mdadm \
--replace /bin/sh ${extraUtils}/bin/sh
--replace /bin/sh ${extraUtils}/bin/sh \
--replace /usr/bin/readlink ${extraUtils}/bin/readlink \
--replace /usr/bin/basename ${extraUtils}/bin/basename
done
# Work around a bug in QEMU, which doesn't implement the "READ
@ -203,13 +201,13 @@ let
inherit (config.boot) resumeDevice devSize runSize;
inherit (config.boot.initrd) checkJournalingFS
preLVMCommands preDeviceCommands postEarlyDeviceCommands postDeviceCommands postMountCommands kernelModules;
preLVMCommands preDeviceCommands postDeviceCommands postMountCommands kernelModules;
resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}")
(filter (sd: (sd ? label || hasPrefix "/dev/" sd.device) && !sd.randomEncryption) config.swapDevices);
fsInfo =
let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ];
let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType (builtins.concatStringsSep "," fs.options) ];
in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems));
setHostId = optionalString (config.networking.hostId != null) ''
@ -322,14 +320,6 @@ in
'';
};
boot.initrd.postEarlyDeviceCommands = mkOption {
default = "";
type = types.lines;
description = ''
Shell commands to be executed early after creation of device nodes.
'';
};
boot.initrd.postMountCommands = mkOption {
default = "";
type = types.lines;

View file

@ -41,11 +41,15 @@ let
};
options = mkOption {
default = "defaults";
example = "data=journal";
type = types.commas; # FIXME: should be a list
default = [ "defaults" ];
example = [ "data=journal" ];
description = "Options used to mount the file system.";
};
} // (if versionAtLeast lib.nixpkgsVersion "16.09" then {
type = types.listOf types.str;
} else {
type = types.either types.commas (types.listOf types.str);
apply = x: if isList x then x else lib.strings.splitString "," (builtins.trace "warning: passing a comma-separated string for filesystem options is deprecated; use a list of strings instead. This will become a hard error in 16.09." x);
});
autoFormat = mkOption {
default = false;
@ -112,7 +116,7 @@ in
"/data" = {
device = "/dev/hda2";
fsType = "ext3";
options = "data=journal";
options = [ "data=journal" ];
};
"/bigdisk".label = "bigdisk";
};
@ -127,7 +131,7 @@ in
<command>mount</command>; defaults to
<literal>"auto"</literal>), and <literal>options</literal>
(the mount options passed to <command>mount</command> using the
<option>-o</option> flag; defaults to <literal>"defaults"</literal>).
<option>-o</option> flag; defaults to <literal>[ "defaults" ]</literal>).
Instead of specifying <literal>device</literal>, you can also
specify a volume label (<literal>label</literal>) for file
@ -177,7 +181,7 @@ in
else throw "No device specified for mount point ${fs.mountPoint}.")
+ " " + fs.mountPoint
+ " " + fs.fsType
+ " " + fs.options
+ " " + builtins.concatStringsSep "," fs.options
+ " 0"
+ " " + (if skipCheck fs then "0" else
if fs.mountPoint == "/" then "1" else "2")

View file

@ -927,7 +927,7 @@ in
pkgs.nettools
pkgs.openresolv
]
++ optionals (!config.boot.isContainer) [
++ optionals config.networking.wireless.enable [
pkgs.wirelesstools # FIXME: obsolete?
pkgs.iw
pkgs.rfkill

View file

@ -20,8 +20,7 @@ let cfg = config.ec2; in
autoResize = true;
};
boot.initrd.kernelModules = [ "xen-blkfront" ];
boot.kernelModules = [ "xen-netfront" ];
boot.initrd.kernelModules = [ "xen-blkfront" "xen-netfront" ];
boot.kernelParams = mkIf cfg.hvm [ "console=ttyS0" ];
# Prevent the nouveau kernel module from being loaded, as it
@ -44,6 +43,8 @@ let cfg = config.ec2; in
kill -9 -1
'';
boot.initrd.network.enable = true;
# Mount all formatted ephemeral disks and activate all swap devices.
# We cannot do this with the fileSystems and swapDevices options
# because the set of devices is dependent on the instance type
@ -55,6 +56,28 @@ let cfg = config.ec2; in
# Nix operations.
boot.initrd.postMountCommands =
''
metaDir=$targetRoot/etc/ec2-metadata
mkdir -m 0755 -p "$metaDir"
echo "getting EC2 instance metadata..."
if ! [ -e "$metaDir/ami-manifest-path" ]; then
wget -q -O "$metaDir/ami-manifest-path" http://169.254.169.254/1.0/meta-data/ami-manifest-path
fi
if ! [ -e "$metaDir/user-data" ]; then
wget -q -O "$metaDir/user-data" http://169.254.169.254/1.0/user-data
chmod 600 "$metaDir/user-data"
fi
if ! [ -e "$metaDir/hostname" ]; then
wget -q -O "$metaDir/hostname" http://169.254.169.254/1.0/meta-data/hostname
fi
if ! [ -e "$metaDir/public-keys-0-openssh-key" ]; then
wget -q -O "$metaDir/public-keys-0-openssh-key" http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key
fi
diskNr=0
diskForUnionfs=
for device in /dev/xvd[abcde]*; do
@ -81,7 +104,7 @@ let cfg = config.ec2; in
mkdir -m 1777 -p $targetRoot/$diskForUnionfs/root/tmp $targetRoot/tmp
mount --bind $targetRoot/$diskForUnionfs/root/tmp $targetRoot/tmp
if [ ! -e $targetRoot/.ebs ]; then
if [ "$(cat "$metaDir/ami-manifest-path")" != "(unknown)" ]; then
mkdir -m 755 -p $targetRoot/$diskForUnionfs/root/var $targetRoot/var
mount --bind $targetRoot/$diskForUnionfs/root/var $targetRoot/var

View file

@ -4,18 +4,17 @@
let
bootScript = pkgs.writeScript "bootscript.sh" ''
#!${pkgs.stdenv.shell} -eux
#!${pkgs.stdenv.shell} -eu
echo "attempting to fetch configuration from user-data..."
echo "attempting to fetch configuration from EC2 user data..."
export PATH=${config.nix.package}/bin:${pkgs.wget}/bin:${pkgs.systemd}/bin:${pkgs.gnugrep}/bin:${pkgs.gnused}/bin:${config.system.build.nixos-rebuild}/bin:$PATH
export PATH=${config.nix.package}/bin:${pkgs.systemd}/bin:${pkgs.gnugrep}/bin:${pkgs.gnused}/bin:${config.system.build.nixos-rebuild}/bin:$PATH
export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
userData="$(mktemp)"
wget -q --wait=1 --tries=0 --retry-connrefused -O - http://169.254.169.254/2011-01-01/user-data > "$userData"
userData=/etc/ec2-metadata/user-data
if [ -s "$userData" ]; then
if [[ $? -eq 0 ]]; then
echo "user-data fetched"
# If the user-data looks like it could be a nix expression,
# copy it over. Also, look for a magic three-hash comment and set
# that as the channel.
@ -30,17 +29,17 @@ let
nix-channel --update
fi
echo "setting configuration"
echo "setting configuration from EC2 user data"
cp "$userData" /etc/nixos/configuration.nix
else
echo "user-data does not appear to be a nix expression; ignoring"
echo "user data does not appear to be a Nix expression; ignoring"
exit
fi
else
echo "failed to fetch user-data"
echo "no user data is available"
exit
fi
type -f nixos-rebuild
nixos-rebuild switch
'';
in {

View file

@ -1,6 +1,6 @@
# This module defines a systemd service that obtains the SSH key and
# host name of virtual machines running on Amazon EC2, Eucalyptus and
# OpenStack Compute (Nova).
# This module defines a systemd service that sets the SSH host key and
# authorized client key and host name of virtual machines running on
# Amazon EC2, Eucalyptus and OpenStack Compute (Nova).
{ config, lib, pkgs, ... }:
@ -9,55 +9,49 @@ with lib;
{
config = {
systemd.services.fetch-ec2-data =
{ description = "Fetch EC2 Data";
systemd.services.apply-ec2-data =
{ description = "Apply EC2 Data";
wantedBy = [ "multi-user.target" "sshd.service" ];
before = [ "sshd.service" ];
wants = [ "ip-up.target" ];
after = [ "ip-up.target" ];
path = [ pkgs.wget pkgs.iproute ];
path = [ pkgs.iproute ];
script =
''
wget="wget -q --retry-connrefused -O -"
${optionalString (config.networking.hostName == "") ''
echo "setting host name..."
${pkgs.nettools}/bin/hostname $($wget http://169.254.169.254/1.0/meta-data/hostname)
if [ -s /etc/ec2-metadata/hostname ]; then
${pkgs.nettools}/bin/hostname $(cat /etc/ec2-metadata/hostname)
fi
''}
# Don't download the SSH key if it has already been injected
# into the image (a Nova feature).
if ! [ -e /root/.ssh/authorized_keys ]; then
echo "obtaining SSH key..."
mkdir -m 0700 -p /root/.ssh
$wget http://169.254.169.254/1.0/meta-data/public-keys/0/openssh-key > /root/key.pub
if [ $? -eq 0 -a -e /root/key.pub ]; then
cat /root/key.pub >> /root/.ssh/authorized_keys
if [ -s /etc/ec2-metadata/public-keys-0-openssh-key ]; then
cat /etc/ec2-metadata/public-keys-0-openssh-key >> /root/.ssh/authorized_keys
echo "new key added to authorized_keys"
chmod 600 /root/.ssh/authorized_keys
rm -f /root/key.pub
fi
fi
# Extract the intended SSH host key for this machine from
# the supplied user data, if available. Otherwise sshd will
# generate one normally.
$wget http://169.254.169.254/2011-01-01/user-data > /root/user-data || true
userData=/etc/ec2-metadata/user-data
mkdir -m 0755 -p /etc/ssh
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' /root/user-data)"
key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' /root/user-data)"
key="$(sed 's/|/\n/g; s/SSH_HOST_DSA_KEY://; t; d' $userData)"
key_pub="$(sed 's/SSH_HOST_DSA_KEY_PUB://; t; d' $userData)"
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_dsa_key ]; then
(umask 077; echo "$key" > /etc/ssh/ssh_host_dsa_key)
echo "$key_pub" > /etc/ssh/ssh_host_dsa_key.pub
fi
key="$(sed 's/|/\n/g; s/SSH_HOST_ED25519_KEY://; t; d' /root/user-data)"
key_pub="$(sed 's/SSH_HOST_ED25519_KEY_PUB://; t; d' /root/user-data)"
key="$(sed 's/|/\n/g; s/SSH_HOST_ED25519_KEY://; t; d' $userData)"
key_pub="$(sed 's/SSH_HOST_ED25519_KEY_PUB://; t; d' $userData)"
if [ -n "$key" -a -n "$key_pub" -a ! -e /etc/ssh/ssh_host_ed25519_key ]; then
(umask 077; echo "$key" > /etc/ssh/ssh_host_ed25519_key)
echo "$key_pub" > /etc/ssh/ssh_host_ed25519_key.pub

View file

@ -427,38 +427,38 @@ in
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
{ device = "store";
fsType = "9p";
options = "trans=virtio,version=9p2000.L,cache=loose";
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
neededForBoot = true;
};
"/tmp/xchg" =
{ device = "xchg";
fsType = "9p";
options = "trans=virtio,version=9p2000.L,cache=loose";
options = [ "trans=virtio" "version=9p2000.L" "cache=loose" ];
neededForBoot = true;
};
"/tmp/shared" =
{ device = "shared";
fsType = "9p";
options = "trans=virtio,version=9p2000.L";
options = [ "trans=virtio" "version=9p2000.L" ];
neededForBoot = true;
};
} // optionalAttrs cfg.writableStore
{ "/nix/store" =
{ fsType = "unionfs-fuse";
device = "unionfs";
options = "allow_other,cow,nonempty,chroot=/mnt-root,max_files=32768,hide_meta_files,dirs=/nix/.rw-store=rw:/nix/.ro-store=ro";
options = [ "allow_other" "cow" "nonempty" "chroot=/mnt-root" "max_files=32768" "hide_meta_files" "dirs=/nix/.rw-store=rw:/nix/.ro-store=ro" ];
};
} // optionalAttrs (cfg.writableStore && cfg.writableStoreUseTmpfs)
{ "/nix/.rw-store" =
{ fsType = "tmpfs";
options = "mode=0755";
options = [ "mode=0755" ];
neededForBoot = true;
};
} // optionalAttrs cfg.useBootLoader
{ "/boot" =
{ device = "/dev/vdb2";
fsType = "vfat";
options = "ro";
options = [ "ro" ];
noCheck = true; # fsck fails on a r/o filesystem
};
});

View file

@ -248,6 +248,7 @@ in rec {
tests.ipv6 = callTest tests/ipv6.nix {};
tests.jenkins = callTest tests/jenkins.nix {};
tests.kde4 = callTest tests/kde4.nix {};
tests.initrdNetwork = callTest tests/initrd-network.nix {};
tests.kubernetes = hydraJob (import tests/kubernetes.nix { system = "x86_64-linux"; });
tests.latestKernel.login = callTest tests/login.nix { latestKernel = true; };
#tests.lightdm = callTest tests/lightdm.nix {};

View file

@ -2,8 +2,8 @@ import ./make-test.nix (
{ pkgs
, channelMap ? {
stable = pkgs.chromium;
beta = pkgs.chromiumBeta;
dev = pkgs.chromiumDev;
#beta = pkgs.chromiumBeta;
#dev = pkgs.chromiumDev;
}
, ...
}: rec {

View file

@ -10,9 +10,10 @@ let
inherit system;
modules = [
../maintainers/scripts/ec2/amazon-image.nix
../../nixos/modules/testing/test-instrumentation.nix
{ boot.initrd.kernelModules = [ "virtio" "virtio_blk" "virtio_pci" "virtio_ring" ];
ec2.hvm = true;
../modules/testing/test-instrumentation.nix
../modules/profiles/minimal.nix
../modules/profiles/qemu-guest.nix
{ ec2.hvm = true;
# Hack to make the partition resizing work in QEMU.
boot.initrd.postDeviceCommands = mkBefore
@ -33,6 +34,7 @@ let
ln -s ${pkgs.writeText "userData" userData} $out/2011-01-01/user-data
mkdir -p $out/1.0/meta-data
echo "${hostname}" > $out/1.0/meta-data/hostname
echo "(unknown)" > $out/1.0/meta-data/ami-manifest-path
'' + optionalString (sshPublicKey != null) ''
mkdir -p $out/1.0/meta-data/public-keys/0
ln -s ${pkgs.writeText "sshPublicKey" sshPublicKey} $out/1.0/meta-data/public-keys/0/openssh-key
@ -56,7 +58,7 @@ let
# again when it deletes link-local addresses.) Ideally we'd
# turn off the DHCP server, but qemu does not have an option
# to do that.
my $startCommand = "qemu-kvm -m 768 -net nic -net 'user,net=169.0.0.0/8,guestfwd=tcp:169.254.169.254:80-cmd:${pkgs.micro-httpd}/bin/micro_httpd ${metaData}'";
my $startCommand = "qemu-kvm -m 768 -net nic,vlan=0,model=virtio -net 'user,vlan=0,net=169.0.0.0/8,guestfwd=tcp:169.254.169.254:80-cmd:${pkgs.micro-httpd}/bin/micro_httpd ${metaData}'";
$startCommand .= " -drive file=$diskImage,if=virtio,werror=report";
$startCommand .= " \$QEMU_OPTS";
@ -92,6 +94,8 @@ in {
$machine->waitForFile("/root/user-data");
$machine->waitForUnit("sshd.service");
$machine->succeed("grep unknown /etc/ec2-metadata/ami-manifest-path");
# We have no keys configured on the client side yet, so this should fail
$machine->fail("ssh -o BatchMode=yes localhost exit");

24
nixos/tests/haka.nix Normal file
View file

@ -0,0 +1,24 @@
# This test runs haka and probes it with hakactl
import ./make-test.nix ({ pkgs, ...} : {
name = "haka";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ tvestelind ];
};
nodes = {
haka =
{ config, pkgs, ... }:
{
services.haka.enable = true;
};
};
testScript = ''
startAll;
$haka->waitForUnit("haka.service");
$haka->succeed("hakactl status");
$haka->succeed("hakactl stop");
'';
})

View file

@ -0,0 +1,22 @@
import ./make-test.nix ({ pkgs, ...} : {
name = "initrd-network";
meta.maintainers = [ pkgs.stdenv.lib.maintainers.eelco ];
machine = { config, pkgs, ... }: {
imports = [ ../modules/profiles/minimal.nix ];
boot.initrd.network.enable = true;
boot.initrd.network.postCommands =
''
ip addr | grep 10.0.2.15 || exit 1
ping -c1 10.0.2.2 || exit 1
'';
};
testScript =
''
startAll;
$machine->waitForUnit("multi-user.target");
$machine->succeed("ip link >&2");
'';
})

View file

@ -16,7 +16,7 @@ import ./make-test.nix ({ pkgs, ...} : {
systemd.tmpfiles.rules = [ "d /tmp 1777 root root 10d" ];
fileSystems = mkVMOverride { "/tmp2" =
{ fsType = "tmpfs";
options = "mode=1777,noauto";
options = [ "mode=1777" "noauto" ];
};
};
systemd.automounts = singleton

View file

@ -8,7 +8,7 @@ let
[ { mountPoint = "/data";
device = "server:/data";
fsType = "nfs";
options = "vers=${toString version}";
options = [ "vers=${toString version}" ];
}
];
networking.firewall.enable = false; # FIXME: only open statd

View file

@ -12,6 +12,7 @@
, midiSupport ? false, wildmidi ? null
, wavpackSupport ? false, wavpack ? null
, ffmpegSupport ? false, ffmpeg ? null
, apeSupport ? true, yasm ? null
# misc plugins
, zipSupport ? true, libzip ? null
, artworkSupport ? true, imlib2 ? null
@ -38,6 +39,7 @@ assert cdaSupport -> (libcdio != null && libcddb != null);
assert aacSupport -> faad2 != null;
assert zipSupport -> libzip != null;
assert ffmpegSupport -> ffmpeg != null;
assert apeSupport -> yasm != null;
assert artworkSupport -> imlib2 != null;
assert hotkeysSupport -> libX11 != null;
assert osdSupport -> dbus != null;
@ -68,6 +70,7 @@ stdenv.mkDerivation rec {
++ optional aacSupport faad2
++ optional zipSupport libzip
++ optional ffmpegSupport ffmpeg
++ optional apeSupport yasm
++ optional artworkSupport imlib2
++ optional hotkeysSupport libX11
++ optional osdSupport dbus

View file

@ -1,6 +1,6 @@
{ stdenv
, coreutils
, fetchgit
, fetchurl
, makeWrapper
, pkgconfig
}:
@ -9,12 +9,11 @@ with stdenv.lib.strings;
let
version = "8-1-2015";
version = "0.9.73";
src = fetchgit {
url = git://git.code.sf.net/p/faudiostream/code;
rev = "4db76fdc02b6aec8d15a5af77fcd5283abe963ce";
sha256 = "f1ac92092ee173e4bcf6b2cb1ac385a7c390fb362a578a403b2b6edd5dc7d5d0";
src = fetchurl {
url = "http://downloads.sourceforge.net/project/faudiostream/faust-${version}.tgz";
sha256 = "0x2scxkwvvjx7b7smj5xb8kr269qakf49z3fxpasd9g7025q44k5";
};
meta = with stdenv.lib; {

View file

@ -1,17 +1,26 @@
{ runCommand, fetchurl }:
let
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "ladspa.h-${version}";
version = "1.13";
src = fetchurl {
url = http://www.ladspa.org/ladspa_sdk/ladspa.h.txt;
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
url = "http://http.debian.net/debian/pool/main/l/ladspa-sdk/ladspa-sdk_${version}.orig.tar.gz";
sha256 = "0srh5n2l63354bc0srcrv58rzjkn4gv8qjqzg8dnq3rs4m7kzvdm";
};
in
runCommand "ladspa.h"
{ meta.description = "LADSPA format audio plugins"; }
''
installPhase = ''
mkdir -p $out/include
cp ${src} $out/include/ladspa.h
''
cp src/ladspa.h $out/include/ladspa.h
'';
meta = {
description = "LADSPA format audio plugins header file";
longDescription = ''
The ladspa.h API header file from the LADSPA SDK.
For the full SDK, use the ladspa-sdk package.
'';
homepage = http://www.ladspa.org/ladspa_sdk/overview.html;
license = stdenv.lib.licenses.lgpl2;
maintainers = [ stdenv.lib.maintainers.magnetophon ];
platforms = stdenv.lib.platforms.all;
};
}

View file

@ -87,7 +87,14 @@ stdenv.mkDerivation {
# Desktop file
mkdir -p "$out/share/applications/"
cp "$out/share/spotify/spotify.desktop" "$out/share/applications/"
sed -i "s|Icon=.*|Icon=$out/share/spotify/Icons/spotify-linux-512.png|" "$out/share/applications/spotify.desktop"
# Icons
for i in 16 22 24 32 48 64 128 256 512; do
ixi="$i"x"$i"
mkdir -p "$out/share/icons/hicolor/$ixi/apps"
ln -s "$out/share/spotify/icons/spotify-linux-$i.png" \
"$out/share/icons/hicolor/$ixi/apps/spotify-client.png"
done
'';
dontStrip = true;

View file

@ -171,12 +171,12 @@ rec {
checkstyle = buildEclipseUpdateSite rec {
name = "checkstyle-${version}";
version = "6.11.1.201510102004";
version = "6.14.0.201601142217";
src = fetchzip {
stripRoot = false;
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.11.1/net.sf.eclipsecs-updatesite_${version}-bin.zip";
sha256 = "0l9nfx7a3qdx1pvjgc6ck4rxh7yrvqsskr190yrxxwmpnyj9cjs4";
url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.14.0/net.sf.eclipsecs-updatesite_${version}-bin.zip";
sha256 = "0ysxir1fv0mb9xnidc9hv6llnk48lkav0sryjbx7pw7vy1f8nd4c";
};
meta = with stdenv.lib; {

View file

@ -28,10 +28,10 @@
ada-mode = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib, wisi }:
elpaBuild {
pname = "ada-mode";
version = "5.1.8";
version = "5.1.9";
src = fetchurl {
url = "http://elpa.gnu.org/packages/ada-mode-5.1.8.tar";
sha256 = "015lmliwk4qa2sbs9spxik6dnwsf1a34py6anklf92qnmzhjicy6";
url = "http://elpa.gnu.org/packages/ada-mode-5.1.9.tar";
sha256 = "04hwy9py22c4vpbk24idbyavjdjpm1akvnfigdzx35zljdrvk3l7";
};
packageRequires = [ cl-lib emacs wisi ];
meta = {
@ -148,10 +148,10 @@
}) {};
auctex = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "auctex";
version = "11.89";
version = "11.89.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/auctex-11.89.tar";
sha256 = "0ggk2q17wq4y9yw5b9mykk153ihphazjdj1fl4lv0zblgnrxz5l5";
url = "http://elpa.gnu.org/packages/auctex-11.89.1.tar";
sha256 = "0nqp12l5x2h0hxl8p3l6aiz4mvdf79zz84z1wl3q2prliac3xz17";
};
packageRequires = [];
meta = {
@ -188,10 +188,10 @@
avy = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "avy";
version = "0.3.0";
version = "0.4.0";
src = fetchurl {
url = "http://elpa.gnu.org/packages/avy-0.3.0.tar";
sha256 = "1ycfqabx949s7dgp9vhyb9phpxw83gjw4cc7914gr84bqlkj0458";
url = "http://elpa.gnu.org/packages/avy-0.4.0.tar";
sha256 = "1vbp37ndv5930x120n0isxxxfs8d5wqlrbnxvp6h3ahbbv0zdcsn";
};
packageRequires = [ cl-lib emacs ];
meta = {
@ -417,10 +417,10 @@
}) {};
debbugs = callPackage ({ async, elpaBuild, fetchurl, lib }: elpaBuild {
pname = "debbugs";
version = "0.8";
version = "0.9";
src = fetchurl {
url = "http://elpa.gnu.org/packages/debbugs-0.8.tar";
sha256 = "1wp5wa2a0rwvpfdzd2b78k6vd26qbyqwl4p2c2s5l7zkqy258in5";
url = "http://elpa.gnu.org/packages/debbugs-0.9.tar";
sha256 = "1wc6kw7hihqqdx8qyl01akygycnan44x400hwrcf54m3hb4isa0k";
};
packageRequires = [ async ];
meta = {
@ -445,10 +445,10 @@
diff-hl = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "diff-hl";
version = "1.8.2";
version = "1.8.3";
src = fetchurl {
url = "http://elpa.gnu.org/packages/diff-hl-1.8.2.tar";
sha256 = "1y0v5fiizkmhzafiscrcqjzxpwjcag5rx79lq3iplh58vxlmb65w";
url = "http://elpa.gnu.org/packages/diff-hl-1.8.3.tar";
sha256 = "1i3ngx5gmjl1a15y6d0xmcgdimn7ghrqkbzqisz4ra3dgwbbb3f9";
};
packageRequires = [ cl-lib ];
meta = {
@ -684,6 +684,19 @@
license = lib.licenses.free;
};
}) {};
gnome-c-style = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "gnome-c-style";
version = "0.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/gnome-c-style-0.1.tar";
sha256 = "09w68jbpzyyhcaqw335qpr840j7xx0j81zxxkxq4ahqv6ck27v4x";
};
packageRequires = [];
meta = {
homepage = "http://elpa.gnu.org/packages/gnome-c-style.html";
license = lib.licenses.free;
};
}) {};
gnorb = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "gnorb";
@ -923,6 +936,20 @@
license = lib.licenses.free;
};
}) {};
loccur = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "loccur";
version = "1.2.2";
src = fetchurl {
url = "http://elpa.gnu.org/packages/loccur-1.2.2.el";
sha256 = "0ij5wzxysaikiccw7mjbw1sfylvih0n6b6yyp55vn8w1z2dba0xk";
};
packageRequires = [ cl-lib ];
meta = {
homepage = "http://elpa.gnu.org/packages/loccur.html";
license = lib.licenses.free;
};
}) {};
markchars = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "markchars";
version = "0.2.0";
@ -1017,10 +1044,10 @@
}) {};
multishell = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "multishell";
version = "1.0.4";
version = "1.1.2";
src = fetchurl {
url = "http://elpa.gnu.org/packages/multishell-1.0.4.el";
sha256 = "11nx9h1c039h7md7pr1xlc3kla8n0vq6pa54i25wakf5n30019f4";
url = "http://elpa.gnu.org/packages/multishell-1.1.2.tar";
sha256 = "1y0b6ri0kgxj0jw1cyb796lsy3ipzb7syvmj7pqpx9myzpvd3hz3";
};
packageRequires = [];
meta = {
@ -1175,10 +1202,10 @@
}) {};
org = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "org";
version = "20160118";
version = "20160201";
src = fetchurl {
url = "http://elpa.gnu.org/packages/org-20160118.tar";
sha256 = "107jzpykg5fgd4wzppn2ayvrg2l6z7mnlq8v7r52x15400k9xnxr";
url = "http://elpa.gnu.org/packages/org-20160201.tar";
sha256 = "1lyvfpksl88c9d7k2w4k3iswgjah51k9f8fdi3jbfwivd814m9nb";
};
packageRequires = [];
meta = {
@ -1332,6 +1359,19 @@
license = lib.licenses.free;
};
}) {};
rnc-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "rnc-mode";
version = "0.1";
src = fetchurl {
url = "http://elpa.gnu.org/packages/rnc-mode-0.1.el";
sha256 = "18hm9g05ld8i1apr28dmd9ccq6dc0w6rdqhi0k7ka95jxxdr9m6d";
};
packageRequires = [];
meta = {
homepage = "http://elpa.gnu.org/packages/rnc-mode.html";
license = lib.licenses.free;
};
}) {};
rudel = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "rudel";
version = "0.3";
@ -1663,10 +1703,10 @@
}) {};
wcheck-mode = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
pname = "wcheck-mode";
version = "2016.1.5";
version = "2016.1.30";
src = fetchurl {
url = "http://elpa.gnu.org/packages/wcheck-mode-2016.1.5.el";
sha256 = "0axd32sw1papxz4yscjg85a2li8a8m8z5fn2jzb3620700j86jb3";
url = "http://elpa.gnu.org/packages/wcheck-mode-2016.1.30.el";
sha256 = "0hzrxnslfl04h083njy7wp4hhgrqpyz0cnm73v348kr1i4wx9xjq";
};
packageRequires = [];
meta = {
@ -1729,10 +1769,10 @@
wisi = callPackage ({ cl-lib ? null, elpaBuild, emacs, fetchurl, lib }:
elpaBuild {
pname = "wisi";
version = "1.1.1";
version = "1.1.2";
src = fetchurl {
url = "http://elpa.gnu.org/packages/wisi-1.1.1.tar";
sha256 = "14bpir7kng8b4m1yna4iahhp2z0saagc2i8z53apd39msbplay3r";
url = "http://elpa.gnu.org/packages/wisi-1.1.2.tar";
sha256 = "04gryfpgbviviwbnvv3sh280pzasr59cp5xz1s0yf0n4d3rv2df3";
};
packageRequires = [ cl-lib emacs ];
meta = {
@ -1806,14 +1846,15 @@
license = lib.licenses.free;
};
}) {};
ztree = callPackage ({ elpaBuild, fetchurl, lib }: elpaBuild {
ztree = callPackage ({ cl-lib ? null, elpaBuild, fetchurl, lib }:
elpaBuild {
pname = "ztree";
version = "1.0.2";
version = "1.0.3";
src = fetchurl {
url = "http://elpa.gnu.org/packages/ztree-1.0.2.tar";
sha256 = "0rm9b7cw5md9zbgbq89kh8wb5jdjrqy9g43psdws19z6j532g665";
url = "http://elpa.gnu.org/packages/ztree-1.0.3.tar";
sha256 = "1mwzk48sah4w5jmlmzqxnwhnlnc2mf25ayhgymv24sv8c6hdllsw";
};
packageRequires = [];
packageRequires = [ cl-lib ];
meta = {
homepage = "http://elpa.gnu.org/packages/ztree.html";
license = lib.licenses.free;

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, buildEnv, makeDesktopItem, makeWrapper, zlib, glib, alsaLib
{ stdenv, fetchurl, buildEnv, zlib, glib, alsaLib, makeDesktopItem
, dbus, gtk, atk, pango, freetype, fontconfig, libgnome_keyring3, gdk_pixbuf
, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, udev
, cairo, cups, expat, libgpgerror, nspr, gnome3, nss, xorg, udev, libnotify
}:
let
@ -8,51 +8,58 @@ let
stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
xorg.libXcomposite xorg.libXi xorg.libXfixes
];
xorg.libXcomposite xorg.libXi xorg.libXfixes libnotify xorg.libXrandr
xorg.libXcursor
];
desktopItem = makeDesktopItem {
name = "LightTable";
exec = "light";
comment = "LightTable";
desktopName = "LightTable";
genericName = "the next generation code editor";
};
in
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
stdenv.mkDerivation rec {
name = "lighttable-${version}";
version = "0.7.2";
version = "0.8.1";
src =
if stdenv.system == "i686-linux" then
fetchurl {
name = "LightTableLinux.tar.gz";
url = "https://d35ac8ww5dfjyg.cloudfront.net/playground/bins/${version}/LightTableLinux.tar.gz";
sha256 = "1q5m50r319xn9drfv3cyfja87b7dfhni9d9gmz9733idq3l5fl9i";
}
else
src =
fetchurl {
name = "LightTableLinux64.tar.gz";
url = "https://d35ac8ww5dfjyg.cloudfront.net/playground/bins/${version}/LightTableLinux64.tar.gz";
sha256 = "1jnn103v5qrplkb5ik9p8whfqclcq2r1qv666hp3jaiwb46vhf3c";
url = "https://github.com/LightTable/LightTable/releases/download/${version}/${name}-linux.tar.gz";
sha256 = "06fj725xfhf3fwrf7dya7ijmxq3v76kfmd4lr2067a92zhlwr5pv";
};
buildInputs = [ makeWrapper ];
phases = [ "installPhase" ];
installPhase = ''
tar xvf ${src}
mkdir -p $out/bin
mv LightTable $out/
tar xf ${src}
mkdir -p $out/{bin,share/LightTable}
mv ./${name}-linux/* $out/share/LightTable
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$out/LightTable/ltbin
--set-rpath ${libPath}:${libPath}/lib64:$out/share/LightTable \
$out/share/LightTable/LightTable
ln -sf ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0
mv $out/share/LightTable/light $out/bin/light
makeWrapper $out/LightTable/ltbin $out/bin/lighttable \
--prefix "LD_LIBRARY_PATH" : $out/LightTable
ln -s ${udev}/lib/libudev.so.1 $out/share/LightTable/libudev.so.0
substituteInPlace $out/bin/light \
--replace "/usr/lib/x86_64-linux-gnu" "${udev}/lib" \
--replace "/lib/x86_64-linux-gnu" "$out/share/LightTable" \
--replace 'HERE=`dirname $(readlink -f $0)`' "HERE=$out/share/LightTable"
mkdir -p "$out"/share/applications
cp "${desktopItem}/share/applications/LightTable.desktop" "$out"/share/applications/
'';
meta = with stdenv.lib; {
description = "the next generation code editor";
homepage = http://www.lighttable.com/;
license = licenses.gpl3;
maintainers = [ maintainers.matejc ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -6,7 +6,7 @@ assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
assert gksuSupport -> gksu != null;
let
build = "3083";
build = "3101";
libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk cairo pango];
redirects = [ "/usr/bin/pkexec=${pkexecPath}" ]
++ stdenv.lib.optional gksuSupport "/usr/bin/gksudo=${gksu}/bin/gksudo";
@ -18,15 +18,15 @@ in let
src =
if stdenv.system == "i686-linux" then
fetchurl {
name = "sublimetext-3.0.83.tar.bz2";
url = "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_${build}_x32.tar.bz2";
sha256 = "0r9irk2gdwdx0dk7lgssr4krfvf3lf71pzaz5hyjc704zaxf5s49";
name = "sublimetext-${build}.tar.bz2";
url = "https://download.sublimetext.com/sublime_text_3_build_${build}_x32.tar.bz2";
sha256 = "1klssh79mxm7i6r77p9a6a1rqzssnkv5y4k37bnxv8bilwqhfrcz";
}
else
fetchurl {
name = "sublimetext-3.0.83.tar.bz2";
url = "http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_${build}_x64.tar.bz2";
sha256 = "1vhlrqz7xscmjnxpz60mdpvflanl26d7673ml7psd75n0zvcfra5";
name = "sublimetext-${build}.tar.bz2";
url = "https://download.sublimetext.com/sublime_text_3_build_${build}_x64.tar.bz2";
sha256 = "0yrhn2mc5f2y4cy2ydya4h97bij0cm51yd4q06l6yjshl6qyc2db";
};
dontStrip = true;

View file

@ -1,46 +1,35 @@
{ stdenv, fetchurl, libsoup, graphicsmagick, SDL, json_glib
, GConf, atk, cairo, cmake, curl, dbus_glib, exiv2, glib
, libgnome_keyring, gtk, ilmbase, intltool, lcms, lcms2
, libgnome_keyring, gtk3, ilmbase, intltool, lcms, lcms2
, lensfun, libXau, libXdmcp, libexif, libglade, libgphoto2, libjpeg
, libpng, libpthreadstubs, libraw1394, librsvg, libtiff, libxcb
, libpng, libpthreadstubs, librsvg, libtiff, libxcb
, openexr, pixman, pkgconfig, sqlite, bash, libxslt, openjpeg
, mesa }:
, mesa, lua, pugixml, colord, colord-gtk, libxshmfence, libxkbcommon
, epoxy, at_spi2_core, libwebp, libsecret, wrapGAppsHook, gnome3
}:
assert stdenv ? glibc;
stdenv.mkDerivation rec {
version = "1.6.9";
version = "2.0.0";
name = "darktable-${version}";
src = fetchurl {
url = "https://github.com/darktable-org/darktable/releases/download/release-${version}/darktable-${version}.tar.xz";
sha256 = "0wri89ygjpv7npiz58mnydhgldywp6arqp9jq3v0g54a56fiwwhg";
sha256 = "1cbwvzqn3158cy7r499rdwipx7fpb30lrrvh6jy5a4xvpcjzbwnl";
};
buildInputs =
[ GConf atk cairo cmake curl dbus_glib exiv2 glib libgnome_keyring gtk
[ GConf atk cairo cmake curl dbus_glib exiv2 glib libgnome_keyring gtk3
ilmbase intltool lcms lcms2 lensfun libXau libXdmcp libexif
libglade libgphoto2 libjpeg libpng libpthreadstubs libraw1394
libglade libgphoto2 libjpeg libpng libpthreadstubs
librsvg libtiff libxcb openexr pixman pkgconfig sqlite libxslt
libsoup graphicsmagick SDL json_glib openjpeg mesa
libsoup graphicsmagick SDL json_glib openjpeg mesa lua pugixml
colord colord-gtk libxshmfence libxkbcommon epoxy at_spi2_core
libwebp libsecret wrapGAppsHook gnome3.adwaita-icon-theme
];
preConfigure = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/include/gtk-2.0"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk}/lib/gtk-2.0/include"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo}/include/cairo"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk}/include/atk-1.0"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${ilmbase}/include/OpenEXR"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${openexr}/include/OpenEXR"
'';
cmakeFlags = [
"-DPTHREAD_INCLUDE_DIR=${stdenv.glibc}/include"
"-DPTHREAD_LIBRARY=${stdenv.glibc}/lib/libpthread.so"
"-DCMAKE_BUILD_TYPE=Release"
"-DBINARY_PACKAGE_BUILD=1"
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include"
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk}/lib/gtk-2.0/include"
"-DBUILD_USERMANUAL=False"
];

View file

@ -5,12 +5,12 @@
}:
stdenv.mkDerivation rec {
version = "2.49.0";
version = "2.50.1";
name = "calibre-${version}";
src = fetchurl {
url = "http://download.calibre-ebook.com/${version}/${name}.tar.xz";
sha256 = "0jc476pg07c0nwccprhwgjdlvvb2fdzza9xrjqzc0c42c5v7qzxa";
sha256 = "0fy5fwj53hl8bcl412d2y61xm1nmkry24dlanj07nn6dhmrs0cm9";
};
inherit python;

View file

@ -0,0 +1,29 @@
{ stdenv, fetchgit, fftw, ncurses, libpulseaudio }:
stdenv.mkDerivation rec {
version = "2016-06-02";
name = "cli-visualizer-${version}";
src = fetchgit {
url = "https://github.com/dpayne/cli-visualizer.git";
rev = "bc0104eb57e7a0b3821510bc8f93cf5d1154fa8e";
sha256 = "7b0c69a16b4854149522e2d0ec544412fb368cecba771d1e9481330ed86c8cb7";
};
buildInputs = [ fftw ncurses libpulseaudio ];
buildFlags = [ "ENABLE_PULSE=1" ];
installPhase = ''
mkdir -p $out/bin
cp build/vis $out/bin/vis
'';
meta = {
homepage = "https://github.com/dpayne/cli-visualizer";
description = "CLI based audio visualizer";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
platforms = with stdenv.lib.platforms; linux;
};
}

View file

@ -1,14 +1,14 @@
{ stdenv, cmake, fetchurl, ncurses }:
let
version = "1.1";
version = "1.2";
in
stdenv.mkDerivation {
name = "ctodo-${version}";
src = fetchurl {
url = "https://github.com/Acolarh/ctodo/archive/v1.1.tar.gz";
sha256 = "1sv5p1b08pp73qshakz4qy4pjglxz2pvx2cjfx52i3532hd3xcaf";
url = "https://github.com/Acolarh/ctodo/archive/v${version}.tar.gz";
sha256 = "0kjd84q8aw238z09yz9n1p732fh08vijaf8bk1xqlx544cgyfcjm";
};
buildInputs = [ stdenv cmake ncurses ];

View file

@ -0,0 +1,44 @@
{ stdenv, fetchurl, buildPythonPackage, pythonPackages, slowaes }:
buildPythonPackage rec {
name = "electrum-dash-${version}";
version = "2.4.1";
src = fetchurl {
url = "https://github.com/dashpay/electrum-dash/releases/download/v${version}/Electrum-DASH-${version}.tar.gz";
sha256 = "02k7m7fyn0cvlgmwxr2gag7rf2knllkch1ma58shysp7zx9jb000";
};
propagatedBuildInputs = with pythonPackages; [
dns
ecdsa
pbkdf2
protobuf
pyasn1
pyasn1-modules
pycrypto
pyqt4
qrcode
requests
slowaes
tlslite
x11_hash
mnemonic
# plugins
trezor
];
preInstall = ''
mkdir -p $out/share
sed -i 's@usr_share = .*@usr_share = os.getenv("out")+"/share"@' setup.py
pyrcc4 icons.qrc -o gui/qt/icons_rc.py
'';
meta = with stdenv.lib; {
description = "Electrum DASH";
homepage = https://github.com/dashpay/electrum-dash;
license = licenses.gpl3;
maintainers = with maintainers; [ np ];
};
}

View file

@ -22,6 +22,14 @@ buildPythonPackage rec {
requests
slowaes
tlslite
# plugins
trezor
keepkey
# TODO plugins
# matplotlib
# btchip
# amodem
];
preInstall = ''
@ -40,6 +48,6 @@ buildPythonPackage rec {
'';
homepage = https://electrum.org;
license = licenses.gpl3;
maintainers = with maintainers; [ ehmry joachifm ];
maintainers = with maintainers; [ ehmry joachifm np ];
};
}

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, readline, ncurses }:
let
version = "1.17";
version = "1.19";
in
stdenv.mkDerivation rec {
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://github.com/dvorka/hstr/releases/download/${version}/hh-${version}-src.tgz";
sha256 = "0vjc4d8cl3sfbv9lywdpd2slffqyp3cpj52yp29g9lr2n3nfksk8";
sha256 = "0ix6550l9si29j8vz375vzjmp22i19ik5dq2nh7zsj2ra7ibaz5n";
};
buildInputs = [ readline ncurses ];

View file

@ -8,19 +8,17 @@
# plugin derivations in the Nix store and nowhere else.
with builtins; buildDotnetPackage rec {
baseName = "keepass";
version = "2.30";
version = "2.31";
src = fetchurl {
url = "mirror://sourceforge/keepass/KeePass-${version}-Source.zip";
sha256 = "1r792cikgvzj4hrxiv7xd3gx2zmn16dbh4inj2zi6ny0gchkqg2a";
sha256 = "10bqxpq30gzfq2ip6dkmqlzzsh3bnfdb01jry5xhgxvlycq1lnsm";
};
sourceRoot = ".";
buildInputs = [ unzip makeWrapper ];
patches = [ ./keepass.patch ];
pluginLoadPathsPatch =
let outputLc = toString (add 8 (length plugins));
patchTemplate = readFile ./keepass-plugins.patch;
@ -34,10 +32,21 @@ with builtins; buildDotnetPackage rec {
passAsFile = [ "pluginLoadPathsPatch" ];
postPatch = ''
patch --binary -p1 <$pluginLoadPathsPatchPath
sed -i 's/\r*$//' KeePass/Forms/MainForm.cs
patch -p1 <$pluginLoadPathsPatchPath
'';
preConfigure = "rm -rvf Build/*";
preConfigure = ''
rm -rvf Build/*
find . -name "*.sln" -print -exec sed -i 's/Format Version 10.00/Format Version 11.00/g' {} \;
find . -name "*.csproj" -print -exec sed -i '
s#ToolsVersion="3.5"#ToolsVersion="4.0"#g
s#<TargetFrameworkVersion>.*</TargetFrameworkVersion>##g
s#<PropertyGroup>#<PropertyGroup><TargetFrameworkVersion>v4.5</TargetFrameworkVersion>#g
s#<SignAssembly>.*$#<SignAssembly>false</SignAssembly>#g
s#<PostBuildEvent>.*sgen.exe.*$##
' {} \;
'';
desktopItem = makeDesktopItem {
name = "keepass";

View file

@ -1,89 +0,0 @@
diff -Naur old/KeePass/KeePass.csproj new/KeePass/KeePass.csproj
--- old/KeePass/KeePass.csproj 2015-04-10 11:00:46.000000000 +0100
+++ new/KeePass/KeePass.csproj 2015-05-27 16:35:52.196177593 +0100
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,7 +10,7 @@
<RootNamespace>KeePass</RootNamespace>
<AssemblyName>KeePass</AssemblyName>
<ApplicationIcon>KeePass.ico</ApplicationIcon>
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>KeePass.pfx</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -1316,6 +1316,5 @@
</Target>
-->
<PropertyGroup>
- <PostBuildEvent>"$(FrameworkSDKDir)bin\sgen.exe" /assembly:"$(TargetPath)" /force /nologo /compiler:/keycontainer:VS_KEY_33430356D8D7D1B8 /compiler:/delaysign-</PostBuildEvent>
</PropertyGroup>
-</Project>
\ No newline at end of file
+</Project>
diff -Naur old/KeePassLib/KeePassLib.csproj new/KeePassLib/KeePassLib.csproj
--- old/KeePassLib/KeePassLib.csproj 2014-05-08 15:00:24.000000000 +0100
+++ new/KeePassLib/KeePassLib.csproj 2015-05-27 16:35:52.197177562 +0100
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>KeePassLib</RootNamespace>
<AssemblyName>KeePassLib</AssemblyName>
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>KeePassLib.pfx</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
diff -Naur old/KeePass.sln new/KeePass.sln
--- old/KeePass.sln 2009-08-31 19:47:28.000000000 +0100
+++ new/KeePass.sln 2015-05-27 16:35:59.568953518 +0100
@@ -1,11 +1,9 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
+Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLib", "KeePassLib\KeePassLib.csproj", "{53573E4E-33CB-4FDB-8698-C95F5E40E7F3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePass", "KeePass\KeePass.csproj", "{10938016-DEE2-4A25-9A5A-8FD3444379CA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeePassLibSD", "KeePassLibSD\KeePassLibSD.csproj", "{DC15F71A-2117-4DEF-8C10-AA355B5E5979}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrlUtil", "Translation\TrlUtil\TrlUtil.csproj", "{B7E890E7-BF50-4450-9A52-C105BD98651C}"
EndProject
Global
@@ -44,18 +42,6 @@
{10938016-DEE2-4A25-9A5A-8FD3444379CA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{10938016-DEE2-4A25-9A5A-8FD3444379CA}.Release|Win32.ActiveCfg = Release|Any CPU
{10938016-DEE2-4A25-9A5A-8FD3444379CA}.Release|x64.ActiveCfg = Release|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Any CPU.Build.0 = Release|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|Win32.ActiveCfg = Release|Any CPU
- {DC15F71A-2117-4DEF-8C10-AA355B5E5979}.Release|x64.ActiveCfg = Release|Any CPU
{B7E890E7-BF50-4450-9A52-C105BD98651C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7E890E7-BF50-4450-9A52-C105BD98651C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7E890E7-BF50-4450-9A52-C105BD98651C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
diff -Naur old/Translation/TrlUtil/TrlUtil.csproj new/Translation/TrlUtil/TrlUtil.csproj
--- old/Translation/TrlUtil/TrlUtil.csproj 2013-07-21 10:06:38.000000000 +0100
+++ new/Translation/TrlUtil/TrlUtil.csproj 2015-05-27 16:35:52.197177562 +0100
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "keepassx2-${version}";
version = "2.0";
version = "2.0.2";
src = fetchurl {
url = "https://www.keepassx.org/releases/${version}/keepassx-${version}.tar.gz";
sha256 = "1ri2r1sldc62hbg74m4pmci0nrjwvv38rqhyzhyjin247an0zd0f";
sha256 = "1f1nlbd669rmpzr52d9dgfgclg4jcaq2jkrby3b8q1vjkksdqjr0";
};
buildInputs = [ cmake libgcrypt qt4 xorg.libXtst ];

View file

@ -11,11 +11,11 @@ let
in nodePackages.buildNodePackage rec {
name = "keybase-${version}";
version = "0.8.22";
version = "0.8.25";
src = [(fetchurl {
url = "https://github.com/keybase/node-client/archive/v${version}.tar.gz";
sha256 = "1dvwz2iqcybd687hp6zbw6lkpx27vp8ah6kk251147vxvwfjb422";
sha256 = "1zc357hwh26lsg8ngj7iwjdmywyzk6fz3wxmcqq1qyp2927i4jz3";
})];
deps = (filter (v: nixType v == "derivation") (attrValues nodePackages));

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
{ stdenv, fetchurl, pkgs, pythonPackages }:
pythonPackages.buildPythonPackage rec {
version = "0.6.3";
version = "0.8.1";
name = "khard-${version}";
namePrefix = "";
src = fetchurl {
url = "https://github.com/scheibler/khard/archive/v${version}.tar.gz";
sha256 = "1dn1v4ycgqbq8vknz1dy710asq8cizxmzaynn69xknwkpgda7fm9";
sha256 = "13axfrs96isirx0c483545xdmjwwfq1k7yy92xpk7l184v71rgi1";
};
propagatedBuildInputs = with pythonPackages; [
@ -18,6 +18,7 @@ pythonPackages.buildPythonPackage rec {
buildInputs = with pythonPackages; [
pkgs.vdirsyncer
pyyaml
];
meta = {

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, ncurses }:
stdenv.mkDerivation rec {
version = "1.0.1";
version = "1.0.4";
name = "mdp-${version}";
src = fetchurl {
url = "https://github.com/visit1985/mdp/archive/${version}.tar.gz";
sha256 = "0vmr0ymq06r50yags9nv6fk4f890b82a7bvxg697vrgs04i2x4dy";
sha256 = "1wvys3sb0ki7zz5b0y4bl9x6jdj7h88lxsf8vap95k1sj2ymanlm";
};
makeFlags = "PREFIX=$(out)";

View file

@ -24,7 +24,6 @@ stdenv.mkDerivation rec {
];
preConfigure = ''
substituteInPlace configure --replace gmcs mcs
substituteInPlace lib/poppler-sharp/poppler-sharp/poppler-sharp.dll.config \
--replace libpoppler-glib.so.4 libpoppler-glib.so
'';

View file

@ -1,15 +1,15 @@
{ stdenv, fetchurl, git, gnupg, makeWrapper, pass, qtbase, qttools }:
{ stdenv, fetchurl, git, gnupg, makeQtWrapper, pass, qtbase, qtsvg, qttools }:
stdenv.mkDerivation rec {
name = "qtpass-${version}";
version = "1.0.6";
version = "1.1.0";
src = fetchurl {
url = "https://github.com/IJHack/qtpass/archive/v${version}.tar.gz";
sha256 = "ccad9a06e3efa23278fa3e958185bf24fb3800874d8165be4ae6649706a2ab1c";
sha256 = "60b458062f54184057e55dbd9c93958a8bf845244ffd70b9cb31bf58697f0dc6";
};
buildInputs = [ git gnupg makeWrapper pass qtbase qttools ];
buildInputs = [ git gnupg makeQtWrapper pass qtbase qtsvg qttools ];
configurePhase = "qmake CONFIG+=release PREFIX=$out DESTDIR=$out";
@ -18,11 +18,11 @@ stdenv.mkDerivation rec {
mv $out/qtpass $out/bin
'';
postInstall = ''
wrapProgram $out/bin/qtpass \
--suffix PATH : ${git}/bin \
--suffix PATH : ${gnupg}/bin \
--suffix PATH : ${pass}/bin
postFixup = ''
wrapQtProgram $out/bin/qtpass \
--suffix PATH : ${git}/bin \
--suffix PATH : ${gnupg}/bin \
--suffix PATH : ${pass}/bin
'';
meta = with stdenv.lib; {

View file

@ -1,15 +1,15 @@
{ stdenv, fetchurl, yacc, ncurses, libxml2 }:
let
version = "0.1.9";
version = "0.2.1";
in
stdenv.mkDerivation rec {
name = "scim-${version}";
name = "sc-im-${version}";
src = fetchurl {
url = "https://github.com/andmarti1424/sc-im/archive/v${version}.tar.gz";
sha256 = "00rjz344acw0bxv78x1w9jz8snl9lb9qhr9z22phxinidnd3vaaz";
sha256 = "08yks8grj5w434r81dy2knzbdhdnkc23r0d9v848mcl706xnjl6j";
};
buildInputs = [ yacc ncurses libxml2 ];
@ -29,12 +29,9 @@ stdenv.mkDerivation rec {
'';
meta = {
homepage = "https://github.com/andmarti1424/scim";
description = "SCIM - Spreadsheet Calculator Improvised - SC fork";
license = {
fullName = "SCIM License";
url = "https://github.com/andmarti1424/scim/raw/master/LICENSE";
};
homepage = "https://github.com/andmarti1424/sc-im";
description = "SC-IM - Spreadsheet Calculator Improvised - SC fork";
license = stdenv.lib.licenses.bsdOriginal;
maintainers = [ stdenv.lib.maintainers.matthiasbeyer ];
platforms = with stdenv.lib.platforms; linux; # Cannot test others
};

View file

@ -1,19 +1,14 @@
{fetchurl, stdenv, makeWrapper, gtk3, python3Packages}:
let
version = "0.9.2";
in
stdenv.mkDerivation {
{fetchurl, stdenv, gtk3, python34Packages, gobjectIntrospection}:
python34Packages.buildPythonPackage rec {
name = "solaar-${version}";
version = "0.9.2";
namePrefix = "";
src = fetchurl {
sha256 = "0954grz2adggfzcj4df4mpr4d7qyl7w8rb4j2s0f9ymawl92i05j";
url = "https://github.com/pwr/Solaar/archive/${version}.tar.gz";
};
buildInputs = [gtk3 python3Packages.pygobject3 python3Packages.pyudev];
enableParallelBuilding = true;
installPhase = ''
mkdir -p "$out";
'';
propagatedBuildInputs = [python34Packages.pygobject3 python34Packages.pyudev gobjectIntrospection gtk3];
postInstall = ''
wrapProgram "$out/bin/solaar" \
--prefix PYTHONPATH : "$PYTHONPATH" \
@ -22,6 +17,8 @@ stdenv.mkDerivation {
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Linux devices manager for the Logitech Unifying Receiver";
longDescription = ''

View file

@ -16,7 +16,7 @@ let
mkPluginInfo = { output ? "out", allowedVars ? [ output ]
, flags ? [], envVars ? {}
}: let
shSearch = ["'"] ++ map (var: "\$${var}") allowedVars;
shSearch = ["'"] ++ map (var: "@${var}@") allowedVars;
shReplace = ["'\\''"] ++ map (var: "'\"\${${var}}\"'") allowedVars;
# We need to triple-escape "val":
# * First because makeWrapper doesn't do any quoting of its arguments by
@ -94,8 +94,8 @@ let
output = "flash";
allowedVars = [ "flash" "flashVersion" ];
flags = [
"--ppapi-flash-path=$flash/lib/libpepflashplayer.so"
"--ppapi-flash-version=$flashVersion"
"--ppapi-flash-path=@flash@/lib/libpepflashplayer.so"
"--ppapi-flash-version=@flashVersion@"
];
}}
@ -107,7 +107,7 @@ let
${mkPluginInfo {
output = "widevine";
flags = [ "--register-pepper-plugins=${wvModule}${wvInfo}" ];
envVars.NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE = "$widevine/lib";
envVars.NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE = "@widevine@/lib";
}}
'';

View file

@ -7,15 +7,15 @@
sha256bin64 = "1l5s504mmr4v5y67fsla9hyrk7dm155yc790ld87s1ya03h455gr";
};
beta = {
version = "48.0.2564.48";
sha256 = "1qasdz9rwdqa2if8y4kkk19fspgjpk3q782c8l1p5n2cm25lkfa9";
sha256bin32 = "0pgc3iy4s7whmckc14r0cvgmk7pqgidd2w0xv53bfq2k504b5ykw";
sha256bin64 = "1lx6l8s2wdgzldbm8licpf22l6z13mvq05xlbn8ybizhn159nykj";
version = "49.0.2623.28";
sha256 = "1cpgfcw6kgw70k14wa1m5qzj4rnvkzrw1am30d34516mbwlmmqc8";
sha256bin32 = "0nwhjav1x325h1drqknrjl5glivn4fdpahs1nlaqfk8kbjh1q113";
sha256bin64 = "0wj6j0v3rngsclzbb8rc8l90wdi98j2sb60r2ypfihaxq2gd138y";
};
stable = {
version = "47.0.2526.106";
sha256 = "1rjqkawj7l127cd9s1wxwn4v7dfbrlahml98sam3fg8a6drm0lv4";
sha256bin32 = "14svd5x8lzfyyigfirxx1q9pg2bsnnb0fdwa7vvh1awq3zzfd38n";
sha256bin64 = "121289vwaz391b32hp2lihlpaql76y44gdpqkl9a3md0j1zk1nd9";
version = "48.0.2564.97";
sha256 = "1nsjn8zlqljizy5dmg2rxwkw4k5j4yi15ywxi9ca3acv68dbhd3p";
sha256bin32 = "0gdd9krsfsixw5b03msm7nf7zl7xh4chzkh9srb19c1kzygl2j2l";
sha256bin64 = "1wmw17gdq1j6vxfdc8s94jc8z30pza8nipk4dh590xnb7faihr52";
};
}

View file

@ -133,8 +133,8 @@ in {
firefox-unwrapped = common {
pname = "firefox";
version = "43.0.4";
sha256 = "0xjs4j26h8fyy8izrcc482vfvgg4gqzap5kh17jfv7flhn9akkvn";
version = "44.0";
sha256 = "07ac1h6ib36nm4a0aykh1z36vgw6wqlblil0zsj0lchdhksb10pa";
};
firefox-esr-unwrapped = common {

View file

@ -1,9 +0,0 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation {
name = "links-1.00pre15";
src = fetchurl {
url = http://artax.karlin.mff.cuni.cz/~mikulas/links/download/links-1.00pre15.tar.gz;
sha256 = "0yzgzc6jm9vhv7rgbj5s9zwxn9fnf4nyap9l6dzgpwsn7m18vprv";
};
}

View file

@ -8,12 +8,12 @@
}:
stdenv.mkDerivation rec {
version = "2.11";
version = "2.12";
name = "links2-${version}";
src = fetchurl {
url = "${meta.homepage}/download/links-${version}.tar.bz2";
sha256 = "0gqjdz1brdcx02mcwchi6bxy1i1ljbw5zpc6b321skrrsqkzkxw7";
sha256 = "0knq15yrp60s4jh92aacw8yfc2pcv3bqsw7dba7h5s6ivq8ihhcq";
};
buildInputs =

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "marathon-${version}";
version = "0.8.1";
version = "0.14.1";
src = fetchurl {
url = "https://downloads.mesosphere.io/marathon/v${version}/marathon-${version}.tgz";
sha256 = "1g2z2c8p47rryyappwv0k3najb6bypvwgg7z9z8prvph2x6rafp6";
sha256 = "0vdl7jf7yhb985dj3v46qnqjv1zwfkyizlsyf9c5dq7khvxrp1l4";
};
buildInputs = [ makeWrapper jdk mesos ];
@ -17,14 +17,14 @@ stdenv.mkDerivation rec {
makeWrapper ${jdk.jre}/bin/java $out/bin/marathon \
--add-flags "-Xmx512m -jar $out/libexec/marathon/${name}.jar" \
--prefix "MESOS_NATIVE_JAVA_LIBRARY" : "$MESOS_NATIVE_JAVA_LIBRARY"
--set "MESOS_NATIVE_JAVA_LIBRARY" "$MESOS_NATIVE_JAVA_LIBRARY"
'';
meta = with stdenv.lib; {
homepage = https://mesosphere.github.io/marathon;
description = "Cluster-wide init and control system for services in cgroups or Docker containers";
license = licenses.asl20;
maintainers = with maintainers; [ rushmorem ];
maintainers = with maintainers; [ rushmorem kamilchm ];
platforms = platforms.linux;
};
}

View file

@ -1,10 +1,10 @@
{ fetchurl, stdenv, jre, glib, libXtst, gtk, makeWrapper }:
stdenv.mkDerivation rec {
name = "davmail-4.7.0";
name = "davmail-4.7.1";
src = fetchurl {
url = "mirror://sourceforge/davmail/4.7.0/davmail-linux-x86_64-4.7.0-2408.tgz";
sha256 = "1kasnqnvw8icm32m5vbvkpx5im1w4sifiaafb08rw4a1zn8asxv1";
url = "mirror://sourceforge/davmail/4.7.1/davmail-linux-x86_64-4.7.1-2416.tgz";
sha256 = "c3bf1a3a94f35586a3a8d2d28cdaf8c9514a8cf904a51fd74961e93909c9d2a4";
};
buildInputs = [ makeWrapper ];

View file

@ -1,58 +0,0 @@
args @ { fetchurl, stdenv, pkgconfig, perl, perlXMLParser, libxml2, openssl, nss
, gtkspell, aspell, gettext, ncurses, avahi, dbus, dbus_glib, python
, libtool, automake, autoconf, gstreamer
, gtk, glib
, libXScrnSaver, scrnsaverproto, libX11, xproto, kbproto, ... }: with args;
/*
arguments: all buildInputs
optional: purple2Source: purple-2 source - place to copy libpurple from
(to use a fresher pidgin build)
*/
let
externalPurple2 = (lib.attrByPath ["purple2Source"] null args) != null;
in
rec {
src = fetchurl {
url = mirror://sourceforge/funpidgin/carrier-2.5.0.tar.bz2;
sha256 = "0m80s7hnvz5vc2dy3xiy1zfb6incmb7p28zahzxdif2vz44riz28";
};
buildInputs = [gtkspell aspell
gstreamer startupnotification
libxml2 openssl nss
libXScrnSaver ncurses scrnsaverproto
libX11 xproto kbproto GConf avahi
dbus dbus_glib glib python
autoconf libtool automake];
propagatedBuildInputs = [
pkgconfig gtk perl perlXMLParser gettext
];
configureFlags="--with-nspr-includes=${nss}/include/nspr"
+ " --with-nspr-libs=${nss}/lib --with-nss-includes=${nss}/include/nss"
+ " --with-nss-libs=${nss}/lib --with-ncurses-headers=${ncurses}/include"
+ " --enable-screensaver --disable-meanwhile --disable-nm --disable-tcl";
preBuild = fullDepEntry (''
export echo=echo
'') [];
/* doConfigure should be specified separately */
phaseNames = ["doConfigure" "preBuild" "doMakeInstall"]
++ (lib.optional externalPurple2 "postInstall")
;
name = "carrier-2.5.0";
meta = {
description = "PidginIM GUI fork with user-friendly development model";
homepage = http://funpidgin.sf.net;
};
} // (if externalPurple2 then {
postInstall = fullDepEntry (''
mkdir -p $out/lib/purple-2
cp ${args.purple2Source}/lib/purple-2/* $out/lib/purple-2/
'') ["minInit" "defEnsureDir"]; }
else {})

View file

@ -30,10 +30,9 @@
with stdenv.lib;
let version = "3.13.1"; in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "claws-mail-${version}";
version = "3.13.2";
meta = {
description = "The user-friendly, lightweight, and fast email client";
@ -45,7 +44,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://www.claws-mail.org/download.php?file=releases/claws-mail-${version}.tar.xz";
sha256 = "049av7r0xhjjjm1p93l2ns3xisvn125v3ncqar23cqjzgcichg5d";
sha256 = "1l8ankx0qpq1ix1an8viphcf11ksh53jsrm1xjmq8cjbh5910wva";
};
patches = [ ./mime.patch ];

View file

@ -6,14 +6,14 @@
}:
let pname = "liferea";
version = "1.10.17";
version = "1.10.18";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/lwindolf/${pname}/releases/download/v${version}/${name}.tar.bz2";
sha256 = "0svgl50w3hai31n5sm42sl0cd86c32cka0xzfy4r8gi0lyjdjxyx";
sha256 = "0wpinar2cxyzq2j7ff7lznc08f0n6qjdm9aavsarbgdpaf2s1xvq";
};
buildInputs = with gst_all_1; [
@ -27,6 +27,8 @@ stdenv.mkDerivation rec {
makeWrapper
];
patches = [ ./liferea-fix-notification-header-location.patch ];
preFixup = ''
for f in "$out"/bin/*; do
wrapProgram "$f" \

View file

@ -0,0 +1,12 @@
diff -Naur a/src/notification/libnotify.c b/src/notification/libnotify.c
--- a/src/notification/libnotify.c 2016-01-28 19:33:19.000000000 +0100
+++ b/src/notification/libnotify.c 2016-02-01 19:20:39.167580131 +0100
@@ -40,7 +40,7 @@
#include "ui/feed_list_view.h"
#include "ui/ui_tray.h"
-#include "notification/notification.h"
+#include "../notification.h"
static gboolean supports_actions = FALSE;
static gboolean supports_append = FALSE;

View file

@ -2,22 +2,22 @@
# nettools needed for hostname
let
dirname = "Isabelle2014";
dirname = "Isabelle2015";
theories = ["HOL" "FOL" "ZF"];
in
stdenv.mkDerivation {
name = "isabelle-2014";
name = "isabelle-2015";
inherit dirname theories;
src = if stdenv.isDarwin
then fetchurl {
url = http://isabelle.in.tum.de/website-Isabelle2014/dist/Isabelle2014_macos.tar.gz;
sha256 = "1aa3vz2nnkkyd4mlsqbs69jqfxlll5h0k5fj9m1j9wqiddqwvwcf";
url = http://isabelle.in.tum.de/dist/Isabelle2015.dmg;
sha256 = "1vhm10qc1rn3wy9r12clrl33p64h3q1aj41mcnxkbnsyg2bx03im";
}
else fetchurl {
url = http://isabelle.in.tum.de/website-Isabelle2014/dist/Isabelle2014_linux.tar.gz;
sha256 = "0z81pwwllavka4r57fx6yi9kbpbb9xbanp8dsjix49qpyj2a72jy";
url = http://isabelle.in.tum.de/dist/Isabelle2015_linux.tar.gz;
sha256 = "13kqm458d8mw7il1zg5bdb1nfbb869p331d75xzlm2v9xgjxx862";
};
buildInputs = [ perl polyml ]
@ -32,12 +32,13 @@ stdenv.mkDerivation {
--replace /usr/bin/env $ENV
substituteInPlace lib/Tools/install \
--replace /usr/bin/env $ENV
sed -i 's|isabelle_java java|${java}/bin/java|g' lib/Tools/java
substituteInPlace etc/settings \
--subst-var-by ML_HOME "${polyml}/bin" \
--subst-var-by PROOFGENERAL_HOME "${proofgeneral}/share/emacs/site-lisp/ProofGeneral"
substituteInPlace contrib/jdk/etc/settings \
--replace ISABELLE_JDK_HOME= '#ISABELLE_JDK_HOME='
substituteInPlace contrib/polyml-5.5.2-1/etc/settings \
substituteInPlace contrib/polyml-*/etc/settings \
--replace 'ML_HOME="$POLYML_HOME/$ML_PLATFORM"' \
"ML_HOME=\"${polyml}/bin\""
'';

View file

@ -1,98 +0,0 @@
a @ { mesa, lesstif, libX11, libXaw, xproto, libXt, libSM, libICE, libXmu, libXext, libXcursor, ... } :
let
fetchurl = a.fetchurl;
version = "1.5";
buildInputs = with a; [
mesa lesstif libX11 libXaw xproto libXt libSM libICE
libXmu libXext libXcursor
];
in
rec {
srcNcbiStdH = fetchurl {
url = "http://www.math.uu.nl/people/kuznet/CONTENT/src/unix/ncbistd.h";
sha256 = "1zi3l53b0a7d3620rhxvh1jn7pz3ihl1mxl9qqw86xkmhm4q7xf3";
};
srcVibrant = fetchurl {
url = "http://www.math.uu.nl/people/kuznet/CONTENT/src/unix/vibrant.tar.gz";
sha256 = "1s0vsa0np3sm7jh3ps3f1sf4j64v0kw4hqasllpxx5hdgxwd8y25";
};
srcContent = fetchurl {
url = "http://www.math.uu.nl/people/kuznet/CONTENT/src/unix/content_${version}.tar.gz";
sha256 = "0y0dzr1d3jgbd53729jk6s2wpb5hv54xwbdird4r0s15bznpm6fs";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be removed if not needed */
phaseNames = ["unpackTarballs"
"setPlatform" "extraVars"
"buildVibrant" "buildContent"
"install"];
unpackTarballs = a.fullDepEntry (''
mkdir content
cd content
mkdir vibrant
tar -xvf ${srcVibrant} -C vibrant
tar -xvf ${srcContent} -C .
sed -e s/SGI=/SGI=no/ -i content/makefile_v
'') ["minInit"];
platformTLAContent = if a.stdenv.isLinux then "LIN" else
throw "Three-letter code for the platform is not known";
platformTLAVibrant = if a.stdenv.isLinux then "lnx" else
throw "Three-letter code for the platform is not known";
setPlatform = a.fullDepEntry (''
sed -e 's/${platformTLAContent}=no/${platformTLAContent}=/' -i content/makefile_v
'') ["minInit" "unpackTarballs"];
extraVars = a.noDepEntry ''
export NIX_LDFLAGS="$NIX_LDFLAGS -lXcursor"
'';
buildVibrant = a.fullDepEntry (''
cd vibrant/build
export LCL=${platformTLAVibrant}
make copy
for i in *.c; do gcc $i -c -DWIN_MOTIF -I. -I../include; done
sh ../make/viball.${platformTLAVibrant}
cd ../..
'') ["addInputs" "unpackTarballs"];
buildContent = a.fullDepEntry (''
cd content
export PATH=$PATH:$PWD/victor:$PWD/yuri
make -f makefile_v unix
cd ..
'') ["addInputs" "buildVibrant" "setPlatform"];
install = a.fullDepEntry (''
mkdir -p $out/share/${name}/build-snapshot $out/bin $out/lib $out/share/${name}/doc
find . -name '*.o' -exec cp '{}' $out/lib ';'
find . -name '*.so' -exec cp '{}' $out/lib ';'
find . -name '*.txt' -exec cp '{}' $out/share/${name}/doc ';'
find . -name '*.hlp' -exec cp '{}' $out/share/${name}/doc ';'
find . -perm -0100 -a ! -name '*.*' -exec cp '{}' $out/bin ';'
cp -r . $out/share/${name}/build-snapshot
'') ["buildContent" "defEnsureDir" "minInit"];
name = "content-" + version;
meta = {
description = "A tool for analysis of dynamical systems";
maintainers = [
a.lib.maintainers.raskin
];
platforms = a.lib.platforms.linux;
broken = true;
};
}

View file

@ -11,9 +11,6 @@ stdenv.mkDerivation {
patches = [ ./getcwd-chroot.patch ];
preConfigure = ''
# Fix location of info and man directories.
configureFlags="--infodir=$out/share/info --mandir=$out/share/man"
# Apply the Debian patches.
for p in "debian/patches/"*; do
echo "applying \`$p' ..."

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, python, makeWrapper, docutils, unzip, hg-git, dulwich
, guiSupport ? false, tk ? null, hg-crecord ? null, curses
, guiSupport ? false, tk ? null, curses
, ApplicationServices, cf-private }:
let
@ -37,13 +37,6 @@ stdenv.mkDerivation {
WRAP_TK=" --set TK_LIBRARY \"${tk}/lib/${tk.libPrefix}\"
--set HG \"$out/bin/hg\"
--prefix PATH : \"${tk}/bin\" "
'') + (stdenv.lib.optionalString (hg-crecord != null)
''
mkdir -p $out/etc/mercurial
cat >> $out/etc/mercurial/hgrc << EOF
[extensions]
crecord=${hg-crecord}/${python.sitePackages}/crecord
EOF
'') +
''
for i in $(cd $out/bin && ls); do

View file

@ -0,0 +1,44 @@
{stdenv, fetchurl, ocaml, lablgtk, libgnomecanvas, camlp4, glib, pkgconfig, graphviz_2_0, makeWrapper}:
stdenv.mkDerivation rec {
version = "1.0.2";
name = "monotone-viz-${version}";
buildInputs = [ocaml lablgtk libgnomecanvas glib pkgconfig graphviz_2_0 makeWrapper];
src = fetchurl {
url = "http://oandrieu.nerim.net/monotone-viz/${name}-nolablgtk.tar.gz";
sha256 = "1l5x4xqz5g1aaqbc1x80mg0yzkiah9ma9k9mivmn08alkjlakkdk";
};
prePatch="ln -s . a; ln -s . b";
patchFlags = ["-p0"];
patches = [
(fetchurl {
url = "http://pkgs.fedoraproject.org/cgit/rpms/monotone-viz.git/plain/monotone-viz-1.0.2-dot.patch";
sha256 = "0risfy8iqmkr209hmnvpv57ywbd3rvchzzd0jy2lfyqrrrm6zknw";
})
(fetchurl {
url = "http://pkgs.fedoraproject.org/cgit/rpms/monotone-viz.git/plain/monotone-viz-1.0.2-new-stdio.patch";
sha256 = "16bj0ppzqd45an154dr7sifjra7lv4m9anxfw3c56y763jq7fafa";
})
(fetchurl {
url = "http://pkgs.fedoraproject.org/cgit/rpms/monotone-viz.git/plain/monotone-viz-1.0.2-typefix.patch";
sha256 = "1gfp82rc7pawb5x4hh2wf7xh1l1l54ib75930xgd1y437la4703r";
})
];
preConfigure = ''
configureFlags="$configureFlags --with-lablgtk-dir=$(echo ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2)"
'';
postInstall = ''
wrapProgram "$out/bin/monotone-viz" --prefix PATH : "${graphviz_2_0}/bin/"
'';
meta = {
inherit version;
description = ''Monotone ancestry visualiser'';
license = stdenv.lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,33 +0,0 @@
args @ { graphviz, pkgconfig, autoconf, automake, libtool, glib, gtk, ... }: with args;
rec {
srcDrv = fetchmtn {
name = "monotone-viz-mtn-checkout";
dbs = ["monotone.mtn-host.prjek.net"];
selector = "c3fdb3af1c7c89989c7da8062bb62203f2aaccf0";
branch = "net.venge.monotone-viz.new-stdio";
sha256 = "661c6a49d442b7e5a7ba455bb9a892e7e12b3968c2ddd69375e7bd0cd0b3ecb9";
};
src = srcDrv + "/";
buildInputs = [ocaml lablgtk libgnomecanvas gtk graphviz glib
pkgconfig autoconf automake libtool];
configureFlags = ["--with-lablgtk-dir=$(echo ${lablgtk}/lib/ocaml/*/site-lib/lablgtk2)"];
/* doConfigure should be specified separately */
phaseNames = ["doAutoconf" "doPatch" "doConfigure" "doMakeInstall"];
doAutoconf = fullDepEntry(''
aclocal -I .
autoconf -I .
'') ["minInit" "addInputs" "doUnpack"];
name = "monotone-viz-mtn-head";
meta = {
description = "Monotone commit tree visualizer";
maintainers = [args.lib.maintainers.raskin];
};
passthru = {
inherit srcDrv;
};
}

View file

@ -1,12 +1,12 @@
{ stdenv, fetchurl, perl }:
stdenv.mkDerivation rec {
version = "1.20150503";
version = "1.20160123";
name = "mr-${version}";
src = fetchurl {
url = "https://github.com/joeyh/myrepos/archive/${version}.tar.gz";
sha256 = "12cf8kmn13446rszmah5wws5p2k2gjp6y4505sy1r14qnahf4qbf";
sha256 = "1723cg5haplz2w9dwdzp6ds1ip33cx3awmj4wnb0h4yq171v5lqk";
};
buildInputs = [ perl ];

View file

@ -1,6 +1,9 @@
args @ { makeWrapper, python, ... }: with args;
let version = if args ? version then args.version else "0.9.35"; in
rec {
{ stdenv, fetchurl, pythonPackages }:
pythonPackages.buildPythonPackage rec {
name = "tailor-${version}";
version = "0.9.35";
src = fetchurl {
urls = [
"http://darcs.arstecnica.it/tailor/tailor-${version}.tar.gz"
@ -9,13 +12,6 @@ rec {
sha256 = "061acapxxn5ab3ipb5nd3nm8pk2xj67bi83jrfd6lqq3273fmdjh";
};
buildInputs = [python makeWrapper];
configureFlags = [];
/* doConfigure should be specified separately */
phaseNames = ["installPythonPackage" "wrapBinContentsPython"];
name = "tailor-" + version;
meta = {
description = "Version control tools integration tool";
};

View file

@ -1,44 +0,0 @@
args @ { monotone, cheetahTemplate, highlight, ctags, makeWrapper, graphviz, which, python, ... }: with args;
rec {
src = fetchurl {
url = http://viewmtn.1erlei.de/downloads/viewmtn-0.10.tgz;
sha256 = "1c6y708xaf6pds1r6l00q7vpgfagfbnf95kqj168vw3xr3l8a4yx";
};
buildInputs = [python flup highlight monotone
cheetahTemplate makeWrapper graphviz which];
configureFlags = [];
makeFlags = ["PREFIX=$out"];
/* doConfigure should be specified separately */
phaseNames = ["doInstall"
(doPatchShebangs "$out/bin")
(makeManyWrappers "$out/bin/*"
(pythonWrapperArguments + preservePathWrapperArguments))
];
doInstall = fullDepEntry (''
for i in dot mtn highlight; do
sed -e "s@/usr/bin/$i@$(which $i)@" -i config.py.example
done
sed -e "s@'templates/'@'$out/share/viewmtn/templates/'@" -i config.py.example
fullOut=$(toPythonPath $out)
mkdir -p $fullOut
mkdir -p $out/bin
mkdir -p $out/share/viewmtn
cp -r * $fullOut
cp $fullOut/viewmtn.py $out/bin
ln -s $fullOut/{AUTHORS,ChangeLog,INSTALL,LICENSE,README,TODO,config.py.example} $out/share/viewmtn
ln -s $fullOut/templates $out/share/viewmtn/
ln -s $fullOut/static $out/share/viewmtn/
'') ["minInit" "defEnsureDir" "addInputs" "doUnpack"];
name = "viewmtn-0.10";
meta = {
description = "Monotone web interface";
};
}

View file

@ -18,13 +18,13 @@ let
optional = stdenv.lib.optional;
in stdenv.mkDerivation rec {
name = "obs-studio-${version}";
version = "0.12.1";
version = "0.13.1";
src = fetchFromGitHub {
owner = "jp9000";
repo = "obs-studio";
rev = "${version}";
sha256 = "0n5bpjgdk3gi0xghfhphiyh5r1q1yksaz34as306i051y01shzl6";
sha256 = "00dx8lksj10n0qhyar41y5q0bdrz7jdjwmhj8bdyz7jfkijjr44i";
};
nativeBuildInputs = [ cmake

View file

@ -11,13 +11,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "docker-${version}";
version = "1.9.1";
version = "1.10.0";
src = fetchFromGitHub {
owner = "docker";
repo = "docker";
rev = "v${version}";
sha256 = "1mhi4y820h2wxz6hqmr95c7yvklyw578dd9c83jr463w7rq0rgr6";
sha256 = "0c3a504gjdh4mxvifi0wcppqhd786d1gxncf04dqlq3l5wisfbbw";
};
buildInputs = [

View file

@ -1,4 +1,4 @@
{ stdenv, lib, autoreconfHook, acl, go, file, git, wget, gnupg1, squashfsTools,
{ stdenv, lib, autoreconfHook, acl, go, file, git, wget, gnupg1, trousers, squashfsTools,
cpio, fetchurl, fetchFromGitHub, iptables, systemd, makeWrapper }:
let
@ -9,7 +9,7 @@ let
stage1Flavours = [ "coreos" "fly" "host" ];
in stdenv.mkDerivation rec {
version = "0.15.0";
version = "1.0.0";
name = "rkt-${version}";
BUILDDIR="build-${name}";
@ -17,7 +17,7 @@ in stdenv.mkDerivation rec {
rev = "v${version}";
owner = "coreos";
repo = "rkt";
sha256 = "1pw14r38p8sdkma37xx0yy3zx5yxqc12zj35anmlbmrgw4vdgavf";
sha256 = "1m76hzx550dh35jpb8m46ks04ac3dfy4rg054v035rpwgh50ac6h";
};
stage1BaseImage = fetchurl {
@ -26,7 +26,7 @@ in stdenv.mkDerivation rec {
};
buildInputs = [
autoreconfHook go file git wget gnupg1 squashfsTools cpio acl systemd
autoreconfHook go file git wget gnupg1 trousers squashfsTools cpio acl systemd
makeWrapper
];

View file

@ -7,7 +7,7 @@
}:
let
version = "3.5.7";
version = "3.5.8";
in with luaPackages;
stdenv.mkDerivation rec {
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://awesome.naquadah.org/download/awesome-${version}.tar.xz";
sha256 = "ba7f92b0ab8b729c569b19b098b0a08339d8654e3c040d07ad02cf99641ceecf";
sha256 = "1iifcyphgibmh3cvsy8agjrl9zjl80scrg0bcgnwywmxaxncjc3w";
};
meta = with stdenv.lib; {

View file

@ -32,7 +32,7 @@ in customEmacsPackages.emacsWithPackages (epkgs: [ epkgs.evil epkgs.magit ])
*/
{ lib, makeWrapper, stdenv }: self:
{ lib, lndir, makeWrapper, stdenv }: self:
with lib; let inherit (self) emacs; in
@ -47,11 +47,14 @@ in
stdenv.mkDerivation {
name = (appendToName "with-packages" emacs).name;
nativeBuildInputs = [ emacs makeWrapper ];
nativeBuildInputs = [ emacs lndir makeWrapper ];
inherit emacs explicitRequires;
phases = [ "installPhase" ];
installPhase = ''
requires=""
mkdir -p $out/bin
mkdir -p $out/share/emacs/site-lisp
local requires
for pkg in $explicitRequires; do
findInputs $pkg requires propagated-user-env-packages
done
@ -59,52 +62,47 @@ stdenv.mkDerivation {
siteStart="$out/share/emacs/site-lisp/site-start.el"
addEmacsPath() {
local list=$1
local path=$2
# Add the path to the search path list, but only if it exists
if [[ -d "$path" ]]; then
echo "(add-to-list '$list \"$path\")" >>"$siteStart"
fi
}
# Add a dependency's paths to site-start.el
addToEmacsPaths() {
addEmacsPath "exec-path" "$1/bin"
addEmacsPath "load-path" "$1/share/emacs/site-lisp"
addEmacsPath "package-directory-list" "$1/share/emacs/site-lisp/elpa"
}
mkdir -p $out/share/emacs/site-lisp
# Begin the new site-start.el by loading the original, which sets some
# NixOS-specific paths. Paths are searched in the reverse of the order
# they are specified in, so user and system profile paths are searched last.
echo "(load-file \"$emacs/share/emacs/site-lisp/site-start.el\")" >"$siteStart"
echo "(require 'package)" >>"$siteStart"
cat >"$siteStart" <<EOF
(load-file "$emacs/share/emacs/site-lisp/site-start.el")
(add-to-list 'load-path "$out/share/emacs/site-lisp")
EOF
# Set paths for the dependencies of the requested packages. These paths are
# searched before the profile paths, but after the explicitly-required paths.
for pkg in $requires; do
# The explicitly-required packages are also in the list, but we will add
# those paths last.
if ! ( echo "$explicitRequires" | grep "$pkg" >/dev/null ) ; then
addToEmacsPaths $pkg
linkPath() {
local pkg=$1
local path=$2
# Add the path to the search path list, but only if it exists
if [[ -d "$pkg/$path" ]]; then
lndir -silent "$pkg/$path" "$out/$path"
fi
}
# Add a package's paths to site-start.el
linkEmacsPackage() {
linkPath "$1" "bin"
linkPath "$1" "share/emacs/site-lisp"
}
# First, link all the explicitly-required packages.
for pkg in $explicitRequires; do
linkEmacsPackage $pkg
done
# Finally, add paths for all the explicitly-required packages. These paths
# will be searched first.
for pkg in $explicitRequires; do
addToEmacsPaths $pkg
# Next, link all the dependencies.
for pkg in $requires; do
linkEmacsPackage $pkg
done
# Byte-compiling improves start-up time only slightly, but costs nothing.
emacs --batch -f batch-byte-compile "$siteStart"
mkdir -p $out/bin
# Wrap emacs and friends so they find our site-start.el before the original.
for prog in $emacs/bin/*; do # */
makeWrapper "$prog" $out/bin/$(basename "$prog") \
local progname=$(basename "$prog")
rm -f "$out/bin/$progname"
makeWrapper "$prog" "$out/bin/$progname" \
--suffix EMACSLOADPATH ":" "$out/share/emacs/site-lisp:"
done

View file

@ -34,7 +34,7 @@ let
# dump tar of *current directory* at given revision
git -C ${srcStr} archive --format=tar ${gitHash} \
| tar xvf - -C $out
| tar xf - -C $out
'';
in nixPath

View file

@ -9,7 +9,7 @@
stdenv.mkDerivation {
name = kernel.name + "-shrunk";
builder = ./modules-closure.sh;
buildInputs = [nukeReferences];
inherit kernel rootModules kmod allowMissing;
buildInputs = [ nukeReferences kmod ];
inherit kernel rootModules allowMissing;
allowedReferences = ["out"];
}

View file

@ -2,8 +2,6 @@ source $stdenv/setup
set -o pipefail
PATH=$kmod/sbin:$PATH
version=$(cd $kernel/lib/modules && ls -d *)
echo "kernel version is $version"

View file

@ -1,6 +1,8 @@
args : with args;
let version = lib.attrByPath ["version"] "2.04" args; in
rec {
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "arkpandora-${version}";
version = "2.04";
src = fetchurl {
urls = [
"ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ttf-arkpandora-${version}.tgz"
@ -10,13 +12,11 @@ rec {
sha256 = "16mfxwlgn6vs3xn00hha5dnmz6bhjiflq138y4zcq3yhk0y9bz51";
};
buildInputs = [];
configureFlags = [];
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp *.ttf $out/share/fonts/truetype
'';
/* doConfigure should be specified separately */
phaseNames = ["doUnpack" "installFonts"];
name = "arkpandora-" + version;
meta = {
description = "Font, metrically identical to Arial and Times New Roman";
};

View file

@ -1,4 +1,6 @@
args @ { fetchurl, fontforge, lib, ... }: with args; rec {
{ stdenv, fetchurl, fontforge }:
stdenv.mkDerivation rec {
name = "linux-libertine-5.3.0";
src = fetchurl {
@ -6,18 +8,37 @@ args @ { fetchurl, fontforge, lib, ... }: with args; rec {
sha256 = "0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v";
};
setSourceRoot = "sourceRoot=`pwd`";
buildInputs = [ fontforge ];
/* doConfigure should be specified separately */
phaseNames = ["doUnpack" "generateFontsFromSFD" "installFonts"];
extraFontForgeCommands = ''
ScaleToEm(1000);
buildPhase = ''
for i in *.sfd; do
fontforge -c \
'Open($1);
ScaleToEm(1000);
Reencode("unicode");
Generate($1:r + ".ttf");
Generate($1:r + ".otf");
Reencode("TeX-Base-Encoding");
Generate($1:r + ".afm");
Generate($1:r + ".pfm");
Generate($1:r + ".pfb");
Generate($1:r + ".map");
Generate($1:r + ".enc");
' $i;
done
'';
doUnpack = lib.fullDepEntry ''
tar xf ${src}
'' ["minInit"];
installPhase = ''
mkdir -p $out/share/fonts/{opentype,truetype,type1}/public
mkdir -p $out/share/texmf/fonts/{enc,map}
cp *.otf $out/share/fonts/opentype/public
cp *.ttf $out/share/fonts/truetype/public
cp *.pfb $out/share/fonts/type1/public
cp *.enc $out/share/texmf/fonts/enc
cp *.map $out/share/texmf/fonts/map
'';
meta = {
description = "Linux Libertine Fonts";

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