Merge branch 'master' into staging

This commit is contained in:
William A. Kennington III 2015-03-29 14:25:48 -07:00
commit fa2e5b25ba
105 changed files with 993 additions and 956 deletions

View File

@ -29,8 +29,8 @@ rec {
For another application, see build-support/vm, where this For another application, see build-support/vm, where this
function is used to build arbitrary derivations inside a QEMU function is used to build arbitrary derivations inside a QEMU
virtual machine. */ virtual machine.
*/
overrideDerivation = drv: f: overrideDerivation = drv: f:
let let
newDrv = derivation (drv.drvAttrs // (f drv)); newDrv = derivation (drv.drvAttrs // (f drv));
@ -56,18 +56,17 @@ rec {
makeOverridable = f: origArgs: makeOverridable = f: origArgs:
let let
ff = f origArgs; ff = f origArgs;
overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs);
in in
if builtins.isAttrs ff then (ff // if builtins.isAttrs ff then (ff //
{ override = newArgs: { override = newArgs: makeOverridable f (overrideWith newArgs);
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
deepOverride = newArgs: deepOverride = newArgs:
makeOverridable f (lib.overrideExisting (lib.mapAttrs (deepOverrider newArgs) origArgs) newArgs); makeOverridable f (lib.overrideExisting (lib.mapAttrs (deepOverrider newArgs) origArgs) newArgs);
overrideDerivation = fdrv: overrideDerivation = fdrv:
makeOverridable (args: overrideDerivation (f args) fdrv) origArgs; makeOverridable (args: overrideDerivation (f args) fdrv) origArgs;
}) })
else if builtins.isFunction ff then else if builtins.isFunction ff then
{ override = newArgs: { override = newArgs: makeOverridable f (overrideWith newArgs);
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
__functor = self: ff; __functor = self: ff;
deepOverride = throw "deepOverride not yet supported for functors"; deepOverride = throw "deepOverride not yet supported for functors";
overrideDerivation = throw "overrideDerivation not yet supported for functors"; overrideDerivation = throw "overrideDerivation not yet supported for functors";
@ -102,8 +101,10 @@ rec {
}; };
*/ */
callPackageWith = autoArgs: fn: args: callPackageWith = autoArgs: fn: args:
let f = if builtins.isFunction fn then fn else import fn; in let
makeOverridable f ((builtins.intersectAttrs (builtins.functionArgs f) autoArgs) // args); f = if builtins.isFunction fn then fn else import fn;
auto = builtins.intersectAttrs (builtins.functionArgs f) autoArgs;
in makeOverridable f (auto // args);
/* Add attributes to each output of a derivation without changing the derivation itself */ /* Add attributes to each output of a derivation without changing the derivation itself */

View File

@ -13,10 +13,11 @@ rec {
addErrorContextToAttrs = lib.mapAttrs (a: v: lib.addErrorContext "while evaluating ${a}" v); addErrorContextToAttrs = lib.mapAttrs (a: v: lib.addErrorContext "while evaluating ${a}" v);
traceIf = p: msg: x: if p then trace msg x else x;
traceVal = x: builtins.trace x x; traceVal = x: trace x x;
traceXMLVal = x: builtins.trace (builtins.toXML x) x; traceXMLVal = x: trace (builtins.toXML x) x;
traceXMLValMarked = str: x: builtins.trace (str + builtins.toXML x) x; traceXMLValMarked = str: x: trace (str + builtins.toXML x) x;
# this can help debug your code as well - designed to not produce thousands of lines # this can help debug your code as well - designed to not produce thousands of lines
traceShowVal = x : trace (showVal x) x; traceShowVal = x : trace (showVal x) x;
@ -42,6 +43,7 @@ rec {
traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b)); traceCall2 = n : f : a : b : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
traceCall3 = n : f : a : b : c : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c)); traceCall3 = n : f : a : b : c : let t = n2 : x : traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c));
# FIXME: rename this?
traceValIfNot = c: x: traceValIfNot = c: x:
if c x then true else trace (showVal x) false; if c x then true else trace (showVal x) false;
@ -106,6 +108,6 @@ rec {
) )
else else
let r = strict expr; let r = strict expr;
in builtins.trace "${str}\n result:\n${builtins.toXML r}" r in trace "${str}\n result:\n${builtins.toXML r}" r
); );
} }

View File

@ -5,6 +5,7 @@
alphabetically sorted. */ alphabetically sorted. */
_1126 = "Christian Lask <mail@elfsechsundzwanzig.de>"; _1126 = "Christian Lask <mail@elfsechsundzwanzig.de>";
abaldeau = "Andreas Baldeau <andreas@baldeau.net>";
abbradar = "Nikolay Amiantov <ab@fmap.me>"; abbradar = "Nikolay Amiantov <ab@fmap.me>";
aforemny = "Alexander Foremny <alexanderforemny@googlemail.com>"; aforemny = "Alexander Foremny <alexanderforemny@googlemail.com>";
aherrmann = "Andreas Herrmann <andreash87@gmx.ch>"; aherrmann = "Andreas Herrmann <andreash87@gmx.ch>";

View File

@ -23,9 +23,9 @@ in
boot.kernelParams = [ "console=ttyS0" ]; boot.kernelParams = [ "console=ttyS0" ];
boot.initrd.extraUtilsCommands = '' boot.initrd.extraUtilsCommands = ''
cp -v ${pkgs.gawk}/bin/gawk $out/bin/gawk copy_bin_and_libs ${pkgs.gawk}/bin/gawk
cp -v ${pkgs.gnused}/bin/sed $out/bin/gnused copy_bin_and_libs ${pkgs.gnused}/bin/sed
cp -v ${pkgs.utillinux}/sbin/sfdisk $out/bin/sfdisk copy_bin_and_libs ${pkgs.utillinux}/sbin/sfdisk
cp -v ${growpart} $out/bin/growpart cp -v ${growpart} $out/bin/growpart
''; '';
boot.initrd.postDeviceCommands = '' boot.initrd.postDeviceCommands = ''

View File

@ -56,17 +56,28 @@ let
echo "timeout 5" >> $out/loader/loader.conf echo "timeout 5" >> $out/loader/loader.conf
''; '';
efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools ]; } efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools pkgs.libfaketime ]; }
# Be careful about determinism: du --apparent-size,
# dates (cp -p, touch, mcopy -m, faketime for label), IDs (mkfs.vfat -i)
'' ''
#Let's hope 15M is enough mkdir ./contents && cd ./contents
dd bs=2048 count=7680 if=/dev/zero of="$out" cp -rp "${efiDir}"/* .
${pkgs.dosfstools}/sbin/mkfs.vfat "$out" mkdir ./boot
mcopy -svi "$out" ${efiDir}/* :: cp -p "${config.boot.kernelPackages.kernel}/bzImage" \
mmd -i "$out" boot "${config.system.build.initialRamdisk}/initrd" ./boot/
mcopy -v -i "$out" \ touch --date=@0 ./*
${config.boot.kernelPackages.kernel}/bzImage ::boot/bzImage
mcopy -v -i "$out" \ usage_size=$(du -sb --apparent-size . | tr -cd '[:digit:]')
${config.system.build.initialRamdisk}/initrd ::boot/initrd # Make the image 110% as big as the files need to make up for FAT overhead
image_size=$(( ($usage_size * 110) / 100 ))
# Make the image fit blocks of 1M
block_size=$((1024*1024))
image_size=$(( ($image_size / $block_size + 1) * $block_size ))
echo "Usage size: $usage_size"
echo "Image size: $image_size"
truncate --size=$image_size "$out"
${pkgs.libfaketime}/bin/faketime "2000-01-01 00:00:00" ${pkgs.dosfstools}/sbin/mkfs.vfat -i 12345678 -n EFIBOOT "$out"
mcopy -bpsvm -i "$out" ./* ::
''; # */ ''; # */
targetArch = if pkgs.stdenv.isi686 then targetArch = if pkgs.stdenv.isi686 then
@ -155,7 +166,6 @@ in
}; };
config = { config = {
boot.loader.grub.version = 2; boot.loader.grub.version = 2;

View File

@ -98,7 +98,7 @@ in
boot.initrd.extraUtilsCommands = boot.initrd.extraUtilsCommands =
'' ''
cp ${pkgs.utillinux}/sbin/hwclock $out/bin copy_bin_and_libs ${pkgs.utillinux}/sbin/hwclock
''; '';
boot.initrd.postDeviceCommands = boot.initrd.postDeviceCommands =

View File

@ -10,8 +10,6 @@ let
is55 = mysql.mysqlVersion == "5.5"; is55 = mysql.mysqlVersion == "5.5";
mysqldDir = if is55 then "${mysql}/bin" else "${mysql}/libexec";
pidFile = "${cfg.pidDir}/mysqld.pid"; pidFile = "${cfg.pidDir}/mysqld.pid";
mysqldOptions = mysqldOptions =
@ -182,7 +180,7 @@ in
chown -R ${cfg.user} ${cfg.pidDir} chown -R ${cfg.user} ${cfg.pidDir}
''; '';
serviceConfig.ExecStart = "${mysqldDir}/mysqld --defaults-extra-file=${myCnf} ${mysqldOptions}"; serviceConfig.ExecStart = "${mysql}/bin/mysqld --defaults-extra-file=${myCnf} ${mysqldOptions}";
postStart = postStart =
'' ''

View File

@ -28,6 +28,7 @@ let
# Perform substitutions in all udev rules files. # Perform substitutions in all udev rules files.
udevRules = stdenv.mkDerivation { udevRules = stdenv.mkDerivation {
name = "udev-rules"; name = "udev-rules";
preferLocalBuild = true;
buildCommand = '' buildCommand = ''
mkdir -p $out mkdir -p $out
shopt -s nullglob shopt -s nullglob

View File

@ -9,12 +9,6 @@ let
nssModulesPath = config.system.nssModules.path; nssModulesPath = config.system.nssModules.path;
permitRootLoginCheck = v:
v == "yes" ||
v == "without-password" ||
v == "forced-commands-only" ||
v == "no";
knownHosts = map (h: getAttr h cfg.knownHosts) (attrNames cfg.knownHosts); knownHosts = map (h: getAttr h cfg.knownHosts) (attrNames cfg.knownHosts);
knownHostsText = flip (concatMapStringsSep "\n") knownHosts knownHostsText = flip (concatMapStringsSep "\n") knownHosts
@ -116,12 +110,9 @@ in
permitRootLogin = mkOption { permitRootLogin = mkOption {
default = "without-password"; default = "without-password";
type = types.addCheck types.str permitRootLoginCheck; type = types.enum ["yes" "without-password" "forced-commands-only" "no"];
description = '' description = ''
Whether the root user can login using ssh. Valid values are Whether the root user can login using ssh.
<literal>yes</literal>, <literal>without-password</literal>,
<literal>forced-commands-only</literal> or
<literal>no</literal>.
''; '';
}; };

View File

@ -405,29 +405,19 @@ in
# copy the cryptsetup binary and it's dependencies # copy the cryptsetup binary and it's dependencies
boot.initrd.extraUtilsCommands = '' boot.initrd.extraUtilsCommands = ''
cp -pdv ${pkgs.cryptsetup}/sbin/cryptsetup $out/bin copy_bin_and_libs ${pkgs.cryptsetup}/bin/cryptsetup
cp -pdv ${pkgs.libgcrypt}/lib/libgcrypt*.so.* $out/lib
cp -pdv ${pkgs.libgpgerror}/lib/libgpg-error*.so.* $out/lib
cp -pdv ${pkgs.cryptsetup}/lib/libcryptsetup*.so.* $out/lib
cp -pdv ${pkgs.popt}/lib/libpopt*.so.* $out/lib
${optionalString luks.yubikeySupport '' ${optionalString luks.yubikeySupport ''
cp -pdv ${pkgs.ykpers}/bin/ykchalresp $out/bin copy_bin_and_libs ${pkgs.ykpers}/bin/ykchalresp
cp -pdv ${pkgs.ykpers}/bin/ykinfo $out/bin copy_bin_and_libs ${pkgs.ykpers}/bin/ykinfo
cp -pdv ${pkgs.openssl}/bin/openssl $out/bin copy_bin_and_libs ${pkgs.openssl}/bin/openssl
cc -O3 -I${pkgs.openssl}/include -L${pkgs.openssl}/lib ${./pbkdf2-sha512.c} -o $out/bin/pbkdf2-sha512 -lcrypto cc -O3 -I${pkgs.openssl}/include -L${pkgs.openssl}/lib ${./pbkdf2-sha512.c} -o pbkdf2-sha512 -lcrypto
strip -s $out/bin/pbkdf2-sha512 strip -s pbkdf2-sha512
copy_bin_and_libs pbkdf2-sha512
cp -pdv ${pkgs.libusb1}/lib/libusb*.so.* $out/lib mkdir -p $out/etc/ssl
cp -pdv ${pkgs.ykpers}/lib/libykpers*.so.* $out/lib cp -pdv ${pkgs.openssl}/etc/ssl/openssl.cnf $out/etc/ssl
cp -pdv ${pkgs.libyubikey}/lib/libyubikey*.so.* $out/lib
cp -pdv ${pkgs.openssl}/lib/libssl*.so.* $out/lib
cp -pdv ${pkgs.openssl}/lib/libcrypto*.so.* $out/lib
mkdir -p $out/etc/ssl
cp -pdv ${pkgs.openssl}/etc/ssl/openssl.cnf $out/etc/ssl
cat > $out/bin/openssl-wrap <<EOF cat > $out/bin/openssl-wrap <<EOF
#!$out/bin/sh #!$out/bin/sh

View File

@ -39,42 +39,52 @@ let
mkdir -p $out/bin $out/lib mkdir -p $out/bin $out/lib
ln -s $out/bin $out/sbin ln -s $out/bin $out/sbin
# Copy what we need from Glibc. # Copy ld manually since it isn't detected correctly
cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib
cp -pv ${pkgs.glibc}/lib/libc.so.* $out/lib
cp -pv ${pkgs.glibc}/lib/libm.so.* $out/lib copy_bin_and_libs () {
cp -pv ${pkgs.glibc}/lib/libpthread.so.* $out/lib [ -f "$out/bin/$(basename $1)" ] && return 0
cp -pv ${pkgs.glibc}/lib/librt.so.* $out/lib cp -pdv $1 $out/bin
cp -pv ${pkgs.glibc}/lib/libdl.so.* $out/lib LDD="$(ldd $1)" || return 0
cp -pv ${pkgs.gcc.cc}/lib*/libgcc_s.so.* $out/lib LIBS="$(echo "$LDD" | awk '{print $3}' | sed '/^$/d')"
for LIB in $LIBS; do
[ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib
while [ "$(readlink $LIB)" != "" ]; do
LINK="$(readlink $LIB)"
if [ "${LINK:0:1}" != "/" ]; then
LINK="$(dirname $LIB)/$LINK"
fi
LIB="$LINK"
[ ! -f "$out/lib/$(basename $LIB)" ] && cp -pdv $LIB $out/lib
done
done
return 0
}
# Copy BusyBox. # Copy BusyBox.
cp -pvd ${pkgs.busybox}/bin/* ${pkgs.busybox}/sbin/* $out/bin/ for BIN in ${pkgs.busybox}/{s,}bin/*; do
copy_bin_and_libs $BIN
done
# Copy some utillinux stuff. # Copy some utillinux stuff.
cp -vf --remove-destination ${pkgs.utillinux}/sbin/blkid $out/bin copy_bin_and_libs ${pkgs.utillinux}/sbin/blkid
cp -pdv ${pkgs.utillinux}/lib/libblkid*.so.* $out/lib
cp -pdv ${pkgs.utillinux}/lib/libuuid*.so.* $out/lib
# Copy dmsetup and lvm. # Copy dmsetup and lvm.
cp -v ${pkgs.lvm2}/sbin/dmsetup $out/bin/dmsetup copy_bin_and_libs ${pkgs.lvm2}/sbin/dmsetup
cp -v ${pkgs.lvm2}/sbin/lvm $out/bin/lvm copy_bin_and_libs ${pkgs.lvm2}/sbin/lvm
cp -v ${pkgs.lvm2}/lib/libdevmapper.so.*.* $out/lib
cp -v ${pkgs.systemd}/lib/libsystemd.so.* $out/lib
# Add RAID mdadm tool. # Add RAID mdadm tool.
cp -v ${pkgs.mdadm}/sbin/mdadm $out/bin/mdadm copy_bin_and_libs ${pkgs.mdadm}/sbin/mdadm
# Copy udev. # Copy udev.
cp -v ${udev}/lib/systemd/systemd-udevd ${udev}/bin/udevadm $out/bin copy_bin_and_libs ${udev}/lib/systemd/systemd-udevd
cp -v ${udev}/lib/udev/*_id $out/bin copy_bin_and_libs ${udev}/bin/udevadm
cp -pdv ${udev}/lib/libudev.so.* $out/lib for BIN in ${udev}/lib/udev/*_id; do
cp -v ${pkgs.kmod}/lib/libkmod.so.* $out/lib copy_bin_and_libs $BIN
cp -v ${pkgs.acl}/lib/libacl.so.* $out/lib done
cp -v ${pkgs.attr}/lib/libattr.so.* $out/lib
# Copy modprobe. # Copy modprobe.
cp -v ${pkgs.kmod}/bin/kmod $out/bin/ copy_bin_and_libs ${pkgs.kmod}/bin/kmod
ln -sf kmod $out/bin/modprobe ln -sf kmod $out/bin/modprobe
${config.boot.initrd.extraUtilsCommands} ${config.boot.initrd.extraUtilsCommands}
@ -101,6 +111,7 @@ let
$out/bin/ash -c 'echo hello world' | grep "hello world" $out/bin/ash -c 'echo hello world' | grep "hello world"
export LD_LIBRARY_PATH=$out/lib export LD_LIBRARY_PATH=$out/lib
$out/bin/mount --help 2>&1 | grep "BusyBox" $out/bin/mount --help 2>&1 | grep "BusyBox"
$out/bin/blkid >/dev/null
$out/bin/udevadm --version $out/bin/udevadm --version
$out/bin/dmsetup --version 2>&1 | tee -a log | grep "version:" $out/bin/dmsetup --version 2>&1 | tee -a log | grep "version:"
LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep "LVM" LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a log | grep "LVM"

View File

@ -17,13 +17,9 @@ in
boot.initrd.extraUtilsCommands = mkIf inInitrd boot.initrd.extraUtilsCommands = mkIf inInitrd
'' ''
mkdir -p $out/bin copy_bin_and_libs ${pkgs.btrfsProgs}/bin/btrfs
cp -v ${pkgs.btrfsProgs}/bin/btrfs $out/bin
ln -sv btrfs $out/bin/btrfsck ln -sv btrfs $out/bin/btrfsck
ln -sv btrfsck $out/bin/fsck.btrfs ln -sv btrfsck $out/bin/fsck.btrfs
# !!! Increases uncompressed initrd by 240k
cp -pv ${pkgs.zlib}/lib/libz.so* $out/lib
cp -pv ${pkgs.lzo}/lib/liblzo2.so* $out/lib
''; '';
boot.initrd.extraUtilsCommandsTest = mkIf inInitrd boot.initrd.extraUtilsCommandsTest = mkIf inInitrd

View File

@ -18,7 +18,7 @@ in
boot.initrd.extraUtilsCommands = mkIf inInitrd boot.initrd.extraUtilsCommands = mkIf inInitrd
'' ''
cp -v ${pkgs.cifs_utils}/sbin/mount.cifs $out/bin copy_bin_and_libs ${pkgs.cifs_utils}/sbin/mount.cifs
''; '';
}; };

View File

@ -10,12 +10,11 @@
boot.initrd.extraUtilsCommands = boot.initrd.extraUtilsCommands =
'' ''
# Copy e2fsck and friends. # Copy e2fsck and friends.
cp -v ${pkgs.e2fsprogs}/sbin/e2fsck $out/bin copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/e2fsck
cp -v ${pkgs.e2fsprogs}/sbin/tune2fs $out/bin copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/tune2fs
ln -sv e2fsck $out/bin/fsck.ext2 ln -sv e2fsck $out/bin/fsck.ext2
ln -sv e2fsck $out/bin/fsck.ext3 ln -sv e2fsck $out/bin/fsck.ext3
ln -sv e2fsck $out/bin/fsck.ext4 ln -sv e2fsck $out/bin/fsck.ext4
cp -pdv ${pkgs.e2fsprogs}/lib/lib*.so.* $out/lib
''; '';
}; };

View File

@ -13,9 +13,7 @@ in
boot.initrd.availableKernelModules = mkIf inInitrd [ "f2fs" ]; boot.initrd.availableKernelModules = mkIf inInitrd [ "f2fs" ];
boot.initrd.extraUtilsCommands = mkIf inInitrd '' boot.initrd.extraUtilsCommands = mkIf inInitrd ''
mkdir -p $out/bin $out/lib copy_bin_and_libs ${pkgs.f2fs-tools}/sbin/fsck.f2fs
cp -v ${pkgs.f2fs-tools}/sbin/fsck.f2fs $out/bin
cp -pdv ${pkgs.f2fs-tools}/lib/lib*.so.* $out/lib
''; '';
}; };
} }

View File

@ -13,7 +13,7 @@ in
boot.initrd.kernelModules = mkIf inInitrd [ "jfs" ]; boot.initrd.kernelModules = mkIf inInitrd [ "jfs" ];
boot.initrd.extraUtilsCommands = mkIf inInitrd '' boot.initrd.extraUtilsCommands = mkIf inInitrd ''
cp -v ${pkgs.jfsutils}/sbin/fsck.jfs "$out/bin/" copy_bin_and_libs ${pkgs.jfsutils}/sbin/fsck.jfs
''; '';
}; };
} }

View File

@ -17,8 +17,8 @@ in
boot.initrd.extraUtilsCommands = mkIf inInitrd boot.initrd.extraUtilsCommands = mkIf inInitrd
'' ''
cp -v ${pkgs.reiserfsprogs}/sbin/reiserfsck $out/bin copy_bin_and_libs ${pkgs.reiserfsprogs}/sbin/reiserfsck
ln -sv reiserfsck $out/bin/fsck.reiserfs ln -s reiserfsck $out/bin/fsck.reiserfs
''; '';
}; };

View File

@ -7,9 +7,8 @@
boot.initrd.kernelModules = [ "fuse" ]; boot.initrd.kernelModules = [ "fuse" ];
boot.initrd.extraUtilsCommands = '' boot.initrd.extraUtilsCommands = ''
cp -v ${pkgs.fuse}/lib/libfuse* $out/lib copy_bin_and_libs ${pkgs.fuse}/sbin/mount.fuse
cp -v ${pkgs.fuse}/sbin/mount.fuse $out/bin copy_bin_and_libs ${pkgs.unionfs-fuse}/bin/unionfs
cp -v ${pkgs.unionfs-fuse}/bin/unionfs $out/bin
substitute ${pkgs.unionfs-fuse}/sbin/mount.unionfs-fuse $out/bin/mount.unionfs-fuse \ substitute ${pkgs.unionfs-fuse}/sbin/mount.unionfs-fuse $out/bin/mount.unionfs-fuse \
--replace '${pkgs.bash}/bin/bash' /bin/sh \ --replace '${pkgs.bash}/bin/bash' /bin/sh \
--replace '${pkgs.fuse}/sbin' /bin \ --replace '${pkgs.fuse}/sbin' /bin \

View File

@ -17,7 +17,7 @@ in
boot.initrd.extraUtilsCommands = mkIf inInitrd boot.initrd.extraUtilsCommands = mkIf inInitrd
'' ''
cp -v ${pkgs.dosfstools}/sbin/dosfsck $out/bin copy_bin_and_libs ${pkgs.dosfstools}/sbin/dosfsck
ln -sv dosfsck $out/bin/fsck.vfat ln -sv dosfsck $out/bin/fsck.vfat
''; '';

View File

@ -17,7 +17,7 @@ in
boot.initrd.extraUtilsCommands = mkIf inInitrd boot.initrd.extraUtilsCommands = mkIf inInitrd
'' ''
cp -v ${pkgs.xfsprogs}/sbin/fsck.xfs $out/bin copy_bin_and_libs ${pkgs.xfsprogs}/sbin/fsck.xfs
''; '';
# Trick just to set 'sh' after the extraUtils nuke-refs. # Trick just to set 'sh' after the extraUtils nuke-refs.

View File

@ -203,11 +203,14 @@ in
kernelModules = [ "spl" "zfs" ]; kernelModules = [ "spl" "zfs" ];
extraUtilsCommands = extraUtilsCommands =
'' ''
cp -v ${zfsUserPkg}/sbin/zfs $out/bin copy_bin_and_libs ${zfsUserPkg}/sbin/zfs
cp -v ${zfsUserPkg}/sbin/zdb $out/bin copy_bin_and_libs ${zfsUserPkg}/sbin/zdb
cp -v ${zfsUserPkg}/sbin/zpool $out/bin copy_bin_and_libs ${zfsUserPkg}/sbin/zpool
cp -pdv ${zfsUserPkg}/lib/lib*.so* $out/lib '';
cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib extraUtilsCommandsTest = mkIf inInitrd
''
$out/bin/zfs --help >/dev/null 2>&1
$out/bin/zpool --help >/dev/null 2>&1
''; '';
postDeviceCommands = concatStringsSep "\n" (['' postDeviceCommands = concatStringsSep "\n" ([''
ZFS_FORCE="${optionalString cfgZfs.forceImportRoot "-f"}" ZFS_FORCE="${optionalString cfgZfs.forceImportRoot "-f"}"

View File

@ -165,7 +165,7 @@ in
boot.initrd.extraUtilsCommands = boot.initrd.extraUtilsCommands =
'' ''
# We need swapon in the initrd. # We need swapon in the initrd.
cp --remove-destination ${pkgs.utillinux}/sbin/swapon $out/bin copy_bin_and_libs ${pkgs.utillinux}/sbin/swapon
''; '';
# Don't put old configurations in the GRUB menu. The user has no # Don't put old configurations in the GRUB menu. The user has no

View File

@ -346,7 +346,7 @@ in
boot.initrd.extraUtilsCommands = boot.initrd.extraUtilsCommands =
'' ''
# We need mke2fs in the initrd. # We need mke2fs in the initrd.
cp -vf --remove-destination ${pkgs.e2fsprogs}/sbin/mke2fs $out/bin copy_bin_and_libs ${pkgs.e2fsprogs}/sbin/mke2fs
''; '';
boot.initrd.postDeviceCommands = boot.initrd.postDeviceCommands =

View File

@ -39,9 +39,8 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
]; ];
boot.initrd.extraUtilsCommands = '' boot.initrd.extraUtilsCommands = ''
cp -av -t "$out/bin/" \ copy_bin_and_libs "${pkgs.linuxPackages.virtualboxGuestAdditions}/sbin/mount.vboxsf"
"${pkgs.linuxPackages.virtualboxGuestAdditions}/sbin/mount.vboxsf" \ copy_bin_and_libs "${pkgs.utillinux}/bin/unshare"
"${pkgs.utillinux}/bin/unshare"
${(attrs.extraUtilsCommands or (const "")) pkgs} ${(attrs.extraUtilsCommands or (const "")) pkgs}
''; '';

View File

@ -4,15 +4,15 @@
}: }:
let let
ver_branch = "1.13"; ver_branch = "1.14";
version = "1.13.1"; version = "1.14.0";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "lightdm-${version}"; name = "lightdm-${version}";
src = fetchurl { src = fetchurl {
url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz"; url = "${meta.homepage}/${ver_branch}/${version}/+download/${name}.tar.xz";
sha256 = "0xa23maq6phkfil8xx26viig2m99sbzcf1w7s56hns2qw6pycn79"; sha256 = "0fkbzqncx34dhylrg5328fih7xywmsqj2p40smnx33nyf047jdgc";
}; };
buildInputs = [ buildInputs = [

View File

@ -160,6 +160,23 @@ let
}; };
}); });
buildWebStorm = { name, version, build, src, license, description }:
(mkIdeaProduct {
inherit name version build src;
product = "WebStorm";
meta = with stdenv.lib; {
homepage = "https://www.jetbrains.com/webstorm/";
inherit description license;
longDescription = ''
WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
and CSS with on-the-fly code analysis, error prevention and
automated refactorings for JavaScript code.
'';
maintainers = with maintainers; [ abaldeau ];
platforms = platforms.linux;
};
});
buildPycharm = { name, version, build, src, license, description }: buildPycharm = { name, version, build, src, license, description }:
(mkIdeaProduct rec { (mkIdeaProduct rec {
inherit name version build src; inherit name version build src;
@ -288,4 +305,16 @@ in
}; };
}; };
webstorm = buildWebStorm rec {
name = "webstorm-${version}";
version = "9.0.3";
build = "139.1112";
description = "Professional IDE for Web and JavaScript devlopment";
license = stdenv.lib.licenses.unfree;
src = fetchurl {
url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz";
sha256 = "e4cfe7b5f1220b68d880c4f236df9c9df2b1efcc04775afad6149d949f45f0aa";
};
};
} }

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, makeWrapper, unzip, jre }: { stdenv, fetchurl, makeWrapper, unzip, jre }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "yEd-3.14"; name = "yEd-3.14.1";
src = fetchurl { src = fetchurl {
url = "http://www.yworks.com/products/yed/demo/${name}.zip"; url = "http://www.yworks.com/products/yed/demo/${name}.zip";
sha256 = "147bb081b063abee202a0019597ac960273454046afb29ebbe91e62102dd0471"; sha256 = "09zik3pjs5x0vc0jvndm762blk85y44lxac3vdfqqbinwd9gfnm2";
}; };
nativeBuildInputs = [ unzip makeWrapper ]; nativeBuildInputs = [ unzip makeWrapper ];

View File

@ -8,7 +8,11 @@ stdenv.mkDerivation rec {
sha256 = "1hmadwqfpg15vhwq9pa1sl5xslibrjpk6hpq2s9hfmx1s5l6ihfw"; sha256 = "1hmadwqfpg15vhwq9pa1sl5xslibrjpk6hpq2s9hfmx1s5l6ihfw";
}; };
preConfigure = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/build/src''; preConfigure = if stdenv.isDarwin then ''
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:"`pwd`/build/src
'' else ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:"`pwd`/build/src
'';
buildInputs = [ cmake ]; buildInputs = [ cmake ];

View File

@ -4,9 +4,9 @@ stdenv.mkDerivation {
name = "urxvt-perls"; name = "urxvt-perls";
src = fetchgit { src = fetchgit {
url = "https://github.com/muennich/urxvt-perls"; url = "git://github.com/muennich/urxvt-perls";
rev = "4dec629b3631297d17855c35be1b723e2d9e7591"; rev = "e4dbde31edd19e2f4c2b6c91117ee91e2f83ddd7";
sha256 = "c61bc8819b4e6655ed4a3ce3b347cb6dbebcb484d5d3973cbe9aa7f2c98d372f"; sha256 = "1f8a27c3d54377fdd4ab0be2f4efb8329d4900bb1c792b306dc23b5ee59260b1";
}; };
installPhase = '' installPhase = ''
@ -23,4 +23,4 @@ stdenv.mkDerivation {
license = licenses.gpl2; license = licenses.gpl2;
maintainers = maintainers.abbradar; maintainers = maintainers.abbradar;
}; };
} }

View File

@ -0,0 +1,28 @@
{ stdenv, fetchFromGitHub, cmake, gmp, mpfr, luajit, boost, python
, gperftools, ninja }:
stdenv.mkDerivation rec {
name = "lean-20150328";
src = fetchFromGitHub {
owner = "leanprover";
repo = "lean";
rev = "1b15036dba469020d37f7d6b77b88974d8a36cb1";
sha256 = "0w38g83gp7d3ybfiz9jpl2jz3ljad70bxmar0dnnv45wx42clg96";
};
buildInputs = [ gmp mpfr luajit boost cmake python gperftools ninja ];
enableParallelBuilding = true;
preConfigure = "cd src";
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
meta = {
description = "Automatic and interactive theorem prover";
homepage = "http://leanprover.github.io";
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
};
}

View File

@ -1,24 +1,20 @@
{ stdenv, fetchurl, python, unzip }: { stdenv, fetchFromGitHub, python }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "z3-${version}"; name = "z3-${version}";
version = "4.3.2"; version = "4.3.2";
src = fetchurl {
url = "http://download-codeplex.sec.s-msft.com/Download/SourceControlFileDownload.ashx\?ProjectName\=z3\&changeSetId\=cee7dd39444c9060186df79c2a2c7f8845de415b"; src = fetchFromGitHub {
name = "${name}.zip"; owner = "Z3Prover";
sha256 = "0hagy7xm0m52jd6vlrbizkj24mn6c49hkb3r5p66wilvp15ivpbn"; repo = "z3";
rev = "ac21ffebdf1512da2a77dc46c47bde87cc3850f3";
sha256 = "1y86akhpy41wx3gx7r8gvf7xbax7dj36ikj6gqh5a7p6r6maz9ci";
}; };
buildInputs = [ python unzip ]; buildInputs = [ python ];
enableParallelBuilding = true; enableParallelBuilding = true;
# The zip file doesn't unpack a directory, just the code itself. configurePhase = "python scripts/mk_make.py --prefix=$out && cd build";
unpackPhase = "mkdir ${name} && cd ${name} && unzip $src";
configurePhase = ''
python scripts/mk_make.py --prefix=$out
cd build
'';
# z3's install phase is stupid because it tries to calculate the # z3's install phase is stupid because it tries to calculate the
# python package store location itself, meaning it'll attempt to # python package store location itself, meaning it'll attempt to
@ -32,12 +28,13 @@ stdenv.mkDerivation rec {
cp libz3${soext} $out/lib cp libz3${soext} $out/lib
cp libz3${soext} $out/lib/${python.libPrefix}/site-packages cp libz3${soext} $out/lib/${python.libPrefix}/site-packages
cp z3*.pyc $out/lib/${python.libPrefix}/site-packages cp z3*.pyc $out/lib/${python.libPrefix}/site-packages
cp ../src/api/python/*.py $out/lib/${python.libPrefix}/site-packages
''; '';
meta = { meta = {
description = "A high-performance theorem prover and SMT solver"; description = "A high-performance theorem prover and SMT solver";
homepage = "http://z3.codeplex.com"; homepage = "http://github.com/Z3Prover/z3";
license = stdenv.lib.licenses.msrla; license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.unix; platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ]; maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
}; };

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python3 { stdenv, fetchurl, fetchFromGitHub, pkgconfig, perl, python3, which
, libX11, libxcb, qt5, mesa , libX11, libxcb, qt5, mesa
, ffmpeg , ffmpeg
, libchardet , libchardet
@ -32,13 +32,13 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "bomi-${version}"; name = "bomi-${version}";
version = "0.9.0"; version = "0.9.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xylosper"; owner = "xylosper";
repo = "bomi"; repo = "bomi";
rev = "v${version}"; rev = "v${version}";
sha256 = "12xyz40kl03h1m8g7d7s0wf74l2c70v6bd1drhww7ky48hxi0z14"; sha256 = "1pf82dp7v18yd7knsjl853sfzhq4rqc3sq15jgqiw37096gp0sll";
}; };
buildInputs = with stdenv.lib; buildInputs = with stdenv.lib;
@ -82,7 +82,7 @@ stdenv.mkDerivation rec {
++ optional cddaSupport "--enable-cdda" ++ optional cddaSupport "--enable-cdda"
; ;
nativeBuildInputs = [ pkgconfig perl ]; nativeBuildInputs = [ pkgconfig perl which ];
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -43,11 +43,11 @@ let
}; };
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
name = "kodi-" + version; name = "kodi-" + version;
version = "14.1"; version = "14.2";
src = fetchurl { src = fetchurl {
url = "https://github.com/xbmc/xbmc/archive/${version}-${rel}.tar.gz"; url = "https://github.com/xbmc/xbmc/archive/${version}-${rel}.tar.gz";
sha256 = "1mjmf8ag8dg5brzxy7cmnz72b1b85p69zr1li28j71fgjbi5k053"; sha256 = "1x37l8db6xrvdw933p804lnwvkcm4vdb9gm5i6vmz4ha8f88bjyr";
}; };
buildInputs = [ buildInputs = [

View File

@ -2,8 +2,9 @@
, xlibs, libstartup_notification, libxdg_basedir, libpthreadstubs , xlibs, libstartup_notification, libxdg_basedir, libpthreadstubs
, xcb-util-cursor, makeWrapper, pango, gobjectIntrospection, unclutter , xcb-util-cursor, makeWrapper, pango, gobjectIntrospection, unclutter
, compton, procps, iproute, coreutils, curl, alsaUtils, findutils, xterm , compton, procps, iproute, coreutils, curl, alsaUtils, findutils, xterm
, which, dbus, nettools, git, asciidoc, doxygen, xmlto, docbook_xml_dtd_45 , which, dbus, nettools, git, asciidoc, doxygen
, docbook_xsl }: #, xmlto, docbook_xml_dtd_45 , docbook_xsl
}:
let let
version = "3.5.6"; version = "3.5.6";
@ -54,10 +55,10 @@ stdenv.mkDerivation rec {
xlibs.xcbutilkeysyms xlibs.xcbutilkeysyms
xlibs.xcbutilrenderutil xlibs.xcbutilrenderutil
xlibs.xcbutilwm xlibs.xcbutilwm
xmlto docbook_xml_dtd_45 docbook_xsl #xmlto docbook_xml_dtd_45 docbook_xsl
]; ];
cmakeFlags = "-DGENERATE_MANPAGES=ON"; #cmakeFlags = "-DGENERATE_MANPAGES=ON";
LD_LIBRARY_PATH = "${cairo}/lib:${pango}/lib:${gobjectIntrospection}/lib"; LD_LIBRARY_PATH = "${cairo}/lib:${pango}/lib:${gobjectIntrospection}/lib";
GI_TYPELIB_PATH = "${pango}/lib/girepository-1.0"; GI_TYPELIB_PATH = "${pango}/lib/girepository-1.0";

View File

@ -1,282 +0,0 @@
# generic builder for Cabal packages
{ stdenv, fetchurl, lib, pkgconfig, ghcjs, ghc, Cabal, jailbreakCabal, glibcLocales
, gnugrep, coreutils, hscolour # hscolour is unused
, enableLibraryProfiling ? false
, enableSharedLibraries ? false
, enableSharedExecutables ? false
, enableStaticLibraries ? true
, enableCheckPhase ? true
, enableHyperlinkSource ? false
, extension ? (self : super : {})
}:
let
enableFeature = stdenv.lib.enableFeature;
optional = stdenv.lib.optional;
optionals = stdenv.lib.optionals;
optionalString = stdenv.lib.optionalString;
filter = stdenv.lib.filter;
defaultSetupHs = builtins.toFile "Setup.hs" ''
import Distribution.Simple
main = defaultMain
'';
in
{
mkDerivation =
args : # arguments for the individual package, can modify the defaults
let # These attributes are removed in the end. This is in order not to spoil the build
# environment overly, but also to keep hash-backwards-compatible with the old cabal.nix.
internalAttrs = [
"internalAttrs" "buildDepends" "buildTools" "extraLibraries" "pkgconfigDepends"
"isLibrary" "isExecutable" "testDepends"
];
# Stuff happening after the user preferences have been processed. We remove
# internal attributes and strip null elements from the dependency lists, all
# in the interest of keeping hashes stable.
postprocess =
x : (removeAttrs x internalAttrs) // {
buildInputs = filter (y : ! (y == null)) x.buildInputs;
propagatedBuildInputs = filter (y : ! (y == null)) x.propagatedBuildInputs;
propagatedUserEnvPkgs = filter (y : ! (y == null)) x.propagatedUserEnvPkgs;
doCheck = enableCheckPhase && x.doCheck;
hyperlinkSource = enableHyperlinkSource && x.hyperlinkSource;
};
defaults =
self : { # self is the final version of the attribute set
# pname should be defined by the client to be the package basename
# version should be defined by the client to be the package version
# fname is the internal full name of the package
fname = "${self.pname}-${self.version}";
# name is the external full name of the package; usually we prefix
# all packages with haskell- to avoid name clashes for libraries;
# if that is not desired (for applications), name can be set to
# fname.
name = if self.isLibrary then
if enableLibraryProfiling && self.enableSharedLibraries then
"haskell-${self.pname}-ghcjs${ghc.ghc.version}-${self.version}-profiling-shared"
else if enableLibraryProfiling && !self.enableSharedLibraries then
"haskell-${self.pname}-ghcjs${ghc.ghc.version}-${self.version}-profiling"
else if !enableLibraryProfiling && self.enableSharedLibraries then
"haskell-${self.pname}-ghcjs${ghc.ghc.version}-${self.version}-shared"
else
"haskell-${self.pname}-ghcjs${ghc.ghc.version}-${self.version}"
else
"${self.pname}-${self.version}";
# the default download location for Cabal packages is Hackage,
# you still have to specify the checksum
src = fetchurl {
url = "mirror://hackage/${self.pname}/${self.fname}.tar.gz";
inherit (self) sha256;
};
# default buildInputs are just ghc, if more buildInputs are required
# buildInputs can be extended by the client by using extraBuildInputs,
# but often propagatedBuildInputs is preferable anyway
buildInputs = [ghc ghc.ghc.parent.Cabal_1_22_0_0] ++ self.extraBuildInputs;
extraBuildInputs = self.buildTools ++
(optionals self.doCheck self.testDepends) ++
(if self.pkgconfigDepends == [] then [] else [pkgconfig]) ++
(if self.isLibrary then [] else self.buildDepends ++ self.extraLibraries ++ self.pkgconfigDepends);
# we make sure that propagatedBuildInputs is defined, so that we don't
# have to check for its existence
propagatedBuildInputs = if self.isLibrary then self.buildDepends ++ self.extraLibraries ++ self.pkgconfigDepends else [];
# By default, also propagate all dependencies to the user environment. This is required, otherwise packages would be broken, because
# GHC also needs all dependencies to be available.
propagatedUserEnvPkgs = if self.isLibrary then self.buildDepends else [];
# library directories that have to be added to the Cabal files
extraLibDirs = [];
# build-depends Cabal field
buildDepends = [];
# target(s) passed to the cabal build phase as an argument
buildTarget = "";
# build-depends Cabal fields stated in test-suite stanzas
testDepends = [];
# target(s) passed to the cabal test phase as an argument
testTarget = "";
# build-tools Cabal field
buildTools = [];
# extra-libraries Cabal field
extraLibraries = [];
# pkgconfig-depends Cabal field
pkgconfigDepends = [];
isLibrary = ! self.isExecutable;
isExecutable = false;
# ignore version restrictions on the build inputs that the cabal file might specify
jailbreak = false;
# pass the '--enable-split-objs' flag to cabal in the configure stage
enableSplitObjs = false; # !stdenv.isDarwin; # http://hackage.haskell.org/trac/ghc/ticket/4013
# pass the '--enable-tests' flag to cabal in the configure stage
# and run any regression test suites the package might have
doCheck = false; #enableCheckPhase;
# pass the '--hyperlink-source' flag to ./Setup haddock
hyperlinkSource = enableHyperlinkSource;
# abort the build if the configure phase detects that the package
# depends on multiple versions of the same build input
strictConfigurePhase = true;
# pass the '--enable-library-vanilla' flag to cabal in the
# configure stage to enable building shared libraries
inherit enableStaticLibraries;
# pass the '--enable-shared' flag to cabal in the configure
# stage to enable building shared libraries
inherit enableSharedLibraries;
# pass the '--enable-executable-dynamic' flag to cabal in
# the configure stage to enable linking shared libraries
inherit enableSharedExecutables;
extraConfigureFlags = [
(enableFeature self.enableSplitObjs "split-objs")
(enableFeature enableLibraryProfiling "library-profiling")
(enableFeature true "shared")
(enableFeature self.enableStaticLibraries "library-vanilla")
(enableFeature self.enableSharedExecutables "executable-dynamic")
(enableFeature self.doCheck "tests")
];
# GHC needs the locale configured during the Haddock phase.
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive";
# compiles Setup and configures
configurePhase = ''
eval "$preConfigure"
${optionalString self.jailbreak "${ghc.ghc.parent.jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal"}
PATH=$PATH:${ghc.ghc.ghc}/bin
for i in Setup.hs Setup.lhs ${defaultSetupHs}; do
test -f $i && break
done
ghc --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
for p in $extraBuildInputs $propagatedBuildInputs $propagatedNativeBuildInputs; do
PkgDir="$p/lib/ghcjs-${ghc.ghc.version}_ghc-${ghc.ghc.ghc.version}/package.conf.d"
if [ -f "$PkgDir/package.cache" ]; then
extraConfigureFlags+=" --package-db=$PkgDir"
continue;
fi
if [ -d "$p/include" ]; then
extraConfigureFlags+=" --extra-include-dirs=$p/include"
fi
for d in lib{,64}; do
if [ -d "$p/$d" ]; then
extraConfigureFlags+=" --extra-lib-dirs=$p/$d"
fi
done
done
configureFlags+=" --package-db=${ghc.ghc}/${ghc.ghc.libDir}/package.conf.d"
${optionalString (self.enableSharedExecutables && self.stdenv.isLinux) ''
configureFlags+=" --ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.ghc.name}/${self.pname}-${self.version}";
''}
${optionalString (self.enableSharedExecutables && self.stdenv.isDarwin) ''
configureFlags+=" --ghc-option=-optl=-Wl,-headerpad_max_install_names";
''}
echo "configure flags: $extraConfigureFlags $configureFlags"
./Setup configure --ghcjs --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \
--libsubdir='$pkgid' $extraConfigureFlags $configureFlags 2>&1 \
${optionalString self.strictConfigurePhase ''
| ${coreutils}/bin/tee "$NIX_BUILD_TOP/cabal-configure.log"
if ${gnugrep}/bin/egrep -q '^Warning:.*depends on multiple versions' "$NIX_BUILD_TOP/cabal-configure.log"; then
echo >&2 "*** abort because of serious configure-time warning from Cabal"
exit 1
fi
''}
eval "$postConfigure"
'';
# builds via Cabal
buildPhase = ''
eval "$preBuild"
./Setup build ${self.buildTarget}
export GHC_PACKAGE_PATH=$(${ghc.GHCPackages})
#test -n "$noHaddock" || ./Setup haddock --html --hoogle \
# ${optionalString self.hyperlinkSource "--hyperlink-source"}
eval "$postBuild"
'';
checkPhase = optional self.doCheck ''
eval "$preCheck"
./Setup test ${self.testTarget}
eval "$postCheck"
'';
# installs via Cabal; creates a registration file for nix-support
# so that the package can be used in other Haskell-builds; also
# adds all propagated build inputs to the user environment packages
installPhase = ''
eval "$preInstall"
./Setup copy
mkdir -p $out/bin # necessary to get it added to PATH
local confDir=$out/lib/ghcjs-${ghc.ghc.version}_ghc-${ghc.ghc.ghc.version}/package.conf.d
local installedPkgConf=$confDir/${self.fname}.installedconf
local pkgConf=$confDir/${self.fname}.conf
mkdir -p $confDir
./Setup register --gen-pkg-config=$pkgConf
if test -f $pkgConf; then
echo '[]' > $installedPkgConf
GHC_PACKAGE_PATH=$installedPkgConf ghcjs-pkg --global register $pkgConf --force --package-db=$confDir || true
ghcjs-pkg recache --package-db=$confDir
fi
if test -f $out/nix-support/propagated-native-build-inputs; then
ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages
fi
${optionalString (self.enableSharedExecutables && self.isExecutable && self.stdenv.isDarwin) ''
for exe in $out/bin/* ; do
install_name_tool -add_rpath $out/lib/${ghc.ghc.name}/${self.pname}-${self.version} $exe || true # Ignore failures, which seem to be due to hitting bash scripts rather than binaries
done
''}
eval "$postInstall"
'';
# We inherit stdenv and ghc so that they can be used
# in Cabal derivations.
inherit stdenv ghc;
};
in
stdenv.mkDerivation (postprocess (let super = defaults self // args self;
self = super // extension self super;
in self));
}

View File

@ -211,7 +211,7 @@ stdenv.mkDerivation {
'' ''
+ optionalString cc.langGo or false '' + optionalString cc.langGo or false ''
wrap ccgo ${./cc-wrapper.sh} $ccPath/gccgo wrap gccgo ${./cc-wrapper.sh} $ccPath/gccgo
'' ''
+ optionalString cc.langAda or false '' + optionalString cc.langAda or false ''

View File

@ -0,0 +1,10 @@
{ runCommand, git }: src:
runCommand "local-git-export" {} ''
cd ${toString src}
mkdir -p "$out"
for file in $(${git}/bin/git ls-files); do
mkdir -p "$out/$(dirname $file)"
cp -d $file "$out/$file" || true # don't fail when trying to copy a directory
done
''

View File

@ -116,7 +116,6 @@ hashes=builtins.listToAttrs[
{name="ksnapshot";value="10grzlp7sq367g91858d16sadzipzmgwczhnb5xvy0437lqhhz7c";} {name="ksnapshot";value="10grzlp7sq367g91858d16sadzipzmgwczhnb5xvy0437lqhhz7c";}
{name="kspaceduel";value="0cwgmpv2xcjwz914hqx6rivi5sk4x66imcdqy7pjnj5vk4f197m7";} {name="kspaceduel";value="0cwgmpv2xcjwz914hqx6rivi5sk4x66imcdqy7pjnj5vk4f197m7";}
{name="ksquares";value="1zzg6y6zfqd1a0939hd1wy7ix4wld7ixp5pz2qs315g51m9lpn7i";} {name="ksquares";value="1zzg6y6zfqd1a0939hd1wy7ix4wld7ixp5pz2qs315g51m9lpn7i";}
{name="kstars";value="1pjvy476yjir4z6x1j7192xjr9m0zcxq3x3lpvsxf92pk3l4c73p";}
{name="ksudoku";value="0qgjx7fbawhn63vv37wv4z56jf0gi4chs64aw9bllbq52syirmgb";} {name="ksudoku";value="0qgjx7fbawhn63vv37wv4z56jf0gi4chs64aw9bllbq52syirmgb";}
{name="ksystemlog";value="11xh1psqhq7vimymb394kxjk83yax3gzi9fdckjspk6p10cycln2";} {name="ksystemlog";value="11xh1psqhq7vimymb394kxjk83yax3gzi9fdckjspk6p10cycln2";}
{name="kteatime";value="16rrlxc67afkin3afdf1s9dlr7z2281dfsja64pdrrdilwwpyqwi";} {name="kteatime";value="16rrlxc67afkin3afdf1s9dlr7z2281dfsja64pdrrdilwwpyqwi";}
@ -220,7 +219,6 @@ versions=builtins.listToAttrs[
{name="kdegraphics-mobipocket";value="4.14.3";} {name="kdegraphics-mobipocket";value="4.14.3";}
{name="kdegraphics-strigi-analyzer";value="4.14.3";} {name="kdegraphics-strigi-analyzer";value="4.14.3";}
{name="kdegraphics-thumbnailers";value="4.14.3";} {name="kdegraphics-thumbnailers";value="4.14.3";}
{name="kdelibs";value="4.14.3";}
{name="kdenetwork-filesharing";value="4.14.3";} {name="kdenetwork-filesharing";value="4.14.3";}
{name="kdenetwork-strigi-analyzers";value="4.14.3";} {name="kdenetwork-strigi-analyzers";value="4.14.3";}
{name="kdepim";value="4.14.3";} {name="kdepim";value="4.14.3";}
@ -289,7 +287,6 @@ versions=builtins.listToAttrs[
{name="ksnapshot";value="4.14.3";} {name="ksnapshot";value="4.14.3";}
{name="kspaceduel";value="4.14.3";} {name="kspaceduel";value="4.14.3";}
{name="ksquares";value="4.14.3";} {name="ksquares";value="4.14.3";}
{name="kstars";value="4.14.3";}
{name="ksudoku";value="4.14.3";} {name="ksudoku";value="4.14.3";}
{name="ksystemlog";value="4.14.3";} {name="ksystemlog";value="4.14.3";}
{name="kteatime";value="4.14.3";} {name="kteatime";value="4.14.3";}
@ -386,7 +383,6 @@ modules=[
module="kdelibs"; module="kdelibs";
split=true; split=true;
pkgs=[ pkgs=[
{ name="kdelibs"; }
{ name="baloo"; } { name="baloo"; }
{ name="baloo-widgets"; sane="baloo_widgets"; } { name="baloo-widgets"; sane="baloo_widgets"; }
{ name="kfilemetadata"; } { name="kfilemetadata"; }
@ -531,7 +527,6 @@ modules=[
{ name="klettres"; } { name="klettres"; }
{ name="kmplot"; } { name="kmplot"; }
{ name="kqtquickcharts"; } { name="kqtquickcharts"; }
{ name="kstars"; }
{ name="ktouch"; } { name="ktouch"; }
{ name="kturtle"; } { name="kturtle"; }
{ name="kwordquiz"; } { name="kwordquiz"; }

View File

@ -1,14 +0,0 @@
{ kde, kdelibs, eigen, xplanet, indilib_0_9_9, pkgconfig, qjson }:
kde {
# TODO: wcslib, astrometry
buildInputs = [ kdelibs eigen xplanet indilib_0_9_9 qjson ];
nativeBuildInputs = [ pkgconfig ];
meta = {
description = "A KDE graphical desktop planetarium";
};
}

View File

@ -1,4 +1,5 @@
{stdenv, fetchurl {stdenv, fetchurl
, libtool, autoconf, automake
, gmp, mpfr, libffi , gmp, mpfr, libffi
, noUnicode ? false, , noUnicode ? false,
}: }:
@ -13,10 +14,10 @@ let
sha256="13wlxkd5prm93gcm2dhm7v52fl803yx93aa97lrb39z0y6xzziid"; sha256="13wlxkd5prm93gcm2dhm7v52fl803yx93aa97lrb39z0y6xzziid";
}; };
buildInputs = [ buildInputs = [
libffi libtool autoconf automake
]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
gmp mpfr libffi gmp mpfr
]; ];
in in
stdenv.mkDerivation { stdenv.mkDerivation {
@ -25,8 +26,18 @@ stdenv.mkDerivation {
src = fetchurl { src = fetchurl {
inherit (s) url sha256; inherit (s) url sha256;
}; };
patches = [ ./libffi-prefix.patch ];
preConfigure = ''
(cd src ; libtoolize -f)
(cd src ; autoheader -f)
(cd src ; aclocal)
(cd src ; automake --add-missing -c)
(cd src ; autoconf -f)
'';
configureFlags = [ configureFlags = [
"--enable-threads" "--enable-threads"
"--with-gmp-prefix=${gmp}"
"--with-libffi-prefix=${libffi}"
] ]
++ ++
(stdenv.lib.optional (! noUnicode) (stdenv.lib.optional (! noUnicode)

View File

@ -0,0 +1,39 @@
diff --git a/src/configure.in b/src/configure.in
index 434da49..642c66c 100644
--- ecl-15.3.7.orig/src/configure.ac
+++ ecl-15.3.7/src/configure.ac
@@ -191,6 +191,11 @@ AC_ARG_WITH(dffi,
[(system|included|auto|no, default=AUTO if libffi available)]),
[enable_libffi=${withval}], [enable_libffi=auto])
+AC_ARG_WITH(libffi-prefix,
+ AS_HELP_STRING( [--with-libffi-prefix=path],
+ [prefix for system LIBFFI includes and libraries] ),
+ [LIBFFI_INCDIR="$withval/include"; LIBFFI_LIBDIR="$withval/lib"], [])
+
AC_ARG_WITH(fpe,
AS_HELP_STRING( [--with-fpe],
[detect floating point exceptions]
@@ -368,6 +373,22 @@ else
INFOEXT=info
fi
+dnl libffi
+
+if test "x$LIBFFI_INCDIR" != "x"; then
+ LIBFFI_CPPFLAGS="-I$LIBFFI_INCDIR"
+fi
+if test "x$LIBFFI_LIBDIR" != "x"; then
+ LIBFFI_LDFLAGS="-L$LIBFFI_LIBDIR"
+ if test "$enable_rpath" = "yes"; then
+ if (echo "$ECL_LDRPATH" | grep '~A') > /dev/null; then
+ LIBFFI_LDFLAGS=`echo $ECL_LDRPATH | sed "s,~A,$LIBFFI_LIBDIR,"`" $LIBFFI_LDFLAGS"
+ fi
+ fi
+fi
+CPPFLAGS="$CPPFLAGS $LIBFFI_CPPFLAGS"
+LDFLAGS="$LDFLAGS $LIBFFI_LDFLAGS"
+
dnl ======================================================================
dnl GNU multiprecision library
dnl

View File

@ -28,7 +28,9 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
# We patch Cabal for GHCJS. See: https://github.com/haskell/cabal/issues/2454
preConfigure = '' preConfigure = ''
sed -i 's/HcPkg.useSingleFileDb = .*/HcPkg.useSingleFileDb = False/' libraries/Cabal/Cabal/Distribution/Simple/GHCJS.hs
echo >mk/build.mk "${buildMK}" echo >mk/build.mk "${buildMK}"
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) '' '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''

View File

@ -1,64 +1,91 @@
{ nodejs, cabal, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm { mkDerivation
, testFramework, testFrameworkHunit, testFrameworkQuickcheck2, time , test-framework
, zlib, aeson, attoparsec, bzlib, dataDefault, ghcPaths, hashable , test-framework-hunit
, haskellSrcExts, haskellSrcMeta, lens, optparseApplicative , test-framework-quickcheck2
, parallel, safe, shelly, split, stringsearch, syb, systemFileio , data-default
, systemFilepath, tar, terminfo, textBinary, unorderedContainers , ghc-paths
, vector, wlPprintText, yaml, fetchgit, Cabal, cabalInstall , haskell-src-exts
, regexPosix, alex, happy, git, gnumake, gcc, autoconf, patch , haskell-src-meta
, automake, libtool, gmp, base16Bytestring , optparse-applicative
, cryptohash, executablePath, transformersCompat, haddockApi , system-fileio
, haddock, hspec, xhtml, primitive, cacert, pkgs, ghc , system-filepath
, text-binary
, unordered-containers
, cabal-install
, wl-pprint-text
, base16-bytestring
, executable-path
, transformers-compat
, haddock-api
, ghcjs-prim
, regex-posix
, ghc, gmp
, jailbreak-cabal
, nodejs, stdenv, filepath, HTTP, HUnit, mtl, network, QuickCheck, random, stm
, time
, zlib, aeson, attoparsec, bzlib, hashable
, lens
, parallel, safe, shelly, split, stringsearch, syb
, tar, terminfo
, vector, yaml, fetchgit, Cabal
, alex, happy, git, gnumake, autoconf, patch
, automake, libtool
, cryptohash
, haddock, hspec, xhtml, primitive, cacert, pkgs
, coreutils , coreutils
, ghcjsPrim , libiconv
}: }:
let let
version = "0.1.0"; version = "0.1.0";
libDir = "share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.ghc.version}/ghcjs"; libDir = "share/ghcjs/${pkgs.stdenv.system}-${version}-${ghc.version}/ghcjs";
ghcjsBoot = fetchgit { ghcjsBoot = fetchgit {
url = git://github.com/ghcjs/ghcjs-boot.git; url = git://github.com/ghcjs/ghcjs-boot.git;
rev = "5c7a71472d5a797e895914d3b82cea447a058793"; rev = "8cd6144870470258fb037b3e04a0a2a98c2b6551"; # 7.10 branch
sha256 = "0dp97bgbnlr3sd9yfnk27p6dfv46fi26sn6y6qv1wxs5i29kmjav"; sha256 = "16cbncx179n5khf8hkj9r221wf73rc8isffk8rv3n9psshv1jiji";
fetchSubmodules = true; fetchSubmodules = true;
}; };
shims = fetchgit { shims = fetchgit {
url = git://github.com/ghcjs/shims.git; url = git://github.com/ghcjs/shims.git;
rev = "99bbd4bed584ec42bfcc5ea61c3808a2c670053d"; rev = "6ada4bf1a084d1b80b993303d35ed863d219b031"; # master branch
sha256 = "1my3gqkln7hgm0bpy32pnhwjfza096alh0n9x9ny8xfpxhmzz4h6"; sha256 = "0dhfnjj3rxdbb2m1pbnjc2yp4xcgsfdrsinljgdmg0hpqkafp4vc";
}; };
in cabal.mkDerivation (self: rec { in mkDerivation (rec {
pname = "ghcjs"; pname = "ghcjs";
inherit version; inherit version;
src = fetchgit { src = fetchgit {
url = git://github.com/ghcjs/ghcjs.git; url = git://github.com/ghcjs/ghcjs.git;
rev = "4b9461e8be646d5152a0ae7ece5b3616bf938637"; rev = "35a59743c4027f26a227635cb24a6246bd851f8d"; # master branch
sha256 = "19g62j1kkdwcgp0042ppmskwbvfk7qkf1fjs8bpjc6wwd19ipiar"; sha256 = "107sh36ji3psdl3py84vxgqbywjyzglj3p0akzpvcmbarxwfr1mw";
}; };
isLibrary = true; isLibrary = true;
isExecutable = true; isExecutable = true;
jailbreak = true; jailbreak = true;
noHaddock = true; doHaddock = false;
doCheck = false; doCheck = false;
buildDepends = [ buildDepends = [
filepath HTTP mtl network random stm time zlib aeson attoparsec filepath HTTP mtl network random stm time zlib aeson attoparsec
bzlib dataDefault ghcPaths hashable haskellSrcExts haskellSrcMeta bzlib data-default ghc-paths hashable haskell-src-exts haskell-src-meta
lens optparseApplicative parallel safe shelly split lens optparse-applicative parallel safe shelly split
stringsearch syb systemFileio systemFilepath tar terminfo textBinary stringsearch syb system-fileio system-filepath tar terminfo text-binary
unorderedContainers vector wlPprintText yaml unordered-containers vector wl-pprint-text yaml
alex happy git gnumake gcc autoconf automake libtool patch gmp alex happy git gnumake autoconf automake libtool patch gmp
base16Bytestring cryptohash executablePath haddockApi base16-bytestring cryptohash executable-path haddock-api
transformersCompat QuickCheck haddock hspec xhtml transformers-compat QuickCheck haddock hspec xhtml
ghcjsPrim regexPosix ghcjs-prim regex-posix libiconv
]; ];
buildTools = [ nodejs git ]; buildTools = [ nodejs git ];
testDepends = [ testDepends = [
HUnit testFramework testFrameworkHunit HUnit test-framework test-framework-hunit
]; ];
patches = [ ./ghcjs.patch ]; patches = [ ./ghcjs.patch ];
postPatch = '' postPatch = ''
substituteInPlace Setup.hs --replace "/usr/bin/env" "${coreutils}/bin/env" substituteInPlace Setup.hs --replace "/usr/bin/env" "${coreutils}/bin/env"
substituteInPlace src/Compiler/Info.hs --replace "@PREFIX@" "$out" substituteInPlace src/Compiler/Info.hs --replace "@PREFIX@" "$out"
substituteInPlace src-bin/Boot.hs --replace "@PREFIX@" "$out" substituteInPlace src-bin/Boot.hs \
--replace "@PREFIX@" "$out" \
--replace "@CC@" "${stdenv.cc}/bin/cc"
''; '';
preBuild = '' preBuild = ''
local topDir=$out/${libDir} local topDir=$out/${libDir}
@ -69,23 +96,33 @@ in cabal.mkDerivation (self: rec {
cp -r ${shims} $topDir/shims cp -r ${shims} $topDir/shims
chmod -R u+w $topDir/shims chmod -R u+w $topDir/shims
# Make the patches be relative their corresponding package's directory.
# See: https://github.com/ghcjs/ghcjs-boot/pull/12
for patch in $topDir/ghcjs-boot/patches/*.patch; do
echo "fixing patch: $patch"
sed -i -e 's@ \(a\|b\)/boot/[^/]\+@ \1@g' $patch
done
''; '';
postInstall = '' postInstall = ''
PATH=$out/bin:${Cabal}/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${gcc.cc}/lib64:$LD_LIBRARY_PATH \ PATH=$out/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${stdenv.cc}/lib64:$LD_LIBRARY_PATH \
env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \ env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \
--dev \ --dev \
--with-cabal ${cabalInstall}/bin/cabal \ --with-cabal ${cabal-install}/bin/cabal \
--with-gmp-includes ${gmp}/include \ --with-gmp-includes ${gmp}/include \
--with-gmp-libraries ${gmp}/lib --with-gmp-libraries ${gmp}/lib
''; '';
passthru = { passthru = {
inherit libDir; inherit libDir;
isGhcjs = true;
nativeGhc = ghc;
}; };
meta = {
homepage = "https://github.com/ghcjs/ghcjs"; homepage = "https://github.com/ghcjs/ghcjs";
description = "GHCJS is a Haskell to JavaScript compiler that uses the GHC API"; description = "GHCJS is a Haskell to JavaScript compiler that uses the GHC API";
license = self.stdenv.lib.licenses.bsd3; license = stdenv.lib.licenses.bsd3;
platforms = self.ghc.meta.platforms; platforms = ghc.meta.platforms;
maintainers = [ self.stdenv.lib.maintainers.jwiegley ]; maintainers = with stdenv.lib.maintainers; [
}; jwiegley cstrahan
];
}) })

View File

@ -1,5 +1,5 @@
diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs diff --git a/src-bin/Boot.hs b/src-bin/Boot.hs
index 988955b..a55f07b 100644 index 3c68dcf..64f3cf7 100644
--- a/src-bin/Boot.hs --- a/src-bin/Boot.hs
+++ b/src-bin/Boot.hs +++ b/src-bin/Boot.hs
@@ -512,9 +512,7 @@ initPackageDB :: B () @@ -512,9 +512,7 @@ initPackageDB :: B ()
@ -46,9 +46,11 @@ index 988955b..a55f07b 100644
mapM_ patchPackage =<< allPackages mapM_ patchPackage =<< allPackages
preparePrimops preparePrimops
buildGenPrim buildGenPrim
@@ -1086,7 +1077,9 @@ cabalInstallFlags parmakeGhcjs = do @@ -1085,8 +1076,11 @@ cabalInstallFlags parmakeGhcjs = do
, "--avoid-reinstalls"
, "--builddir", "dist" , "--builddir", "dist"
, "--with-compiler", ghcjs ^. pgmLocText , "--with-compiler", ghcjs ^. pgmLocText
+ , "--with-gcc", "@CC@"
, "--with-hc-pkg", ghcjsPkg ^. pgmLocText , "--with-hc-pkg", ghcjsPkg ^. pgmLocText
- , "--prefix", toTextI instDir - , "--prefix", toTextI instDir
+ , "--prefix", "@PREFIX@" + , "--prefix", "@PREFIX@"

View File

@ -1,36 +0,0 @@
{ stdenv, fetchurl, builderDefs, unzip, clisp }:
let localDefs = builderDefs.passthru.function {
src = /* put a fetchurl here */
fetchurl {
url = http://www.lambdassociates.org/Download/Qi9.1.zip;
sha256 = "1j584i7pj38rnlf7v9njfdwc6gc296v5friw2887dsw34dmwyg3f";
};
buildInputs = [ unzip clisp];
configureFlags = [];
};
in with localDefs;
let
shell=stdenv.shell;
in
let
allBuild = fullDepEntry ("
(sleep 0.1; echo ) | clisp install.txt;
(sleep 0.1; echo -e '1\n(quit)\n' ) | sh Qi-Linux-CLisp
mkdir -p \$out/share
mkdir -p \$out/bin
cp -r . \$out/share/Qi-9.1
echo -e '#! ${shell}
arg1=\${1:-'\$out'/share/Qi-9.1/startup.txt}
shift
clisp -M '\$out'/share/Qi-9.1/lispinit.mem \$arg1 \"\$@\"\\n' > \$out/bin/qi
chmod a+x \$out/bin/qi
") [ addInputs minInit doUnpack defEnsureDir];
in
stdenv.mkDerivation rec {
name = "Qi-9.1";
builder = writeScript (name + "-builder")
(textClosure localDefs [allBuild doForceShare doPropagate]);
meta = {
description = "Functional programming language, built top of Common Lisp";
};
}

View File

@ -33,6 +33,9 @@ self: super: {
unix = null; unix = null;
xhtml = null; xhtml = null;
# Cabal_1_22_1_1 requires filepath >=1 && <1.4
cabal-install = dontCheck (super.cabal-install.override { Cabal = null; });
# We have Cabal 1.22.x. # We have Cabal 1.22.x.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; }; jailbreak-cabal = super.jailbreak-cabal.override { Cabal = null; };
@ -55,6 +58,9 @@ self: super: {
# We have time 1.5 # We have time 1.5
aeson = disableCabalFlag super.aeson "old-locale"; aeson = disableCabalFlag super.aeson "old-locale";
# requires filepath >=1.1 && <1.4
Glob = doJailbreak super.Glob;
# Setup: At least the following dependencies are missing: base <4.8 # Setup: At least the following dependencies are missing: base <4.8
hspec-expectations = overrideCabal super.hspec-expectations (drv: { hspec-expectations = overrideCabal super.hspec-expectations (drv: {
patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal"; patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
@ -83,6 +89,20 @@ self: super: {
# Test suite fails in "/tokens_bytestring_unicode.g.bin". # Test suite fails in "/tokens_bytestring_unicode.g.bin".
alex = dontCheck super.alex; alex = dontCheck super.alex;
# TODO: should eventually update the versions in hackage-packages.nix
haddock-library = overrideCabal super.haddock-library (drv: {
version = "1.2.0";
sha256 = "0kf8qihkxv86phaznb3liq6qhjs53g3iq0zkvz5wkvliqas4ha56";
});
haddock-api = overrideCabal super.haddock-api (drv: {
version = "2.16.0";
sha256 = "0hk42w6fbr6xp8xcpjv00bhi9r75iig5kp34vxbxdd7k5fqxr1hj";
});
haddock = overrideCabal super.haddock (drv: {
version = "2.16.0";
sha256 = "1afb96w1vv3gmvha2f1h3p8zywpdk8dfk6bgnsa307ydzsmsc3qa";
});
# Upstream was notified about the over-specified constraint on 'base' # Upstream was notified about the over-specified constraint on 'base'
# but refused to do anything about it because he "doesn't want to # but refused to do anything about it because he "doesn't want to
# support a moving target". Go figure. # support a moving target". Go figure.
@ -104,14 +124,13 @@ self: super: {
sed -i '119iimport Prelude hiding ((<$>))' Text/PrettyPrint/Leijen/Text.hs sed -i '119iimport Prelude hiding ((<$>))' Text/PrettyPrint/Leijen/Text.hs
''; '';
}); });
# https://github.com/kazu-yamamoto/unix-time/issues/30 # https://github.com/kazu-yamamoto/unix-time/issues/30
unix-time = dontCheck super.unix-time; unix-time = dontCheck super.unix-time;
# Until the changes have been pushed to Hackage # Until the changes have been pushed to Hackage
haskell-src-meta = appendPatch super.haskell-src-meta (pkgs.fetchpatch { haskell-src-meta = overrideCabal (doJailbreak (appendPatch super.haskell-src-meta ./haskell-src-meta-ghc710.patch)) (drv: {
url = "https://github.com/bmillwood/haskell-src-meta/pull/31.patch"; prePatch = "sed -i -e 's|template-haskell [^,]\\+|template-haskell|' haskell-src-meta.cabal && cat haskell-src-meta.cabal";
sha256 = "0idf12b2wd6chyvsgdcfl5kzx67crvgs1cqklx5say3426j57g4q";
}); });
foldl = appendPatch super.foldl (pkgs.fetchpatch { foldl = appendPatch super.foldl (pkgs.fetchpatch {
url = "https://github.com/Gabriel439/Haskell-Foldl-Library/pull/30.patch"; url = "https://github.com/Gabriel439/Haskell-Foldl-Library/pull/30.patch";
@ -144,4 +163,16 @@ self: super: {
sha256 = "1fycvjfr1l9wa03k30bnppl3ns99lffh9kmp9r7sr8b6yiydcajq"; sha256 = "1fycvjfr1l9wa03k30bnppl3ns99lffh9kmp9r7sr8b6yiydcajq";
stripLen = 1; stripLen = 1;
}); });
ghcjs-prim = self.callPackage ({ mkDerivation, fetchgit, primitive }: mkDerivation {
pname = "ghcjs-prim";
version = "0.1.0.0";
src = fetchgit {
url = git://github.com/ghcjs/ghcjs-prim.git;
rev = "ca08e46257dc276e01d08fb47a693024bae001fa"; # ghc-7.10 branch
sha256 = "0w7sqzp5p70yhmdhqasgkqbf3b61wb24djlavwil2j8ry9y472w3";
};
buildDepends = [ primitive ];
license = pkgs.stdenv.lib.licenses.bsd3;
}) {};
} }

View File

@ -7,6 +7,12 @@ self: super: {
# LLVM is not supported on this GHC; use the latest one. # LLVM is not supported on this GHC; use the latest one.
inherit (pkgs) llvmPackages; inherit (pkgs) llvmPackages;
jailbreak-cabal = pkgs.haskell-ng.packages.ghc7101.jailbreak-cabal;
# Many packages fail with:
# haddock: internal error: expectJust getPackageDetails
mkDerivation = drv: super.mkDerivation (drv // { doHaddock = false; });
# This is the list of packages that are built into a booted ghcjs installation # This is the list of packages that are built into a booted ghcjs installation
# It can be generated with the command: # It can be generated with the command:
# nix-shell '<nixpkgs>' -A pkgs.haskellPackages_ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/-\(.\)/\U\1/' | sed 's/^\([^_]*\)\(.*\)$/\1 = null;/'" # nix-shell '<nixpkgs>' -A pkgs.haskellPackages_ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/-\(.\)/\U\1/' | sed 's/^\([^_]*\)\(.*\)$/\1 = null;/'"
@ -19,21 +25,21 @@ self: super: {
binary = null; binary = null;
rts = null; rts = null;
bytestring = null; bytestring = null;
caseInsensitive = null; case-insensitive = null;
containers = null; containers = null;
deepseq = null; deepseq = null;
directory = null; directory = null;
dlist = null; dlist = null;
extensibleExceptions = null; extensible-exceptions = null;
filepath = null; filepath = null;
ghcPrim = null; ghc-prim = null;
ghcjsBase = null; ghcjs-base = null;
ghcjsPrim = null; ghcjs-prim = null;
hashable = null; hashable = null;
integerGmp = null; integer-gmp = null;
mtl = null; mtl = null;
oldLocale = null; old-locale = null;
oldTime = null; old-time = null;
parallel = null; parallel = null;
pretty = null; pretty = null;
primitive = null; primitive = null;
@ -41,12 +47,64 @@ self: super: {
scientific = null; scientific = null;
stm = null; stm = null;
syb = null; syb = null;
templateHaskell = null; template-haskell = null;
text = null; text = null;
time = null; time = null;
transformers = null; transformers = null;
unix = null; unix = null;
unorderedContainers = null; unordered-containers = null;
vector = null; vector = null;
pqueue = overrideCabal super.pqueue (drv: {
patchPhase = ''
sed -i -e '12s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
sed -i -e '64s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
sed -i -e '32s|null|Data.PQueue.Internals.null|' Data/PQueue/Min.hs
sed -i -e '32s|null|Data.PQueue.Max.null|' Data/PQueue/Max.hs
sed -i -e '42s|null|Data.PQueue.Prio.Internals.null|' Data/PQueue/Prio/Min.hs
sed -i -e '42s|null|Data.PQueue.Prio.Max.null|' Data/PQueue/Prio/Max.hs
'';
});
reactive-banana = overrideCabal super.reactive-banana (drv: {
patchPhase = ''
cat >> src/Reactive/Banana/Switch.hs <<EOF
instance Functor (AnyMoment Identity) where
fmap = liftM
instance Applicative (AnyMoment Identity) where
pure = return
(<*>) = ap
EOF
'';
});
transformers-compat = overrideCabal super.transformers-compat (drv: {
configureFlags = [];
});
dependent-map = overrideCabal super.dependent-map (drv: {
preConfigure = ''
sed -i 's/^.*trust base.*$//' *.cabal
'';
});
profunctors = overrideCabal super.profunctors (drv: {
preConfigure = ''
sed -i 's/^{-# ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
'';
});
"ghcjs-dom" = self.callPackage
({ mkDerivation, base, mtl, text, ghcjs-base
}:
mkDerivation {
pname = "ghcjs-dom";
version = "0.1.1.3";
sha256 = "0pdxb2s7fflrh8sbqakv0qi13jkn3d0yc32xhg2944yfjg5fvlly";
buildDepends = [ base mtl text ghcjs-base ];
description = "DOM library that supports both GHCJS and WebKitGTK";
license = pkgs.stdenv.lib.licenses.mit;
hydraPlatforms = pkgs.stdenv.lib.platforms.none;
}) {};
} }

View File

@ -15,8 +15,8 @@
, doHoogle ? true , doHoogle ? true
, editedCabalFile ? null , editedCabalFile ? null
, enableLibraryProfiling ? false , enableLibraryProfiling ? false
, enableSharedExecutables ? stdenv.lib.versionOlder "7.7" ghc.version , enableSharedExecutables ? ((ghc.isGhcjs or false) || stdenv.lib.versionOlder "7.7" ghc.version)
, enableSharedLibraries ? stdenv.lib.versionOlder "7.7" ghc.version , enableSharedLibraries ? ((ghc.isGhcjs or false) || stdenv.lib.versionOlder "7.7" ghc.version)
, enableSplitObjs ? !stdenv.isDarwin # http://hackage.haskell.org/trac/ghc/ticket/4013 , enableSplitObjs ? !stdenv.isDarwin # http://hackage.haskell.org/trac/ghc/ticket/4013
, enableStaticLibraries ? true , enableStaticLibraries ? true
, extraLibraries ? [] , extraLibraries ? []
@ -53,6 +53,8 @@ let
inherit (stdenv.lib) optional optionals optionalString versionOlder inherit (stdenv.lib) optional optionals optionalString versionOlder
concatStringsSep enableFeature optionalAttrs; concatStringsSep enableFeature optionalAttrs;
isGhcjs = ghc.isGhcjs or false;
newCabalFile = fetchurl { newCabalFile = fetchurl {
url = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal"; url = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
sha256 = editedCabalFile; sha256 = editedCabalFile;
@ -64,7 +66,7 @@ let
main = defaultMain main = defaultMain
''; '';
ghc76xOrLater = stdenv.lib.versionOlder "7.6" ghc.version; ghc76xOrLater = isGhcjs || stdenv.lib.versionOlder "7.6" ghc.version;
packageDbFlag = if ghc76xOrLater then "package-db" else "package-conf"; packageDbFlag = if ghc76xOrLater then "package-db" else "package-conf";
hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling); hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling);
@ -82,14 +84,17 @@ let
(enableFeature enableSplitObjs "split-objs") (enableFeature enableSplitObjs "split-objs")
(enableFeature enableLibraryProfiling "library-profiling") (enableFeature enableLibraryProfiling "library-profiling")
(enableFeature enableSharedLibraries "shared") (enableFeature enableSharedLibraries "shared")
(optionalString (versionOlder "7" ghc.version) (enableFeature enableStaticLibraries "library-vanilla")) (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature enableStaticLibraries "library-vanilla"))
(optionalString (versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic")) (optionalString (isGhcjs || versionOlder "7.4" ghc.version) (enableFeature enableSharedExecutables "executable-dynamic"))
(optionalString (versionOlder "7" ghc.version) (enableFeature doCheck "tests")) (optionalString (isGhcjs || versionOlder "7" ghc.version) (enableFeature doCheck "tests"))
] ++ optionals isGhcjs [
"--with-hsc2hs=${ghc.nativeGhc}/bin/hsc2hs"
"--ghcjs"
]; ];
setupCompileFlags = [ setupCompileFlags = [
(optionalString (!coreSetup) "-${packageDbFlag}=$packageConfDir") (optionalString (!coreSetup) "-${packageDbFlag}=$packageConfDir")
(optionalString (versionOlder "7.8" ghc.version) "-j$NIX_BUILD_CORES") (optionalString (isGhcjs || versionOlder "7.8" ghc.version) "-j$NIX_BUILD_CORES")
(optionalString (versionOlder "7.10" ghc.version) "-threaded") # https://github.com/haskell/cabal/issues/2398 (optionalString (versionOlder "7.10" ghc.version) "-threaded") # https://github.com/haskell/cabal/issues/2398
]; ];
@ -108,9 +113,12 @@ let
ghcEnv = ghc.withPackages (p: haskellBuildInputs); ghcEnv = ghc.withPackages (p: haskellBuildInputs);
setupBuilder = if isGhcjs then "${ghc.nativeGhc}/bin/ghc" else "ghc";
ghcCommand = if isGhcjs then "ghcjs" else "ghc";
in in
stdenv.mkDerivation ({ stdenv.mkDerivation ({
name = "${optionalString hasActiveLibrary "haskell-"}${pname}-${version}"; name = "${optionalString (hasActiveLibrary && pname != "ghcjs") "haskell-"}${pname}-${version}";
pos = builtins.unsafeGetAttrPos "pname" args; pos = builtins.unsafeGetAttrPos "pname" args;
@ -162,7 +170,7 @@ stdenv.mkDerivation ({
configureFlags+=" --extra-lib-dirs=$p/lib" configureFlags+=" --extra-lib-dirs=$p/lib"
fi fi
done done
ghc-pkg --${packageDbFlag}="$packageConfDir" recache ${ghcCommand}-pkg --${packageDbFlag}="$packageConfDir" recache
runHook postSetupCompilerEnvironment runHook postSetupCompilerEnvironment
''; '';
@ -175,7 +183,7 @@ stdenv.mkDerivation ({
done done
echo setupCompileFlags: $setupCompileFlags echo setupCompileFlags: $setupCompileFlags
ghc $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i ${setupBuilder} $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
runHook postCompileBuildDriver runHook postCompileBuildDriver
''; '';
@ -248,13 +256,13 @@ stdenv.mkDerivation ({
isHaskellLibrary = hasActiveLibrary; isHaskellLibrary = hasActiveLibrary;
env = stdenv.mkDerivation { env = stdenv.mkDerivation {
name = "interactive-${optionalString hasActiveLibrary "haskell-"}${pname}-${version}-environment"; name = "interactive-${optionalString (hasActiveLibrary && pname != "ghcjs") "haskell-"}${pname}-${version}-environment";
nativeBuildInputs = [ ghcEnv systemBuildInputs ]; nativeBuildInputs = [ ghcEnv systemBuildInputs ];
LANG = "en_US.UTF-8"; LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive"; LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive";
shellHook = '' shellHook = ''
export NIX_GHC="${ghcEnv}/bin/ghc" export NIX_GHC="${ghcEnv}/bin/${ghcCommand}"
export NIX_GHCPKG="${ghcEnv}/bin/ghc" export NIX_GHCPKG="${ghcEnv}/bin/${ghcCommand}-pkg"
export NIX_GHC_DOCDIR="${ghcEnv}/share/doc/ghc/html" export NIX_GHC_DOCDIR="${ghcEnv}/share/doc/ghc/html"
export NIX_GHC_LIBDIR="${ghcEnv}/lib/${ghcEnv.name}" export NIX_GHC_LIBDIR="${ghcEnv}/lib/${ghcEnv.name}"
''; '';

View File

@ -0,0 +1,55 @@
From 24e6f45408083745080ff2f3710f58209041113c Mon Sep 17 00:00:00 2001
From: Luite Stegeman <stegeman@gmail.com>
Date: Sun, 28 Dec 2014 21:33:22 +0100
Subject: [PATCH] updates for GHC 7.10 and Template Haskell 2.10
---
haskell-src-meta.cabal | 4 ++--
src/Language/Haskell/Meta/Syntax/Translate.hs | 6 ++++++
src/Language/Haskell/Meta/Utils.hs | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/Language/Haskell/Meta/Syntax/Translate.hs b/src/Language/Haskell/Meta/Syntax/Translate.hs
index 189d32e..36a08f1 100644
--- a/src/Language/Haskell/Meta/Syntax/Translate.hs
+++ b/src/Language/Haskell/Meta/Syntax/Translate.hs
@@ -384,9 +384,15 @@ a .->. b = AppT (AppT ArrowT a) b
toCxt :: Hs.Context -> Cxt
toCxt = fmap toPred
where
+#if MIN_VERSION_template_haskell(2,10,0)
+ toPred (Hs.ClassA n ts) = foldl' AppT (ConT (toName n)) (fmap toType ts)
+ toPred (Hs.InfixA t1 n t2) = foldl' AppT (ConT (toName n)) (fmap toType [t1,t2])
+ toPred (Hs.EqualP t1 t2) = foldl' AppT EqualityT (fmap toType [t1,t2])
+#else
toPred (Hs.ClassA n ts) = ClassP (toName n) (fmap toType ts)
toPred (Hs.InfixA t1 n t2) = ClassP (toName n) (fmap toType [t1, t2])
toPred (Hs.EqualP t1 t2) = EqualP (toType t1) (toType t2)
+#endif
toPred a@Hs.IParam{} = noTH "toCxt" a
foldAppT :: Type -> [Type] -> Type
diff --git a/src/Language/Haskell/Meta/Utils.hs b/src/Language/Haskell/Meta/Utils.hs
index 36f7e96..d194f3e 100644
--- a/src/Language/Haskell/Meta/Utils.hs
+++ b/src/Language/Haskell/Meta/Utils.hs
@@ -166,6 +166,9 @@ renameT env new (ForallT ns cxt t) =
unVarT (VarT n) = PlainTV n
renamePreds = renameThings renamePred
+#if MIN_VERSION_template_haskell(2,10,0)
+ renamePred = renameT
+#else
renamePred env new (ClassP n ts) = let
(ts', env', new') = renameTs env new [] ts
in (ClassP (normaliseName n) ts', env', new')
@@ -174,7 +177,7 @@ renameT env new (ForallT ns cxt t) =
(t1', env1, new1) = renameT env new t1
(t2', env2, new2) = renameT env1 new1 t2
in (EqualP t1' t2', env2, new2)
-
+#endif
-- | Remove qualification, etc.
normaliseName :: Name -> Name

View File

@ -29,9 +29,11 @@ assert versionOlder "6.12" ghc.version;
# fi # fi
let let
ghc761OrLater = versionOlder "7.6.1" ghc.version; isGhcjs = ghc.isGhcjs or false;
ghc761OrLater = isGhcjs || versionOlder "7.6.1" ghc.version;
packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf"; packageDBFlag = if ghc761OrLater then "--global-package-db" else "--global-conf";
libDir = "$out/lib/ghc-${ghc.version}"; ghcCommand = if isGhcjs then "ghcjs" else "ghc";
libDir = "$out/lib/${ghcCommand}-${ghc.version}";
docDir = "$out/share/doc/ghc/html"; docDir = "$out/share/doc/ghc/html";
packageCfgDir = "${libDir}/package.conf.d"; packageCfgDir = "${libDir}/package.conf.d";
paths = filter (x: x ? isHaskellLibrary) (closePropagation packages); paths = filter (x: x ? isHaskellLibrary) (closePropagation packages);
@ -50,6 +52,10 @@ buildEnv {
postBuild = '' postBuild = ''
. ${makeWrapper}/nix-support/setup-hook . ${makeWrapper}/nix-support/setup-hook
${optionalString isGhcjs ''
cp -r "${ghc}/${ghc.libDir}/"* ${libDir}/
''}
if test -L "$out/bin"; then if test -L "$out/bin"; then
binTarget="$(readlink -f "$out/bin")" binTarget="$(readlink -f "$out/bin")"
rm "$out/bin" rm "$out/bin"
@ -59,32 +65,32 @@ buildEnv {
for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
rm -f $out/bin/$prg rm -f $out/bin/$prg
makeWrapper ${ghc}/bin/$prg $out/bin/$prg \ makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
--add-flags '"-B$NIX_GHC_LIBDIR"' \ --add-flags '"-B$NIX_GHC_LIBDIR"' \
--set "NIX_GHC" "$out/bin/ghc" \ --set "NIX_GHC" "$out/bin/${ghcCommand}" \
--set "NIX_GHCPKG" "$out/bin/ghc-pkg" \ --set "NIX_GHCPKG" "$out/bin/${ghcCommand}-pkg" \
--set "NIX_GHC_DOCDIR" "${docDir}" \ --set "NIX_GHC_DOCDIR" "${docDir}" \
--set "NIX_GHC_LIBDIR" "${libDir}" \ --set "NIX_GHC_LIBDIR" "${libDir}" \
${optionalString withLLVM ''--prefix "PATH" ":" "${llvm}"''} ${optionalString withLLVM ''--prefix "PATH" ":" "${llvm}"''}
done done
for prg in runghc runhaskell; do for prg in runghc runhaskell; do
rm -f $out/bin/$prg rm -f $out/bin/$prg
makeWrapper ${ghc}/bin/$prg $out/bin/$prg \ makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
--add-flags "-f $out/bin/ghc" \ --add-flags "-f $out/bin/ghc" \
--set "NIX_GHC" "$out/bin/ghc" \ --set "NIX_GHC" "$out/bin/${ghcCommand}" \
--set "NIX_GHCPKG" "$out/bin/ghc-pkg" \ --set "NIX_GHCPKG" "$out/bin/${ghcCommand}-pkg" \
--set "NIX_GHC_DOCDIR" "${docDir}" \ --set "NIX_GHC_DOCDIR" "${docDir}" \
--set "NIX_GHC_LIBDIR" "${libDir}" --set "NIX_GHC_LIBDIR" "${libDir}"
done done
for prg in ghc-pkg ghc-pkg-${ghc.version}; do for prg in ${ghcCommand}-pkg ${ghcCommand}-pkg-${ghc.version}; do
rm -f $out/bin/$prg rm -f $out/bin/$prg
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}" makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
done done
${optionalString hasLibraries "$out/bin/ghc-pkg recache"} ${optionalString hasLibraries "$out/bin/${ghcCommand}-pkg recache"}
$out/bin/ghc-pkg check $out/bin/${ghcCommand}-pkg check
''; '';
} // { } // {
preferLocalBuild = true; preferLocalBuild = true;

View File

@ -4,9 +4,9 @@ stdenv.mkDerivation rec {
name = "cppzmq"; name = "cppzmq";
src = fetchgit { src = fetchgit {
url = "https://github.com/zeromq/cppzmq"; url = "git://github.com/zeromq/cppzmq";
rev = "1f05e0d111197c64be32ad5aecd59f4d1b05a819"; rev = "ac705f604701e2ca1643fa31bae240f9da8b9b9a";
sha256 = "3a3507fd5646f191088e7a0a7a09846da54b0cac0fcb08f7c4c8d510b484e6da"; sha256 = "1bcd5553601a6cdc926aa7a7c89fe54d3b14693cfce85dea97af25cf5a144398";
}; };
installPhase = '' installPhase = ''

View File

@ -16,16 +16,20 @@ stdenv.mkDerivation rec {
configureFlags = configureFlags =
[ "--enable-shared" "--disable-static" [ "--enable-shared" "--disable-static"
"--enable-threads" "--enable-openmp" # very small wrappers "--enable-threads"
] ]
++ optional (precision != "double") "--enable-${precision}" ++ optional (precision != "double") "--enable-${precision}"
# all x86_64 have sse2 # all x86_64 have sse2
++ optional stdenv.isx86_64 "--enable-sse2"; ++ optional stdenv.isx86_64 "--enable-sse2"
++ optional (stdenv.cc.cc.isGNU or false) "--enable-openmp";
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = with stdenv.lib; {
description = "Fastest Fourier Transform in the West library"; description = "Fastest Fourier Transform in the West library";
homepage = http://www.fftw.org/; homepage = http://www.fftw.org/;
license = licenses.gpl2Plus;
maintainers = [ maintainers.spwhitt ];
platforms = platforms.unix;
}; };
} }

View File

@ -2,14 +2,14 @@
, google-gflags, python, libiberty, openssl }: , google-gflags, python, libiberty, openssl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.22.0"; version = "0.32.0";
name = "folly-${version}"; name = "folly-${version}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "facebook"; owner = "facebook";
repo = "folly"; repo = "folly";
rev = "v${version}"; rev = "v${version}";
sha256 = "12p7vbx73jmhf772nbqvd8imw4ihpi16cw6cwxq459r7qds4n0ca"; sha256 = "0yviih6b220bv6d1rg4lx1hqprqapnzfv4rv64cwjxbmz49ckmzh";
}; };
buildInputs = [ libiberty boost.lib libevent double_conversion glog google-gflags openssl ]; buildInputs = [ libiberty boost.lib libevent double_conversion glog google-gflags openssl ];
@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "A YAML parser and emitter for C++"; description = "An open-source C++ library developed and used at Facebook";
homepage = https://code.google.com/p/yaml-cpp/; homepage = https://github.com/facebook/folly;
license = licenses.mit; license = licenses.mit;
# 32bit is not supported: https://github.com/facebook/folly/issues/103 # 32bit is not supported: https://github.com/facebook/folly/issues/103
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];

View File

@ -1,15 +0,0 @@
# This file was auto-generated by cabal2nix. Please do NOT edit manually!
{ cabal, ghcjsBase, mtl, text }:
cabal.mkDerivation (self: {
pname = "ghcjs-dom";
version = "0.1.1.3";
sha256 = "0pdxb2s7fflrh8sbqakv0qi13jkn3d0yc32xhg2944yfjg5fvlly";
buildDepends = [ ghcjsBase mtl text ];
meta = {
description = "DOM library that supports both GHCJS and WebKitGTK";
license = self.stdenv.lib.licenses.mit;
platforms = self.ghc.meta.platforms;
};
})

View File

@ -1,21 +0,0 @@
{ stdenv, fetchurl, cmake, cfitsio, libusb1, zlib, boost, libnova, libjpeg, gsl, pkgconfig }:
stdenv.mkDerivation {
name = "indilib-0.9.9";
src = fetchurl {
url = mirror://sourceforge/indi/libindi_0.9.9.tar.gz;
sha256 = "720b9096baef1489fd7d7d4a236177863a7f7cec86809f21d291b0d9758e4039";
};
propagatedBuildInputs = [ cfitsio libusb1 zlib boost libnova libjpeg gsl ];
nativeBuildInputs = [ cmake pkgconfig ];
preConfigure = ''
cmakeFlags+=" -DUDEVRULES_INSTALL_DIR=$out/etc/udev/rules.d"
'';
meta = {
homepage = http://indi.sf.net;
};
}

View File

@ -1,16 +1,18 @@
{ stdenv, fetchurl, cmake, cfitsio, libusb, zlib, boost }: { stdenv, fetchurl, cmake, cfitsio, libusb, zlib, boost, libnova
, libjpeg, gsl }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "indilib-0.9.6"; name = "indilib-1.0.0";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/indi/libindi_0.9.6.tar.gz; url = mirror://sourceforge/indi/libindi_1.0.0.tar.gz;
sha256 = "1cyhsrsl68iczc4gcdnrrdh0r1dxjac6prxjfkw15wz97ya0mvs4"; sha256 = "0f66jykpjk8mv50lc3rywbqj9mqr4p2n1igfb1222h5fs83c1jhm";
}; };
patches = [ ./link-zlib.patch ./udev-dir.patch ]; patches = [ ./udev-dir.patch ] ;
propagatedBuildInputs = [ cmake cfitsio libusb zlib boost ]; propagatedBuildInputs = [ cmake cfitsio libusb zlib boost
libnova libjpeg gsl ];
meta = { meta = {
homepage = http://indi.sf.net; homepage = http://indi.sf.net;

View File

@ -1,12 +0,0 @@
diff -Naur libindi-0.9.6-upstream/CMakeLists.txt libindi-0.9.6/CMakeLists.txt
--- libindi-0.9.6-upstream/CMakeLists.txt 2012-11-19 16:09:14.000000000 -0430
+++ libindi-0.9.6/CMakeLists.txt 2013-05-02 16:50:25.666624174 -0430
@@ -169,7 +169,7 @@
# To link with main() and indibase classes ######
##################################################
add_library(indidriver SHARED ${libindicom_SRCS} ${liblilxml_SRCS} ${indimain_SRCS} ${indidriver_SRCS})
-target_link_libraries(indidriver ${LIBUSB_LIBRARIES})
+target_link_libraries(indidriver z ${LIBUSB_LIBRARIES})
if (NOVA_FOUND)
target_link_libraries(indidriver ${NOVA_LIBRARIES})
endif(NOVA_FOUND)

View File

@ -1,12 +1,12 @@
diff -Naur libindi-0.9.6-upstream/CMakeLists.txt libindi-0.9.6/CMakeLists.txt diff -Naur libindi-1.0.0-upstream/CMakeLists.txt libindi-1.0.0/CMakeLists.txt
--- libindi-0.9.6-upstream/CMakeLists.txt 2012-11-19 16:09:14.000000000 -0430 --- libindi-1.0.0-upstream/CMakeLists.txt 2015-03-28 21:06:49.576863460 -0430
+++ libindi-0.9.6/CMakeLists.txt 2013-05-02 17:02:55.455944987 -0430 +++ libindi-1.0.0/CMakeLists.txt 2015-03-28 21:07:48.420677548 -0430
@@ -13,7 +13,7 @@ @@ -28,7 +28,7 @@
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/indi/") ## the following are directories where stuff will be installed to
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/")
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") set(PKGCONFIG_INSTALL_PREFIX "${LIB_DESTINATION}/pkgconfig/")
-set(UDEVRULES_INSTALL_DIR "/etc/udev/rules.d") -set(UDEVRULES_INSTALL_DIR "/lib/udev/rules.d" CACHE STRING "Base directory for udev rules")
+set(UDEVRULES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc/udev/rules.d") +set(UDEVRULES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d" CACHE STRING "Base directory for udev rules")
IF(APPLE) ################## Includes ################################
set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup") Include (CheckCXXSourceCompiles)

View File

@ -1,14 +1,14 @@
{ stdenv, fetchurl, pkgconfig, libusb, glib, nss, nspr, gdk_pixbuf }: { stdenv, fetchurl, pkgconfig, libusb, pixman, glib, nss, nspr, gdk_pixbuf }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libfprint-0.5.1"; name = "libfprint-0.6.0";
src = fetchurl { src = fetchurl {
url = "http://people.freedesktop.org/~hadess/${name}.tar.xz"; url = "http://people.freedesktop.org/~hadess/${name}.tar.xz";
sha256 = "1cwgaswqcvvbclahk2m2qr09k7lf7l8jwvgf3svq92w8j4xmc4kd"; sha256 = "1giwh2z63mn45galsjb59rhyrvgwcy01hvvp4g01iaa2snvzr0r5";
}; };
buildInputs = [ libusb glib nss nspr gdk_pixbuf ]; buildInputs = [ libusb pixman glib nss nspr gdk_pixbuf ];
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
configureFlags = [ "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ]; configureFlags = [ "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ];

View File

@ -1,26 +0,0 @@
{ stdenv, fetchgit, libtool, autoconf, automake113x, pkgconfig, libusb, glib, nss, nspr, pixman }:
stdenv.mkDerivation rec {
name = "libfprint";
src = fetchgit {
url = "git://anongit.freedesktop.org/libfprint/libfprint";
rev = "a3c90f2b24434aa36f782aca3950fd89af01fce0";
sha256 = "01qa58vq299xzxzxrcqkl51k8396wh56674d9wjmkv2msxx877hi";
};
buildInputs = [ libusb glib nss nspr pixman ];
nativeBuildInputs = [ libtool autoconf automake113x pkgconfig ];
configureScript = "./autogen.sh";
configureFlags = [ "--prefix=$(out)" "--disable-examples-build" "--disable-x11-examples-build" "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ];
meta = with stdenv.lib; {
homepage = "http://www.freedesktop.org/wiki/Software/fprint/libfprint/";
description = "A library designed to make it easy to add support for consumer fingerprint readers";
license = licenses.lgpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
};
}

View File

@ -9,11 +9,11 @@ assert pythonSupport -> python != null && swig != null;
assert docSupport -> doxygen != null; assert docSupport -> doxygen != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libftdi1-1.1"; name = "libftdi1-1.2";
src = fetchurl { src = fetchurl {
url = "http://www.intra2net.com/en/developer/libftdi/download/${name}.tar.bz2"; url = "http://www.intra2net.com/en/developer/libftdi/download/${name}.tar.bz2";
sha256 = "088yh8pxd6q53ssqndydcw1dkq51cjqyahc03lm6iip22cdazcf0"; sha256 = "1ml8hiahnqm4z0xzyjv8kyrkzvhw6l431c3jndg026cjh9f7ksm6";
}; };
buildInputs = with stdenv.lib; [ cmake pkgconfig confuse ] buildInputs = with stdenv.lib; [ cmake pkgconfig confuse ]

View File

@ -1,12 +1,12 @@
{ callPackage, fetchFromGitHub, ... } @ args: { callPackage, fetchFromGitHub, ... } @ args:
callPackage ./generic.nix (args // rec { callPackage ./generic.nix (args // rec {
version = "1.0.0"; version = "1.0.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "msgpack"; owner = "msgpack";
repo = "msgpack-c"; repo = "msgpack-c";
rev = "cpp-${version}"; rev = "cpp-${version}";
sha256 = "0vkhjil4rh5z9kvjfgzm79kfqwvlimvv49q74wlsjx7vgvv9019d"; sha256 = "0qyjz2rm0gxbv81dlh28ynss66dsyhlqzs09rblbjsdf1vh6yzcq";
}; };
}) })

View File

@ -1,11 +1,11 @@
{ callPackage, fetchFromGitHub, ... } @ args: { callPackage, fetchFromGitHub, ... } @ args:
callPackage ./generic.nix (args // rec { callPackage ./generic.nix (args // rec {
version = "1.1.0"; version = "1.1.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "protobuf-c"; owner = "protobuf-c";
repo = "protobuf-c"; repo = "protobuf-c";
rev = "v${version}"; rev = "v${version}";
sha256 = "11j9vg55a732v14cki4721ipr942c4krr562gliqmnlwvyz0hlyb"; sha256 = "0mdl2i87394l4zdvq2npsxq4zs8p7sqhqmbm2r380ngjs6zic6gw";
}; };
}) })

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "rdkafka-${version}"; name = "rdkafka-${version}";
version = "0.8.5"; version = "0.8.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "edenhill"; owner = "edenhill";
repo = "librdkafka"; repo = "librdkafka";
rev = version; rev = version;
sha256 = "0qx5dnq9halqaznmbwg44p1wl64pzl485r4054569rbx9y9ak1zy"; sha256 = "0iklvslz35dd0lz26ffrbfb20qirl9v5kcdmlcnnzc034hr2zmnv";
}; };
buildInputs = [ zlib perl ]; buildInputs = [ zlib perl ];

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, unzip, blas, liblapack, gfortran }: { stdenv, fetchurl, unzip, blas, liblapack, gfortran }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "3.12.0"; version = "3.12.1";
name = "ipopt-${version}"; name = "ipopt-${version}";
src = fetchurl { src = fetchurl {
url = "http://www.coin-or.org/download/source/Ipopt/Ipopt-${version}.zip"; url = "http://www.coin-or.org/download/source/Ipopt/Ipopt-${version}.zip";
sha256 = "18p1ad64mpliba1hf6jkyyrd0srxsqivwbcnbrr09jfpn4jn4bbr"; sha256 = "0x0wcc21d2bfs3zq8nvhva1nv7xi86wjbyixvvxvcrg2kqjlybdy";
}; };
preConfigure = '' preConfigure = ''

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
description = "Hybrid audio compression format"; description = "Hybrid audio compression format";
homepage = http://www.wavpack.com/; homepage = http://www.wavpack.com/;
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.linux; platforms = platforms.unix;
maintainers = with maintainers; [ codyopel ]; maintainers = with maintainers; [ codyopel ];
}; };
} }

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "C++/C library to construct Excel .xls files in code"; description = "C++/C library to construct Excel .xls files in code";
homepage = http://xlslib.sourceforge.net/; homepage = http://sourceforge.net/projects/xlslib/files/;
license = licenses.bsd2; license = licenses.bsd2;
platforms = platforms.unix; platforms = platforms.unix;
maintainers = maintainers.abbradar; maintainers = maintainers.abbradar;

View File

@ -436,6 +436,7 @@ let
"PBSadmb" "PBSadmb"
"PBSmodelling" "PBSmodelling"
"PCPS" "PCPS"
"PKgraph"
"PopGenReport" "PopGenReport"
"PredictABEL" "PredictABEL"
"PrevMap" "PrevMap"
@ -664,6 +665,7 @@ let
"babel" # requires edgeR "babel" # requires edgeR
"BACA" # requires RDAVIDWebService "BACA" # requires RDAVIDWebService
"BcDiag" # requires fabia "BcDiag" # requires fabia
"beadarrayMSV" # requires Biobase, geneplotter, andlimma
"bdvis" # requres taxize "bdvis" # requres taxize
"beadarrayFilter" # requires beadarray "beadarrayFilter" # requires beadarray
"bigGP" # requires MPI running. HELP WANTED! "bigGP" # requires MPI running. HELP WANTED!
@ -679,6 +681,7 @@ let
"CARrampsOcl" # depends on OpenCL "CARrampsOcl" # depends on OpenCL
"CHAT" # requires DNAcopy "CHAT" # requires DNAcopy
"ChemoSpec" # depends on broken speaq "ChemoSpec" # depends on broken speaq
"Crossover" # fails self-test
"classGraph" # requires graph, and Rgraphviz "classGraph" # requires graph, and Rgraphviz
"clpAPI" # requires clp "clpAPI" # requires clp
"compendiumdb" # requires Biobase "compendiumdb" # requires Biobase
@ -729,9 +732,11 @@ let
"GeneticTools" # requires snpStats "GeneticTools" # requires snpStats
"GExMap" # requires Biobase and multtest "GExMap" # requires Biobase and multtest
"gitter" # requires EBImage "gitter" # requires EBImage
"glmgraph" # test suite says: "undefined symbol: dgemv_"
"gmatrix" # depends on proprietary cudatoolkit "gmatrix" # depends on proprietary cudatoolkit
"GOGANPA" # requires WGCNA "GOGANPA" # requires WGCNA
"gputools" # depends on proprietary cudatoolkit "gputools" # depends on proprietary cudatoolkit
"gMCP" # fails self-test
"gRain" # requires gRbase "gRain" # requires gRbase
"gRapHD" # requires graph "gRapHD" # requires graph
"gRbase" # requires RBGL, and graph "gRbase" # requires RBGL, and graph
@ -796,6 +801,7 @@ let
"NCmisc" # requires BiocInstaller "NCmisc" # requires BiocInstaller
"netClass" # requires samr "netClass" # requires samr
"nettools" # requires WGCNA "nettools" # requires WGCNA
"NORRRM" # can't load SDMTools properly
"netweavers" # requires BiocGenerics, Biobase, and limma "netweavers" # requires BiocGenerics, Biobase, and limma
"NLPutils" # requires qdap "NLPutils" # requires qdap
"NSA" # requires aroma_core "NSA" # requires aroma_core
@ -803,6 +809,9 @@ let
"optBiomarker" # requires rpanel "optBiomarker" # requires rpanel
"ora" # requires ROracle "ora" # requires ROracle
"orQA" # requires genefilter "orQA" # requires genefilter
"pRF" # requires multtest
"PBSmapping" # fails its test suite for unclear reasons
"PBSddesolve" # fails its test suite for unclear reasons
"PairViz" # requires graph "PairViz" # requires graph
"PANDA" # requires GO.db "PANDA" # requires GO.db
"ParDNAcopy" # requires DNAcopy "ParDNAcopy" # requires DNAcopy
@ -843,6 +852,7 @@ let
"rainfreq" # SDMTools.so: undefined symbol: X "rainfreq" # SDMTools.so: undefined symbol: X
"RAM" # requires Heatplus "RAM" # requires Heatplus
"RAPIDR" # requires Biostrings, Rsamtools, and GenomicRanges "RAPIDR" # requires Biostrings, Rsamtools, and GenomicRanges
"RapidPolygonLookup" # depends on broken PBSmapping
"RbioRXN" # requires fmcsR, and KEGGREST "RbioRXN" # requires fmcsR, and KEGGREST
"RcppAPT" # configure script depends on /bin/sh "RcppAPT" # configure script depends on /bin/sh
"RcmdrPlugin_seeg" # requires seeg "RcmdrPlugin_seeg" # requires seeg
@ -870,6 +880,8 @@ let
"rpanel" # I could not make Tcl to recognize BWidget. HELP WANTED! "rpanel" # I could not make Tcl to recognize BWidget. HELP WANTED!
"RQuantLib" # requires QuantLib "RQuantLib" # requires QuantLib
"RSAP" # requires SAPNWRFCSDK "RSAP" # requires SAPNWRFCSDK
"rgp" # fails self-test
"rgpui" # depends on broken rgp
"RSeed" # requires RBGL, and graph "RSeed" # requires RBGL, and graph
"rsig" # requires survcomp "rsig" # requires survcomp
"RSNPset" # requires qvalue "RSNPset" # requires qvalue
@ -905,6 +917,8 @@ let
"spocc" # requires leafletR "spocc" # requires leafletR
"SQDA" # requires limma "SQDA" # requires limma
"Statomica" # requires Biobase, multtest "Statomica" # requires Biobase, multtest
"stagePop" # depends on broken PBSddesolve
"SeqGrapheR" # depends on Biostrings
"stpp" # requires spatstat "stpp" # requires spatstat
"structSSI" # requires multtest "structSSI" # requires multtest
"strum" # requires Rgraphviz "strum" # requires Rgraphviz
@ -920,6 +934,7 @@ let
"ttScreening" # requires sva, and limma "ttScreening" # requires sva, and limma
"V8" # compilation error "V8" # compilation error
"vows" # requires rpanel "vows" # requires rpanel
"vmsbase" # depends on broken PBSmapping
"WGCNA" # requires impute "WGCNA" # requires impute
"wgsea" # requires snpStats "wgsea" # requires snpStats
"WideLM" # depends on proprietary cudatoolkit "WideLM" # depends on proprietary cudatoolkit

View File

@ -15,6 +15,6 @@ stdenv.mkDerivation rec {
homepage = http://www.nongnu.org/texi2html/; homepage = http://www.nongnu.org/texi2html/;
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
maintainers = [stdenv.lib.maintainers.marcweber]; maintainers = [stdenv.lib.maintainers.marcweber];
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.unix;
}; };
} }

View File

@ -6,7 +6,7 @@
let let
py = pythonPackages; py = pythonPackages;
version = "2.0.31"; version = "2.0.32";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "anki-${version}"; name = "anki-${version}";
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
"http://ankisrs.net/download/mirror/${name}.tgz" "http://ankisrs.net/download/mirror/${name}.tgz"
"http://ankisrs.net/download/mirror/archive/${name}.tgz" "http://ankisrs.net/download/mirror/archive/${name}.tgz"
]; ];
sha256 = "0bxy4pq9yq78g0ffnlkpqj91ri0w4xqgv8mqksddn02v4llrd5jb"; sha256 = "0g5rmg0yqh40a3g8ci3y3if7vw4jl5nrpq8ki1a13a3xmgch13rr";
}; };
pythonPath = [ pyqt4 py.pysqlite py.sqlalchemy py.pyaudio ] pythonPath = [ pyqt4 py.pysqlite py.sqlalchemy py.pyaudio ]

View File

@ -0,0 +1,31 @@
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile
index b7e2fbf..5ff23db 100644
--- a/crawl-ref/source/Makefile
+++ b/crawl-ref/source/Makefile
@@ -273,7 +273,7 @@ endif
LIBZ := contrib/install/$(ARCH)/lib/libz.a
ifndef CROSSHOST
- SQLITE_INCLUDE_DIR := /usr/include
+ SQLITE_INCLUDE_DIR := ${sqlite}/include
else
# This is totally wrong, works only with some old-style setups, and
# on some architectures of Debian/new FHS multiarch -- excluding, for
@@ -943,7 +943,7 @@ else
SYS_PROPORTIONAL_FONT = $(shell { name=$(OUR_PROPORTIONAL_FONT);\
{\
fc-list | sed 's/: .*//' | grep -Fi "/$$name";\
- for dir in /usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;\
+ for dir in ${dejavu_fonts}/share/fonts;\
do [ -d $$dir ] && echo $$dir; done;\
} | xargs -I% find % -type f -iname $$name -print | head -n1; } 2>/dev/null)
ifneq (,$(SYS_PROPORTIONAL_FONT))
@@ -968,7 +968,7 @@ else
SYS_MONOSPACED_FONT = $(shell { name=$(OUR_MONOSPACED_FONT);\
{\
fc-list | sed 's/: .*//' | grep -Fi "/$$name";\
- for dir in /usr/share/fonts /usr/local/share/fonts /usr/*/lib/X11/fonts;\
+ for dir in ${dejavu_fonts}/share/fonts;\
do [ -d $$dir ] && echo $$dir; done;\
} | xargs -I% find % -type f -iname $$name -print | head -n1; } 2>/dev/null)
ifneq (,$(SYS_MONOSPACED_FONT))

View File

@ -1,18 +1,20 @@
{ stdenv, fetchurl, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses { stdenv, fetchFromGitHub, which, sqlite, lua5_1, perl, zlib, pkgconfig, ncurses
, dejavu_fonts, libpng, SDL, SDL_image, mesa, freetype , dejavu_fonts, libpng, SDL, SDL_image, mesa, freetype
, tileMode ? true , tileMode ? true
}: }:
let version = "0.15.2"; let version = "0.16.1";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "crawl-${version}" + (if tileMode then "-tiles" else ""); name = "crawl-${version}" + (if tileMode then "-tiles" else "");
src = fetchurl { src = fetchFromGitHub {
url = "mirror://sourceforge/crawl-ref/Stone%20Soup/${version}/stone_soup-${version}-nodeps.tar.xz"; owner = "crawl-ref";
sha256 = "1qi1g8w0sxmwrv96hnay20gpwp1xn2xcq1cw9iwn1yq112484fp9"; repo = "crawl-ref";
rev = version;
sha256 = "0gciqaij05qr5bwkk5mblvk5k0p6bzjd58czk1b6x5xx5qcp6mmh";
}; };
patches = [ ./makefile_fonts.patch ./makefile_sqlite.patch ]; patches = [ ./crawl_purify.patch ];
nativeBuildInputs = [ pkgconfig which perl ]; nativeBuildInputs = [ pkgconfig which perl ];
@ -22,7 +24,8 @@ stdenv.mkDerivation rec {
[ libpng SDL SDL_image freetype mesa ]; [ libpng SDL SDL_image freetype mesa ];
preBuild = '' preBuild = ''
cd source cd crawl-ref/source
echo "${version}" > util/release_ver
# Related to issue #1963 # Related to issue #1963
sed -i 's/-fuse-ld=gold//g' Makefile sed -i 's/-fuse-ld=gold//g' Makefile
for i in util/*.pl; do for i in util/*.pl; do

View File

@ -1,20 +0,0 @@
--- old/source/Makefile 2013-11-28 01:03:54.000000000 +0000
+++ new/source/Makefile 2014-02-05 14:04:32.531838188 +0000
@@ -880,7 +880,7 @@
INSTALL_FONTS += $(PROPORTIONAL_FONT)
endif
else
- SYS_PROPORTIONAL_FONT = $(shell dir=/usr/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_PROPORTIONAL_FONT)|head -n 1)
+ SYS_PROPORTIONAL_FONT = $(shell dir=${dejavu_fonts}/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_PROPORTIONAL_FONT)|head -n 1)
ifeq (,$(SYS_PROPORTIONAL_FONT))
SYS_PROPORTIONAL_FONT = $(shell dir=/usr/local/share/fonts ; [ -d $$dir ] && find $$dir -iname $(OUR_PROPORTIONAL_FONT)|head -n 1)
endif
@@ -903,7 +903,7 @@
INSTALL_FONTS += $(MONOSPACED_FONT)
endif
else
- SYS_MONOSPACED_FONT = $(shell dir=/usr/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_MONOSPACED_FONT)|head -n 1)
+ SYS_MONOSPACED_FONT = $(shell dir=${dejavu_fonts}/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_MONOSPACED_FONT)|head -n 1)
ifeq (,$(SYS_MONOSPACED_FONT))
SYS_MONOSPACED_FONT = $(shell dir=/usr/local/share/fonts; [ -d $$dir ] && find $$dir -iname $(OUR_MONOSPACED_FONT)|head -n 1)
endif

View File

@ -1,11 +0,0 @@
--- old/source/Makefile 2014-04-14 12:46:35.401956673 +0000
+++ new/source/Makefile 2014-04-14 12:47:12.757006254 +0000
@@ -259,7 +259,7 @@
LIBZ := contrib/install/$(ARCH)/lib/libz.a
ifndef CROSSHOST
- SQLITE_INCLUDE_DIR := /usr/include
+ SQLITE_INCLUDE_DIR := ${sqlite}/include
else
# This is totally wrong, works only with some old-style setups, and
# on some architectures of Debian/new FHS multiarch -- excluding, for

View File

@ -1,13 +1,15 @@
{ stdenv, fetchgit, wine, perl, which, coreutils, zenity, curl { stdenv, fetchFromGitHub, wine, perl, which, coreutils, zenity, curl
, cabextract, unzip, p7zip, gnused, gnugrep, bash } : , cabextract, unzip, p7zip, gnused, gnugrep, bash } :
stdenv.mkDerivation rec { let version = "20150316";
name = "winetricks-20150206"; in stdenv.mkDerivation rec {
name = "winetricks-${version}";
src = fetchgit { src = fetchFromGitHub {
url = "https://code.google.com/p/winetricks/"; owner = "Winetricks";
rev = "483056823093a90c9186b3d1a4867f481acf5fa1"; repo = "winetricks";
sha256 = "8b86a2a130ced405886775f0f81e7a6b25eb1bc22f357d0fe705fead52fff829"; rev = version;
sha256 = "00c55jpca6l3v3p02xc0gy5l4xb17gf90282hq5h85nh72kqsbrh";
}; };
buildInputs = [ perl which ]; buildInputs = [ perl which ];

View File

@ -1245,6 +1245,16 @@ rec {
}; };
dependencies = []; dependencies = [];
};
"vim-gista" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "vim-gista-2015-01-29";
src = fetchgit {
url = "git://github.com/lambdalisue/vim-gista";
rev = "e450417a6eaeb99d3982b880507697dce85b7217";
sha256 = "a7665dbc63a35d1fe9b7679a498deafb80c8dfb05fced37ac4722212c673f2ec";
};
dependencies = [];
}; };
"vim-snippets" = buildVimPluginFrom2Nix { # created by nix#NixDerivation "vim-snippets" = buildVimPluginFrom2Nix { # created by nix#NixDerivation
name = "vim-snippets-2015-03-24"; name = "vim-snippets-2015-03-24";

View File

@ -52,5 +52,6 @@
"YankRing" "YankRing"
"vim-addon-manager" "vim-addon-manager"
"vim-addon-nix" "vim-addon-nix"
"vim-gista"
"github:JagaJaga/vim-addon-vim2nix" "github:JagaJaga/vim-addon-vim2nix"
"sensible" "sensible"

View File

@ -5,8 +5,8 @@ stdenv.mkDerivation {
src = fetchgit { src = fetchgit {
url = "git://github.com/M0Rf30/android-udev-rules"; url = "git://github.com/M0Rf30/android-udev-rules";
rev = "82f78561f388363a925e6663211988d9527de0c6"; rev = "2cc51a456ccfbca338c4e6b76211645aaac631e9";
sha256 = "badd7a152acf92c75335917c07125ffb1b5fda0bed5ec1e474d76e48a8d9f0db"; sha256 = "dbf1614cebb466d1adbcc5f17cefc0c37f148f9e3b46443b3e82f6cd19a1514f";
}; };
installPhase = '' installPhase = ''

View File

@ -1,3 +1,21 @@
/*
WARNING/NOTE: whenever you want to add an option here you need to
either
* mark it as an optional one with `?` suffix,
* or make sure it works for all the versions in nixpkgs,
* or check for which kernel versions it will work (using kernel
changelog, google or whatever) and mark it with `versionOlder` or
`versionAtLeast`.
Then do test your change by building all the kernels (or at least
their configs) in nixpkgs or else you will guarantee lots and lots
of pain to users trying to switch to an older kernel because of some
hardware problems with a new one.
*/
{ stdenv, version, kernelPlatform, extraConfig, features }: { stdenv, version, kernelPlatform, extraConfig, features }:
with stdenv.lib; with stdenv.lib;
@ -284,7 +302,9 @@ with stdenv.lib;
${optionalString (versionAtLeast version "3.6") '' ${optionalString (versionAtLeast version "3.6") ''
RC_DEVICES? y # Enable IR devices RC_DEVICES? y # Enable IR devices
''} ''}
RT2800USB_RT55XX y ${optionalString (versionAtLeast version "3.10") ''
RT2800USB_RT55XX y
''}
SCSI_LOGGING y # SCSI logging facility SCSI_LOGGING y # SCSI logging facility
SERIAL_8250 y # 8250/16550 and compatible serial support SERIAL_8250 y # 8250/16550 and compatible serial support
SLIP_COMPRESSED y # CSLIP compressed headers SLIP_COMPRESSED y # CSLIP compressed headers

View File

@ -1,37 +0,0 @@
{ stdenv, fetchurl, libXrender, fontconfig, freetype, libXext, libX11 }:
let arch = if stdenv.system == "x86_64-linux" then "64"
else if stdenv.system == "i686-linux" then "32"
else abort "OCZ Toolbox only support {x86-64,i686}-linux targets";
in stdenv.mkDerivation rec {
version = "4.9.0.634";
name = "ocz-toolbox-${version}";
src = fetchurl {
url = "http://ocz.com/consumer/download/firmware/OCZToolbox_v${version}_linux.tar.gz";
sha256 = "0h51p5bg9h2smxxy1r4xkzzjjavhgql7yy12qmjk0vbh13flgx3y";
};
prePatch = ''
cd linux${arch}
'';
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libXrender fontconfig freetype libXext libX11 ];
installPhase = ''
install -Dm755 OCZToolbox $out/bin/OCZToolbox
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$libPath" \
$out/bin/OCZToolbox
'';
dontStrip = true;
meta = with stdenv.lib; {
description = "Update firmware and BIOS, secure erase, view SMART attributes, and view drive details of your OCZ SSD";
homepage = "http://ocz.com/consumer/download/firmware";
license = licenses.unfree;
maintainers = with maintainers; [ abbradar ];
};
}

View File

@ -2,14 +2,14 @@
, inotifyTools, clucene_core_2, sqlite }: , inotifyTools, clucene_core_2, sqlite }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dovecot-2.2.15"; name = "dovecot-2.2.16";
buildInputs = [perl openssl bzip2 zlib openldap clucene_core_2 sqlite] buildInputs = [perl openssl bzip2 zlib openldap clucene_core_2 sqlite]
++ stdenv.lib.optionals (stdenv.isLinux) [ systemd pam inotifyTools ]; ++ stdenv.lib.optionals (stdenv.isLinux) [ systemd pam inotifyTools ];
src = fetchurl { src = fetchurl {
url = "http://dovecot.org/releases/2.2/${name}.tar.gz"; url = "http://dovecot.org/releases/2.2/${name}.tar.gz";
sha256 = "17rr7krfvyk706j12y9wy6nf7wh5vppqjrgxjdf66z9nw9lpf3ni"; sha256 = "1w6gg4h9mxg3i8faqpmgj19imzyy001b0v8ihch8ma3zl63i5kjn";
}; };
preConfigure = '' preConfigure = ''

View File

@ -1,8 +1,8 @@
{ stdenv, fetchurl, pkgconfig, { stdenv, fetchurl, pkgconfig,
version ? "2.1.9", version ? "2.2.8",
mainSrc ? fetchurl { mainSrc ? fetchurl {
url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz"; url = "http://sphinxsearch.com/files/sphinx-${version}-release.tar.gz";
sha256 = "00vwxf3zr0g1fq9mls1z2rd8nxw74b76pkl1j466lig1qc5am2b2"; sha256 = "1q6jdw5g81k7ciw9fhwklb5ifgb8zna39795m0x0lbvwjbk3ampv";
} }
}: }:

View File

@ -24,11 +24,11 @@ in
assert builtins.filter (x: lib.all (y: y.name != x) available) plugins == []; assert builtins.filter (x: lib.all (y: y.name != x) available) plugins == [];
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "uwsgi-2.0.9"; name = "uwsgi-2.0.10";
src = fetchurl { src = fetchurl {
url = "http://projects.unbit.it/downloads/${name}.tar.gz"; url = "http://projects.unbit.it/downloads/${name}.tar.gz";
sha256 = "15c2j5myx1s54a1f6a7pjblvk7v96mz2kqlbj19mdfd8l2y8j17y"; sha256 = "12q2sn35vf1ils5043svq8da0czy54k63ziybvl33a9dqbb83cy0";
}; };
nativeBuildInputs = [ python3 pkgconfig ]; nativeBuildInputs = [ python3 pkgconfig ];

View File

@ -1,39 +1,78 @@
{ stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, readline, openssl, python { stdenv, fetchFromGitHub, pkgconfig, nettools, gettext, libtool
, ncurses ? null , readline ? null, openssl ? null, python ? null, ncurses ? null
, sqlite ? null, postgresql ? null, mysql ? null, libcap ? null , sqlite ? null, postgresql ? null, mysql ? null, zlib ? null, lzo ? null
, zlib ? null, lzo ? null, acl ? null, ceph ? null , acl ? null, glusterfs ? null, ceph ? null, libcap ? null
}: }:
assert sqlite != null || postgresql != null || mysql != null; assert sqlite != null || postgresql != null || mysql != null;
with stdenv.lib; with stdenv.lib;
let
withGlusterfs = "\${with_glusterfs_directory}";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "bareos-${version}"; name = "bareos-${version}";
version = "14.2.3"; version = "14.2.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "bareos"; owner = "bareos";
repo = "bareos"; repo = "bareos";
rev = "Release/${version}"; rev = "Release/${version}";
name = "${name}-src"; name = "${name}-src";
sha256 = "04z6nwlnk6kk5ghbdw5g34mkypmpk4qpkd08cjxwblg8sdj4j8fl"; sha256 = "0shb91pawdgrn6rb4np3zyyxv36899nvwf8jaihkg0wvb01viqzr";
}; };
buildInputs = [ buildInputs = [
pkgconfig nettools gettext readline openssl python pkgconfig nettools gettext readline openssl python
ncurses sqlite postgresql mysql libcap zlib lzo acl ceph ncurses sqlite postgresql mysql zlib lzo acl glusterfs ceph libcap
]; ];
postPatch = ''
sed -i 's,\(-I${withGlusterfs}/include\),\1/glusterfs,' configure
'';
configureFlags = [ configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--exec-prefix=\${out}" "--exec-prefix=\${out}"
"--with-openssl=${openssl}" "--enable-lockmgr"
"--with-python=${python}" "--enable-dynamic-storage-backends"
"--with-readline=${readline}" "--with-basename=nixos" # For reproducible builds since it uses the hostname otherwise
"--with-hostname=nixos" # For reproducible builds since it uses the hostname otherwise
"--with-working-dir=/var/lib/bareos"
"--with-bsrdir=/var/lib/bareos"
"--with-logdir=/var/log/bareos"
"--with-pid-dir=/var/run/bareos"
"--with-subsys-dir=/var/run/bareos"
"--enable-ndmp" "--enable-ndmp"
"--enable-lmdb" "--enable-lmdb"
] ++ optional (sqlite != null) "--with-sqlite3=${sqlite}" "--enable-batch-insert"
"--enable-dynamic-cats-backends"
"--enable-sql-pooling"
"--enable-scsi-crypto"
] ++ optionals (readline != null) [ "--disable-conio" "--enable-readline" "--with-readline=${readline}" ]
++ optional (python != null) "--with-python=${python}"
++ optional (openssl != null) "--with-openssl=${openssl}"
++ optional (sqlite != null) "--with-sqlite3=${sqlite}"
++ optional (postgresql != null) "--with-postgresql=${postgresql}" ++ optional (postgresql != null) "--with-postgresql=${postgresql}"
++ optional (mysql != null) "--with-mysql=${mysql}"; ++ optional (mysql != null) "--with-mysql=${mysql}"
++ optional (zlib != null) "--with-zlib=${zlib}"
++ optional (lzo != null) "--with-lzo=${lzo}"
++ optional (acl != null) "--enable-acl"
++ optional (glusterfs != null) "--with-glusterfs=${glusterfs}"
++ optional (ceph != null) "--with-cephfs=${ceph}";
installFlags = [ "DESTDIR=\${out}" ];
postInstall = ''
mv $out/$out/* $out
DIR=$out/$out
while rmdir $DIR 2>/dev/null; do
DIR="$(dirname "$DIR")"
done
rm -rf /tmp /var
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = http://www.bareos.org/; homepage = http://www.bareos.org/;

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, zlib, openssl }: { stdenv, fetchurl, zlib, openssl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "3.48.20"; version = "3.48.21";
name = "httrack-${version}"; name = "httrack-${version}";
src = fetchurl { src = fetchurl {
url = "http://mirror.httrack.com/httrack-${version}.tar.gz"; url = "http://mirror.httrack.com/httrack-${version}.tar.gz";
sha256 = "129cpf324ihqxc8mvvkqjfanl17g60zfiqy1zx8ri56dkrg52mii"; sha256 = "10p4gf8y9h7mxkqlbs3hqgvmvbgvcbax8jp1whbw4yidwahn06w7";
}; };
buildInputs = [ zlib openssl ]; buildInputs = [ zlib openssl ];

View File

@ -8,7 +8,8 @@ stdenv.mkDerivation {
sha256 = "01hcwf5rgqi303fa4kdjkbpa7n8mvvh7h9gpgh2b23nz73k0q0zf"; sha256 = "01hcwf5rgqi303fa4kdjkbpa7n8mvvh7h9gpgh2b23nz73k0q0zf";
}; };
phases = "unpackPhase installPhase"; patches = [ ./fix-librsync-rs_default_strong_len.patch ];
installPhase = '' installPhase = ''
python ./setup.py install --prefix=$out python ./setup.py install --prefix=$out
sed -i $out/bin/rdiff-backup -e \ sed -i $out/bin/rdiff-backup -e \

View File

@ -0,0 +1,20 @@
Patch by Roman Tereshonkov and Kari Hautio for rdiff-backup <= 1.2.8 to avoid a build failure with
librsync >= 1.0.0 (which is a security bugfix release). The discussion and solution finding can be
found at https://bugs.launchpad.net/duplicity/+bug/1416344 (for duplicity).
--- rdiff-backup-1.2.8/_librsyncmodule.c 2009-03-16 15:36:21.000000000 +0100
+++ rdiff-backup-1.2.8/_librsyncmodule.c.librsync-1.0.0 2015-03-02 00:54:24.000000000 +0100
@@ -59,8 +59,13 @@
if (sm == NULL) return NULL;
sm->x_attr = NULL;
+#ifdef RS_DEFAULT_STRONG_LEN
sm->sig_job = rs_sig_begin((size_t)blocklen,
(size_t)RS_DEFAULT_STRONG_LEN);
+#else
+ sm->sig_job = rs_sig_begin((size_t)blocklen,
+ (size_t)8, RS_MD4_SIG_MAGIC);
+#endif
return (PyObject*)sm;
}

View File

@ -0,0 +1,20 @@
{ stdenv, fetchurl, libdvdread, pkgconfig }:
let
version = "0.17";
in
stdenv.mkDerivation {
name = "lsdvd-${version}";
src = fetchurl {
url = "mirror://sourceforge/lsdvd/lsdvd-${version}.tar.gz";
sha256 = "1274d54jgca1prx106iyir7200aflr70bnb1kawndlmcckcmnb3x";
};
buildInputs = [ libdvdread ];
nativeBuildInputs = [ pkgconfig ];
meta = {
homepage = "http://sourceforge.net/projects/lsdvd/";
shortDescription = "Display information about audio, video, and subtitle tracks on a DVD";
};
}

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl}: { stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "lbzip2-2.5"; name = "lbzip2-2.5";

View File

@ -1,9 +1,11 @@
{stdenv, fetchurl, help2man}: {stdenv, fetchurl, help2man}:
stdenv.mkDerivation { stdenv.mkDerivation rec {
name = "fatsort"; version = "1.3.365";
name = "fatsort-${version}";
src = fetchurl { src = fetchurl {
url = mirror://sourceforge/fatsort/fatsort-1.3.365.tar.gz; url = "mirror://sourceforge/fatsort/${name}.tar.gz";
sha256 = "0g9zn2ns86g7zmy0y8hw1w1zhnd51hy8yl6kflyhxs49n5sc7b3p"; sha256 = "0g9zn2ns86g7zmy0y8hw1w1zhnd51hy8yl6kflyhxs49n5sc7b3p";
}; };
@ -11,10 +13,11 @@ stdenv.mkDerivation {
buildInputs = [ help2man ]; buildInputs = [ help2man ];
meta = { meta = with stdenv.lib; {
homepage = http://fatsort.sourceforge.net/; homepage = http://fatsort.sourceforge.net/;
description = "Sorts FAT partition table, for devices that don't do sorting of files."; description = "Sorts FAT partition table, for devices that don't do sorting of files";
maintainers = [ stdenv.lib.maintainers.kovirobi ]; maintainers = [ maintainers.kovirobi ];
license = stdenv.lib.licenses.gpl2; license = licenses.gpl2;
inherit version;
}; };
} }

View File

@ -0,0 +1,26 @@
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "cpulimit-${version}";
version = "2.2";
src = fetchurl {
url = "mirror://sourceforge/limitcpu/${name}.tar.gz";
sha256 = "1r19rk2cbyfmgwh3l445fxkn1bmkzyi69dg5dbx4b4mbqjjxlr1z";
};
buildFlags = with stdenv;
if isDarwin then "osx"
else if isFreeBSD then "freebsd"
else "cpulimit";
installFlags = "PREFIX=$(out)";
meta = with stdenv.lib; {
homepage = "http://limitcpu.sourceforge.net/";
description = "A tool to throttle the CPU usage of programs";
platforms = with platforms; linux ++ freebsd ++ darwin;
license = licenses.gpl2;
maintainer = [maintainers.rycee];
};
}

View File

@ -1,10 +1,10 @@
{ stdenv, fetchurl, pkgconfig, geoip, ncurses, glib }: { stdenv, fetchurl, pkgconfig, geoip, ncurses, glib }:
let let
version = "0.8.5"; version = "0.9";
mainSrc = fetchurl { mainSrc = fetchurl {
url = "http://tar.goaccess.io/goaccess-${version}.tar.gz"; url = "http://tar.goaccess.io/goaccess-${version}.tar.gz";
sha256 = "121s1hva33nq0g5n354ln68nalv2frg8slm7n84r81bmi2wvdim4"; sha256 = "1yi7bxrmhvd11ha405bqpz7q442l9bnnx317iy22xzxjl96frn29";
}; };
in in
@ -17,9 +17,9 @@ stdenv.mkDerivation rec {
"--enable-utf8" "--enable-utf8"
]; ];
buildInputs = [ buildInputs = [
pkgconfig pkgconfig
geoip geoip
ncurses ncurses
glib glib
]; ];

View File

@ -8,11 +8,11 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "afl-${version}"; name = "afl-${version}";
version = "1.57b"; version = "1.58b";
src = fetchurl { src = fetchurl {
url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz"; url = "http://lcamtuf.coredump.cx/afl/releases/${name}.tgz";
sha256 = "05dwh2kgz31702y339bvbs0b3ffadxgxk8cqqhs2i0ggx5bnl5p4"; sha256 = "1szggm4x9i9bsrcb99s5vbgncagp7jvhz8cg9amkx7p6mp2x4pld";
}; };
buildInputs = [ makeWrapper ]; buildInputs = [ makeWrapper ];

View File

@ -69,9 +69,10 @@ abi_ulong afl_entry_point, /* ELF entry point (_start) */
afl_start_code, /* .text start pointer */ afl_start_code, /* .text start pointer */
afl_end_code; /* .text end pointer */ afl_end_code; /* .text end pointer */
/* Set on the child in forkserver mode: */ /* Set in the child process in forkserver mode: */
static unsigned char afl_fork_child; static unsigned char afl_fork_child;
unsigned int afl_forksrv_pid;
/* Instrumentation ratio: */ /* Instrumentation ratio: */
@ -158,6 +159,8 @@ static void afl_forkserver(CPUArchState *env) {
if (write(FORKSRV_FD + 1, tmp, 4) != 4) return; if (write(FORKSRV_FD + 1, tmp, 4) != 4) return;
afl_forksrv_pid = getpid();
/* All right, let's await orders... */ /* All right, let's await orders... */
while (1) { while (1) {

View File

@ -0,0 +1,25 @@
--- qemu-2.2.0/linux-user/syscall.c.orig 2014-12-09 14:45:43.000000000 +0000
+++ qemu-2.2.0/linux-user/syscall.c 2015-03-27 06:33:00.736000000 +0000
@@ -227,7 +227,21 @@
_syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo)
_syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
#if defined(TARGET_NR_tgkill) && defined(__NR_tgkill)
-_syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig)
+
+extern unsigned int afl_forksrv_pid;
+
+static int sys_tgkill(int tgid, int pid, int sig) {
+
+ /* Workaround for -lpthread to make abort() work properly, without
+ killing the forkserver due to a prematurely cached PID. */
+
+ if (afl_forksrv_pid && afl_forksrv_pid == pid && sig == SIGABRT)
+ pid = tgid = getpid();
+
+ return syscall(__NR_sys_tgkill, pid, tgid, sig);
+
+}
+
#endif
#if defined(TARGET_NR_tkill) && defined(__NR_tkill)
_syscall2(int,sys_tkill,int,tid,int,sig)

View File

@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
./qemu-patches/cpu-exec.patch ./qemu-patches/cpu-exec.patch
./qemu-patches/no-etc-install.patch ./qemu-patches/no-etc-install.patch
./qemu-patches/translate-all.patch ./qemu-patches/translate-all.patch
./qemu-patches/syscall.patch
]; ];
preConfigure = '' preConfigure = ''

View File

@ -1,19 +1,16 @@
{ stdenv, fetchgit, automake, autoconf, libtool, pkgconfig, gtk_doc { stdenv, fetchurl, pkgconfig, intltool
, libfprint, intltool, glib, dbus_glib, polkit, nss, pam, systemd }: , libfprint, glib, dbus_glib, polkit, nss, pam, systemd }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "fprintd"; name = "fprintd-0.6.0";
src = fetchgit { src = fetchurl {
url = "git://anongit.freedesktop.org/libfprint/fprintd"; url = "http://people.freedesktop.org/~hadess/${name}.tar.xz";
rev = "f7c51b0d585eb63702f0d005081e53f44325df86"; sha256 = "1by6nvlrqkwzcz2v2kyq6avi3h384vmlr42vj9s2yzcinkp64m1z";
sha256 = "1gmnn72ablfxvv13s0rms5f39hc4y2z97aq44d7l9hblnfn6wq12";
}; };
buildInputs = [ libfprint glib dbus_glib polkit nss pam systemd ]; buildInputs = [ libfprint glib dbus_glib polkit nss pam systemd ];
nativeBuildInputs = [ automake libtool autoconf gtk_doc pkgconfig intltool ]; nativeBuildInputs = [ pkgconfig intltool ];
configureScript = "./autogen.sh";
configureFlags = [ "--with-systemdsystemunitdir=$(out)/lib/systemd/system" ]; configureFlags = [ "--with-systemdsystemunitdir=$(out)/lib/systemd/system" ];

View File

@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "7f09319d044b0f6ee71fe3587bb873be701723ac0952cff5069046a78de8fd86"; sha256 = "7f09319d044b0f6ee71fe3587bb873be701723ac0952cff5069046a78de8fd86";
}; };
patches = [ ./remove-debug-message.patch ];
buildInputs = [ readline bzip2 ]; buildInputs = [ readline bzip2 ];
doCheck = true; doCheck = true;

View File

@ -0,0 +1,22 @@
commit 936416690e6c889505d84fe96983a66983beae5e
Author: Werner Koch <wk@gnupg.org>
Date: Thu Feb 26 09:38:58 2015 +0100
gpg: Remove left-over debug message.
* g10/armor.c (check_input): Remove log_debug.
diff --git a/g10/armor.c b/g10/armor.c
index 6c0013d..de1726d 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -534,9 +534,6 @@ check_input( armor_filter_context_t *afx, IOBUF a )
/* This is probably input from a keyserver helper and we
have not yet seen an error line. */
afx->key_failed_code = parse_key_failed_line (line+4, len-4);
- log_debug ("armor-keys-failed (%.*s) ->%d\n",
- (int)len, line,
- afx->key_failed_code);
}
if( i >= 0 && !(afx->only_keyblocks && i != 1 && i != 5 && i != 6 )) {
hdr_line = i;

View File

@ -0,0 +1,18 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "daemonize-${version}";
version = "1.7.5";
src = fetchurl {
url = "https://github.com/bmc/daemonize/archive/release-${version}.tar.gz";
sha256 = "0sx0k05n8kyn0ma51nkjll8cs1xygmhv4qsyshxxj8apvjw20qk1";
};
meta = with stdenv.lib; {
description = "Runs a command as a Unix daemon";
homepage = http://software.clapper.org/daemonize/;
license = licenses.bsd3;
platforms = with platforms; linux ++ freebsd ++ darwin;
};
}

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