diff --git a/srcpkgs/nix/patches/musl.patch b/srcpkgs/nix/patches/musl.patch new file mode 100644 index 00000000000..b3dffe9293a --- /dev/null +++ b/srcpkgs/nix/patches/musl.patch @@ -0,0 +1,39 @@ +--- configure.ac.orig 2015-12-19 21:05:08.254461650 +0100 ++++ configure.ac 2015-12-19 21:06:23.959218929 +0100 +@@ -54,8 +54,6 @@ if test "$sys_name" = sunos; then + fi + + +-CFLAGS= +-CXXFLAGS= + AC_PROG_CC + AC_PROG_CXX + +@@ -96,7 +94,7 @@ AC_CHECK_FUNCS([lutimes]) + + + # Check for sched_setaffinity. +-AC_CHECK_FUNCS([sched_setaffinity]) ++AC_CHECK_FUNCS([sched_setaffinity sched_getcpu]) + + + # Check whether the store optimiser can optimise symlinks. +--- src/libutil/affinity.cc.orig 2015-12-19 21:10:00.175521237 +0100 ++++ src/libutil/affinity.cc 2015-12-19 21:10:19.551719833 +0100 +@@ -3,6 +3,7 @@ + #include "affinity.hh" + + #if HAVE_SCHED_H ++#include + #include + #endif + +@@ -32,7 +33,7 @@ void setAffinityTo(int cpu) + + int lockToCurrentCPU() + { +-#if HAVE_SCHED_SETAFFINITY ++#if HAVE_SCHED_GETCPU + int cpu = sched_getcpu(); + if (cpu != -1) setAffinityTo(cpu); + return cpu; diff --git a/srcpkgs/nix/template b/srcpkgs/nix/template index c8720f9d0aa..bb930fcea76 100644 --- a/srcpkgs/nix/template +++ b/srcpkgs/nix/template @@ -1,14 +1,14 @@ # Template file for 'nix' pkgname=nix -version=1.8 -revision=10 +version=1.10 +revision=1 build_style=gnu-configure # Use /nix/var as suggested by the official Manual. configure_args="--localstatedir=/nix/var" depends="curl perl-WWW-Curl perl-DBD-SQLite" -hostmakedepends="pkg-config flex ${depends}" +hostmakedepends="automake libtool pkg-config flex ${depends}" # Extra run-time dependencies. -makedepends="bzip2-devel libressl-devel sqlite-devel gc-devel" +makedepends="bzip2-devel libressl-devel sqlite-devel gc-devel libcurl-devel" # Default configuration file. conf_files="/etc/nix/nix.conf" # Create required build users/groups. @@ -34,8 +34,12 @@ maintainer="Juan RP " license="LGPL-2.1" homepage="http://nixos.org/nix/" distfiles="http://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz" -checksum=a30a5e801bc1cb1019cbc3456d961a307c45c9c588b8692cf1293ea6588ef01c +checksum=5612ca7a549dd1ee20b208123e041aaa95a414a0e8f650ea88c672dc023d10f6 +pre_configure() { + sed -i '/CFLAGS=/d;/CXXFLAGS=/d' configure.ac + autoreconf -fi +} post_install() { vmkdir etc/nix # Remove unused stuff.