Merge branch 'staging', discussion #8844
This commit is contained in:
@@ -14,6 +14,9 @@ assert x11Support -> (x11 != null && libXrandr != null);
|
||||
assert alsaSupport -> alsaLib != null;
|
||||
assert pulseaudioSupport -> libpulseaudio != null;
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionals;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.2.15";
|
||||
name = "SDL-${version}";
|
||||
@@ -23,19 +26,19 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
# Since `libpulse*.la' contain `-lgdbm', PulseAudio must be propagated.
|
||||
propagatedNativeBuildInputs =
|
||||
stdenv.lib.optionals x11Support [ x11 libXrandr ] ++
|
||||
stdenv.lib.optional alsaSupport alsaLib ++
|
||||
stdenv.lib.optional pulseaudioSupport libpulseaudio;
|
||||
propagatedBuildInputs =
|
||||
optionals x11Support [ x11 libXrandr ] ++
|
||||
optional alsaSupport alsaLib ++
|
||||
optional stdenv.isLinux libcap ++
|
||||
optional openglSupport mesa ++
|
||||
optional pulseaudioSupport libpulseaudio;
|
||||
|
||||
buildInputs = let
|
||||
notMingw = !(stdenv ? cross) || stdenv.cross.libc != "msvcrt";
|
||||
in stdenv.lib.optional stdenv.isLinux libcap
|
||||
++ (stdenv.lib.optional notMingw audiofile);
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ] ++
|
||||
stdenv.lib.optional openglSupport [ mesa ];
|
||||
in optional notMingw audiofile;
|
||||
|
||||
# XXX: By default, SDL wants to dlopen() PulseAudio, in which case
|
||||
# we must arrange to add it to its RPATH; however, `patchelf' seems
|
||||
|
||||
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
stdenv.lib.optional pulseaudioSupport libpulseaudio;
|
||||
|
||||
buildInputs = [ pkgconfig audiofile ] ++
|
||||
stdenv.lib.optional openglSupport [ mesa ] ++
|
||||
stdenv.lib.optional openglSupport mesa ++
|
||||
stdenv.lib.optional alsaSupport alsaLib;
|
||||
|
||||
# https://bugzilla.libsdl.org/show_bug.cgi?id=1431
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
, intltool, dbus_glib, at_spi2_core, libSM }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
versionMajor = "2.12";
|
||||
versionMinor = "1";
|
||||
versionMajor = "2.16";
|
||||
versionMinor = "0";
|
||||
moduleName = "at-spi2-atk";
|
||||
name = "${moduleName}-${versionMajor}.${versionMinor}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz";
|
||||
sha256 = "5fa9c527bdec028e06797563cd52d49bcf06f638549df983424d88db89bb1336";
|
||||
sha256 = "1y9gfz1iz3wpja7s000f0bmyyvc6im5fcdl6bxwbz0v3qdgc9vvq";
|
||||
};
|
||||
|
||||
buildInputs = [ python pkgconfig popt atk libX11 libICE xlibs.libXtst libXi
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
, libX11, xextproto, libSM, libICE, libXtst, libXi, gobjectIntrospection }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
versionMajor = "2.12";
|
||||
versionMajor = "2.16";
|
||||
versionMinor = "0";
|
||||
moduleName = "at-spi2-core";
|
||||
name = "${moduleName}-${versionMajor}.${versionMinor}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${moduleName}/${versionMajor}/${name}.tar.xz";
|
||||
sha256 = "12gvsgdaxnxskndlhlmdkc50cfqgmzfc4n8la9944fz5k3fhwmfv";
|
||||
sha256 = "1l3l39mw23zyjlcqidvkyqlr4gwbhplzw2hcv3qvn6p8ikxpf2qw";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
||||
@@ -32,8 +32,7 @@ stdenv.mkDerivation rec {
|
||||
patches = [ ./blitz-gcc47.patch ./blitz-testsuite-stencil-et.patch ];
|
||||
|
||||
buildInputs = [ pkgconfig gfortran texinfo ]
|
||||
++ optional (boost != null) boost
|
||||
;
|
||||
++ optional (boost != null) [ boost.lib ];
|
||||
|
||||
configureFlags =
|
||||
[ "--enable-shared"
|
||||
|
||||
@@ -27,7 +27,9 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preInstall = ''
|
||||
patchShebangs src/scripts
|
||||
if [ -d src/scripts ]; then
|
||||
patchShebangs src/scripts
|
||||
fi
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, unzip, libtool }:
|
||||
{ fetchurl, stdenv, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "crypto++-5.6.2";
|
||||
@@ -8,45 +8,38 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0x1mqpz1v071cfrw4grbw7z734cxnpry1qh2b6rsmcx6nkyd5gsw";
|
||||
};
|
||||
|
||||
patches = (stdenv.lib.optional (stdenv.system != "i686-cygwin") ./dll.patch)
|
||||
++ (stdenv.lib.optional stdenv.isDarwin ./GNUmakefile.patch);
|
||||
patches = with stdenv;
|
||||
lib.optional (system != "i686-cygwin") ./dll.patch
|
||||
++ lib.optional isDarwin ./GNUmakefile.patch;
|
||||
|
||||
buildInputs = [ unzip libtool ];
|
||||
buildInputs = [ unzip ];
|
||||
|
||||
# Unpack the thing in a subdirectory.
|
||||
unpackPhase = ''
|
||||
echo "unpacking Crypto++ to \`${name}' from \`$PWD'..."
|
||||
mkdir "${name}" && (cd "${name}" && unzip "$src")
|
||||
sourceRoot="$PWD/${name}"
|
||||
'';
|
||||
sourceRoot = ".";
|
||||
|
||||
cxxflags = if stdenv.isi686 then "-march=i686" else
|
||||
if stdenv.isx86_64 then "-march=nocona -fPIC" else
|
||||
"";
|
||||
configurePhase = let
|
||||
marchflags =
|
||||
if stdenv.isi686 then "-march=i686" else
|
||||
if stdenv.isx86_64 then "-march=nocona -mtune=generic" else
|
||||
"";
|
||||
in
|
||||
''
|
||||
sed -i GNUmakefile \
|
||||
-e 's|-march=native|${marchflags} -fPIC|g' \
|
||||
-e 's|-mtune=native||g' \
|
||||
-e '/^CXXFLAGS =/s|-g ||'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
sed -i GNUmakefile \
|
||||
-e 's|-march=native|${cxxflags}|g' \
|
||||
-e 's|-mtune=native||g' \
|
||||
-e '/^CXXFLAGS =/s|-g -O2|-O3|'
|
||||
'';
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# I add what 'enableParallelBuilding' would add to the make call,
|
||||
# if we were using the generic build phase.
|
||||
buildPhase = ''
|
||||
make PREFIX="$out" all libcryptopp.so -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
# TODO: Installing cryptotest.exe doesn't seem to be necessary. We run
|
||||
# that binary during this build anyway to verify everything works.
|
||||
installPhase = ''
|
||||
mkdir "$out"
|
||||
make install PREFIX="$out"
|
||||
'';
|
||||
makeFlags = "PREFIX=$(out)";
|
||||
buildFlags = "libcryptopp.so";
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = "LD_LIBRARY_PATH=`pwd` make test";
|
||||
|
||||
# prefer -fPIC and .so to .a; cryptotest.exe seems superfluous
|
||||
postInstall = ''rm "$out"/lib/*.a -r "$out/bin" '';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Crypto++, a free C++ class library of cryptographic schemes";
|
||||
homepage = http://cryptopp.com/;
|
||||
@@ -55,3 +48,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [
|
||||
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
|
||||
(if compat185 then "--enable-compat185" else "--disable-compat185")
|
||||
"--enable-dbm"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
@@ -7,8 +7,8 @@ assert x11Support -> libX11 != null
|
||||
&& libSM != null;
|
||||
|
||||
let
|
||||
version = "1.8.16";
|
||||
sha256 = "01rba8mp8kqvmy6ibdmi806kjr3m14swnskqk02gyhykxxl54ybz";
|
||||
version = "1.8.18";
|
||||
sha256 = "1wn4k142m68d8yqd4i6dmx1ac0798yhkdnkk4mb72g3sfyffpwin";
|
||||
|
||||
inherit (stdenv) lib;
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
let
|
||||
ver_maj = "2.31";
|
||||
ver_min = "3";
|
||||
ver_min = "4";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gdk-pixbuf-${ver_maj}.${ver_min}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gdk-pixbuf/${ver_maj}/${name}.tar.xz";
|
||||
sha256 = "ddd861747bb7c580acce7cfa3ce38c3f52a9516e66a6477988fd100c8fb9eabc";
|
||||
sha256 = "05bslhk33qpssg66n2wys9khyzwkr4am0b23dym8n67qjds9gng5";
|
||||
};
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
@@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
|
||||
+ stdenv.lib.optionalString (gobjectIntrospection != null) " --enable-introspection=yes"
|
||||
;
|
||||
|
||||
doCheck = true;
|
||||
# Seems to randomly fail sometimes with a bus error. FIXME
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
postInstall = "rm -rf $out/share/gtk-doc";
|
||||
|
||||
|
||||
@@ -1,23 +1,15 @@
|
||||
findGdkPixbufLoaders() {
|
||||
|
||||
if [ -n "$out" ] && [ -z "$IN_NIX_SHELL" ]; then
|
||||
|
||||
# set pixbuf loaders.cache for this package
|
||||
|
||||
local loadersDir="$out/lib/gdk-pixbuf-loaders-2.0/$name"
|
||||
mkdir -p "$loadersDir"
|
||||
|
||||
if [ -f "$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
|
||||
cat "$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" >> "$loadersDir/loaders.cache"
|
||||
# choose the longest loaders.cache
|
||||
local loadersCache="$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
||||
if [ -f "$loadersCache" ]; then
|
||||
if [ -f "$GDK_PIXBUF_MODULE_FILE" ]; then
|
||||
if [ $(cat "$loadersCache"|wc -l) -gt $(cat "$GDK_PIXBUF_MODULE_FILE"|wc -l) ]; then
|
||||
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
|
||||
fi
|
||||
else
|
||||
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
|
||||
fi
|
||||
|
||||
if [ -f "$1/lib/gdk-pixbuf/loaders.cache" ]; then
|
||||
cat "$1/lib/gdk-pixbuf/loaders.cache" >> "$loadersDir/loaders.cache"
|
||||
fi
|
||||
|
||||
# note, this is not a search path
|
||||
export GDK_PIXBUF_MODULE_FILE=$(readlink -e "$loadersDir/loaders.cache")
|
||||
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,12 @@ stdenv.mkDerivation (rec {
|
||||
"--with-included-gettext"
|
||||
"--with-included-glib"
|
||||
"--with-included-libcroco"
|
||||
]);
|
||||
])
|
||||
# avoid retaining reference to CF during stdenv bootstrap
|
||||
++ (stdenv.lib.optionals stdenv.isDarwin [
|
||||
"gt_cv_func_CFPreferencesCopyAppValue=no"
|
||||
"gt_cv_func_CFLocaleCopyCurrent=no"
|
||||
]);
|
||||
|
||||
# On cross building, gettext supposes that the wchar.h from libc
|
||||
# does not fulfill gettext needs, so it tries to work with its
|
||||
|
||||
@@ -40,7 +40,7 @@ let
|
||||
'';
|
||||
|
||||
ver_maj = "2.44";
|
||||
ver_min = "0";
|
||||
ver_min = "1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/glib/${ver_maj}/${name}.tar.xz";
|
||||
sha256 = "1fgmjv3yzxgbks31h42201x2izpw0sd84h8dfw0si3x00sqn5lzj";
|
||||
sha256 = "01yabrfp64i11mrks3p1gcks99lw0zm7f5vhkc53sl4amyndw4c8";
|
||||
};
|
||||
|
||||
patches = optional stdenv.isDarwin ./darwin-compilation.patch ++ optional doCheck ./skip-timer-test.patch;
|
||||
|
||||
@@ -11,6 +11,12 @@ make_glib_find_gsettings_schemas() {
|
||||
envHooks+=(make_glib_find_gsettings_schemas)
|
||||
|
||||
glibPreFixupPhase() {
|
||||
# Move gschemas in case the install flag didn't help
|
||||
if [ -d "$out/share/glib-2.0/schemas" ]; then
|
||||
mkdir -p "$out/share/gsettings-schemas/$name/glib-2.0"
|
||||
mv "$out/share/glib-2.0/schemas" "$out/share/gsettings-schemas/$name/glib-2.0/"
|
||||
fi
|
||||
|
||||
addToSearchPath GSETTINGS_SCHEMAS_PATH "$out/share/gsettings-schemas/$name"
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
|
||||
then "ln -sf configfsf.guess config.guess"
|
||||
else ''echo "Darwin host is `./config.guess`."'';
|
||||
|
||||
configureFlags = if cxx then "--enable-cxx" else "--disable-cxx";
|
||||
configureFlags = (if cxx then "--enable-cxx" else "--disable-cxx") +
|
||||
stdenv.lib.optionalString stdenv.isDarwin " ac_cv_build=x86_64-apple-darwin13.4.0 ac_cv_host=x86_64-apple-darwin13.4.0";
|
||||
|
||||
# The test t-lucnum_ui fails (on Linux/x86_64) when built with GCC 4.8.
|
||||
# Newer versions of GMP don't have that issue anymore.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }:
|
||||
|
||||
with { inherit (stdenv.lib) optional; };
|
||||
with { inherit (stdenv.lib) optional optionalString; };
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gmp-5.1.3";
|
||||
@@ -28,6 +28,13 @@ stdenv.mkDerivation rec {
|
||||
++ optional stdenv.is64bit "--with-pic"
|
||||
;
|
||||
|
||||
# The config.guess in GMP tries to runtime-detect various
|
||||
# ARM optimization flags via /proc/cpuinfo (and is also
|
||||
# broken on multicore CPUs). Avoid this impurity.
|
||||
preConfigure = optionalString stdenv.isArm ''
|
||||
configureFlagsArray+=("--build=$(./configfsf.guess)")
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
dontDisableStatic = withStatic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, m4, cxx ? true, withStatic ? true }:
|
||||
|
||||
with { inherit (stdenv.lib) optional; };
|
||||
with { inherit (stdenv.lib) optional optionalString; };
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gmp-6.0.0a";
|
||||
@@ -26,6 +26,13 @@ stdenv.mkDerivation rec {
|
||||
++ optional stdenv.is64bit "--with-pic"
|
||||
;
|
||||
|
||||
# The config.guess in GMP tries to runtime-detect various
|
||||
# ARM optimization flags via /proc/cpuinfo (and is also
|
||||
# broken on multicore CPUs). Avoid this impurity.
|
||||
preConfigure = optionalString stdenv.isArm ''
|
||||
configureFlagsArray+=("--build=$(./configfsf.guess)")
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
dontDisableStatic = withStatic;
|
||||
|
||||
@@ -7,15 +7,21 @@
|
||||
|
||||
assert guileBindings -> guile != null;
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optional optionals optionalString;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gnutls-${version}";
|
||||
|
||||
inherit src patches;
|
||||
|
||||
configureFlags = [
|
||||
configureFlags =
|
||||
# FIXME: perhaps use $SSL_CERT_FILE instead
|
||||
optional stdenv.isLinux "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
|
||||
++ [
|
||||
"--disable-dependency-tracking"
|
||||
"--enable-fast-install"
|
||||
] ++ stdenv.lib.optional guileBindings
|
||||
] ++ optionals guileBindings
|
||||
[ "--enable-guile" "--with-guile-site-dir=\${out}/share/guile/site" ];
|
||||
|
||||
# Build of the Guile bindings is not parallel-safe. See
|
||||
@@ -24,9 +30,9 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = !guileBindings;
|
||||
|
||||
buildInputs = [ lzo lzip nettle libtasn1 libidn p11_kit zlib gmp ]
|
||||
++ stdenv.lib.optional stdenv.isLinux trousers
|
||||
++ optional stdenv.isLinux trousers
|
||||
++ [ unbound ]
|
||||
++ stdenv.lib.optional guileBindings guile;
|
||||
++ optional guileBindings guile;
|
||||
|
||||
nativeBuildInputs = [ perl pkgconfig autoreconfHook ];
|
||||
|
||||
@@ -35,7 +41,7 @@ stdenv.mkDerivation rec {
|
||||
doCheck = (!stdenv.isFreeBSD && !stdenv.isDarwin);
|
||||
|
||||
# Fixup broken libtool and pkgconfig files
|
||||
preFixup = stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
preFixup = optionalString (!stdenv.isDarwin) ''
|
||||
sed -e 's,-ltspi,-L${trousers}/lib -ltspi,' \
|
||||
-e 's,-lz,-L${zlib}/lib -lz,' \
|
||||
-e 's,-lgmp,-L${gmp}/lib -lgmp,' \
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# In that case its about 6MB which could be separated
|
||||
|
||||
let
|
||||
ver_maj = "1.42";
|
||||
ver_maj = "1.44";
|
||||
ver_min = "0";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gobject-introspection/${ver_maj}/${name}.tar.xz";
|
||||
sha256 = "3ba2edfad4f71d4f0de16960b5d5f2511335fa646b2c49bbb93ce5942b3f95f7";
|
||||
sha256 = "1b972qg2yb51sdavfvb6kc19akwc15c1bwnbg81vadxamql2q33g";
|
||||
};
|
||||
|
||||
buildInputs = [ flex bison pkgconfig python ]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv }:
|
||||
{ fetchurl, fetchpatch, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gsl-1.16";
|
||||
@@ -8,9 +8,16 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0lrgipi0z6559jqh82yx8n4xgnxkhzj46v96dl77hahdp58jzg3k";
|
||||
};
|
||||
|
||||
# ToDo: there might be more impurities than FMA support check
|
||||
patches = [ ./disable-fma.patch ]; # http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
|
||||
patchFlags = "-p0";
|
||||
patches = [
|
||||
# ToDo: there might be more impurities than FMA support check
|
||||
./disable-fma.patch # http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
|
||||
|
||||
(fetchpatch {
|
||||
name = "bug-39055.patch";
|
||||
url = "http://git.savannah.gnu.org/cgit/gsl.git/patch/?id=9cc12d0377";
|
||||
sha256 = "1bmrmihi28cly9g9pq54kkix2jy59y7cd7h5fw4v1c7h5rc2qvs8";
|
||||
})
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--- configure.ac 2011-09-22 16:13:22 +0000
|
||||
+++ configure.ac 2011-11-26 23:55:24 +0000
|
||||
--- a/configure.ac 2011-09-22 16:13:22 +0000
|
||||
+++ b/configure.ac 2011-11-26 23:55:24 +0000
|
||||
@@ -381,6 +381,28 @@
|
||||
AC_SUBST(HAVE_DARWIN_IEEE_INTERFACE)
|
||||
AC_SUBST(HAVE_DARWIN86_IEEE_INTERFACE)
|
||||
|
||||
@@ -18,9 +18,10 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
|
||||
sed -i 's@/bin/echo@echo@g' configure
|
||||
sed -i -e 's/^ /\t/' docs/{libs,plugins}/Makefile.in
|
||||
|
||||
patch -p1 < ${./gcc-4.9.patch}
|
||||
'';
|
||||
|
||||
# TODO : v4l, libvisual
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=670690
|
||||
|
||||
From 9bd5a7ae5435469c3557a3d70e762791cb3dc5c7 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@gnome.org>
|
||||
Date: Mon, 20 Jan 2014 15:44:09 +0100
|
||||
Subject: [PATCH] audioresample: fix build on BSD
|
||||
|
||||
On i386, EMMINTRIN is defined but not usable without sse so check for
|
||||
__SSE__ and __SSE2__ as well.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=670690
|
||||
---
|
||||
gst/audioresample/resample.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
|
||||
index 98d006c..481fa01 100644
|
||||
--- a/gst/audioresample/resample.c
|
||||
+++ b/gst/audioresample/resample.c
|
||||
@@ -77,13 +77,13 @@
|
||||
#define EXPORT G_GNUC_INTERNAL
|
||||
|
||||
#ifdef _USE_SSE
|
||||
-#ifndef HAVE_XMMINTRIN_H
|
||||
+#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H)
|
||||
#undef _USE_SSE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _USE_SSE2
|
||||
-#ifndef HAVE_EMMINTRIN_H
|
||||
+#if !defined(__SSE2__) || !defined(HAVE_XMMINTRIN_H)
|
||||
#undef _USE_SSE2
|
||||
#endif
|
||||
#endif
|
||||
--
|
||||
1.8.5.3
|
||||
|
||||
@@ -8,11 +8,11 @@ assert xineramaSupport -> xlibs.libXinerama != null;
|
||||
assert cupsSupport -> cups != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gtk+-2.24.27";
|
||||
name = "gtk+-2.24.28";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gtk+/2.24/${name}.tar.xz";
|
||||
sha256 = "1x14rnjvqslpa1q19fp1qalz5sxds72amsgjk8m7769rwk511jr0";
|
||||
sha256 = "0mj6xn40py9r9lvzg633fal81xfwfm89d9mvz7jk4lmwk0g49imj";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -10,7 +10,7 @@ assert cupsSupport -> cups != null;
|
||||
|
||||
let
|
||||
ver_maj = "3.16";
|
||||
ver_min = "2";
|
||||
ver_min = "5";
|
||||
version = "${ver_maj}.${ver_min}";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz";
|
||||
sha256 = "1yhwg2l72l3khfkprydcjlpxjrg11ccqfc80sjl56llz3jk66fd0";
|
||||
sha256 = "0cdwykh4086f7fl4dkybgpyxyb1jcmxbfin2az42z5pb4z8rjz5q";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ];
|
||||
|
||||
@@ -32,6 +32,11 @@ stdenv.mkDerivation {
|
||||
configureFlags = "--disable-debug" +
|
||||
stdenv.lib.optionalString stdenv.isDarwin " --enable-rpath";
|
||||
|
||||
# remove dependency on bootstrap-tools in early stdenv build
|
||||
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's/INSTALL_CMD=.*install/INSTALL_CMD=install/' $out/lib/icu/${version}/pkgdata.inc
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
{ stdenv, fetchurl, gmp }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "isl-0.14";
|
||||
name = "isl-0.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://isl.gforge.inria.fr/${name}.tar.bz2";
|
||||
sha256 = "0dlg4b85nw4w534525h0fvb7yhb8i4am8kskhmm0ym7qabzh4g3y";
|
||||
url = "http://isl.gforge.inria.fr/${name}.tar.xz";
|
||||
sha256 = "1m922l5bz69lvkcxrib7lvjqwfqsr8rpbzgmb2aq07bp76460jhh";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
homepage = http://www.kotnet.org/~skimo/isl/;
|
||||
license = stdenv.lib.licenses.lgpl21;
|
||||
@@ -20,23 +20,25 @@ stdenv.mkDerivation rec {
|
||||
export sourceRoot=${src.name}
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
# cmake can be built with the system jsoncpp, or its own bundled version.
|
||||
# Obviously we cannot build it against the system jsoncpp that doesn't yet exist, so
|
||||
# we make a bootstrapping build with the bundled version.
|
||||
(cmake.override { jsoncpp = null; })
|
||||
python
|
||||
];
|
||||
# Hack to be able to run the test, broken because we use
|
||||
# CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install
|
||||
preBuild = ''
|
||||
export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake python ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DJSONCPP_WITH_CMAKE_PACKAGE=1"
|
||||
"-DJSONCPP_LIB_BUILD_SHARED=ON"
|
||||
"-DJSONCPP_LIB_BUILD_STATIC=OFF"
|
||||
"-DJSONCPP_WITH_CMAKE_PACKAGE=ON"
|
||||
];
|
||||
|
||||
meta = {
|
||||
inherit version;
|
||||
homepage = https://github.com/open-source-parsers/jsoncpp;
|
||||
description = "A simple API to manipulate JSON data in C++";
|
||||
maintainers = with stdenv.lib.maintainers; [ ttuegel ];
|
||||
maintainers = with stdenv.lib.maintainers; [ ttuegel page ];
|
||||
license = stdenv.lib.licenses.mit;
|
||||
branch = "1.6";
|
||||
};
|
||||
|
||||
@@ -1,54 +1,83 @@
|
||||
{ stdenv, fetchurl, pkgconfig, flex, yacc, readline, openldap, libcap_ng
|
||||
, sqlite, db, ncurses, openssl, cyrus_sasl
|
||||
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, python, perl, yacc, flex
|
||||
, texinfo, perlPackages
|
||||
, openldap, libcap_ng, sqlite, openssl, db, libedit, pam
|
||||
|
||||
# Extra Args
|
||||
, type ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
libOnly = type == "lib";
|
||||
in
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "heimdal-1.5.3";
|
||||
name = "${type}heimdal-2015-06-17";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://www.h5l.org/dist/src/${name}.tar.gz"
|
||||
"http://ftp.pdc.kth.se/pub/heimdal/src/${name}.tar.gz"
|
||||
];
|
||||
sha256 = "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma";
|
||||
src = fetchFromGitHub {
|
||||
owner = "heimdal";
|
||||
repo = "heimdal";
|
||||
rev = "be63a2914adcbea7d42d56e674ee6edb4883ebaf";
|
||||
sha256 = "147gv49gmy94y6f0x1vx523qni0frgcp3r7fill0r06rkfgfzc0j";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex ]
|
||||
++ (with perlPackages; [ JSON ])
|
||||
++ optional (!libOnly) texinfo;
|
||||
buildInputs = [ libcap_ng sqlite openssl db libedit ]
|
||||
++ optionals (!libOnly) [ openldap pam ];
|
||||
|
||||
## ugly, X should be made an option
|
||||
configureFlags = [
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"--enable-hdb-openldap-module"
|
||||
"--with-capng"
|
||||
"--with-openldap=${openldap}"
|
||||
"--with-sqlite3=${sqlite}"
|
||||
"--with-openssl-lib=${openssl}/lib"
|
||||
"--with-berkeley-db=${db}"
|
||||
"--with-libedit=${libedit}"
|
||||
"--with-openssl=${openssl}"
|
||||
"--without-x"
|
||||
] ++ optionals (!libOnly) [
|
||||
"--with-openldap=${openldap}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -pthread"
|
||||
buildPhase = optionalString libOnly ''
|
||||
(cd include; make -j $NIX_BUILD_CORES)
|
||||
(cd lib; make -j $NIX_BUILD_CORES)
|
||||
(cd tools; make -j $NIX_BUILD_CORES)
|
||||
(cd include/hcrypto; make -j $NIX_BUILD_CORES)
|
||||
(cd lib/hcrypto; make -j $NIX_BUILD_CORES)
|
||||
'';
|
||||
|
||||
installPhase = optionalString libOnly ''
|
||||
(cd include; make -j $NIX_BUILD_CORES install)
|
||||
(cd lib; make -j $NIX_BUILD_CORES install)
|
||||
(cd tools; make -j $NIX_BUILD_CORES install)
|
||||
(cd include/hcrypto; make -j $NIX_BUILD_CORES install)
|
||||
(cd lib/hcrypto; make -j $NIX_BUILD_CORES install)
|
||||
rm -rf $out/{libexec,sbin,share}
|
||||
find $out/bin -type f | grep -v 'krb5-config' | xargs rm
|
||||
'';
|
||||
|
||||
# We need to build hcrypt for applications like samba
|
||||
postBuild = ''
|
||||
(cd lib/hcrypto; make)
|
||||
(cd include/hcrypto; make)
|
||||
(cd include/hcrypto; make -j $NIX_BUILD_CORES)
|
||||
(cd lib/hcrypto; make -j $NIX_BUILD_CORES)
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Install hcrypto
|
||||
(cd lib/hcrypto; make install)
|
||||
(cd include/hcrypto; make install)
|
||||
(cd include/hcrypto; make -j $NIX_BUILD_CORES install)
|
||||
(cd lib/hcrypto; make -j $NIX_BUILD_CORES install)
|
||||
|
||||
# dont succeed with --libexec=$out/sbin, so
|
||||
# Doesn't succeed with --libexec=$out/sbin, so
|
||||
mv "$out/libexec/"* $out/sbin/
|
||||
rmdir $out/libexec
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig flex yacc readline openldap libcap_ng sqlite db ncurses
|
||||
cyrus_sasl openssl
|
||||
];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = {
|
||||
description = "an implementation of Kerberos 5 (and some more stuff) largely written in Sweden";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
|
||||
@@ -1,41 +1,61 @@
|
||||
{ stdenv, fetchurl, pkgconfig, perl, ncurses, yacc, openssl, openldap, bootstrap_cmds }:
|
||||
{ stdenv, fetchurl, pkgconfig, perl, yacc, bootstrap_cmds
|
||||
, openssl, openldap, libedit
|
||||
|
||||
# Extra Arguments
|
||||
, type ? ""
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "krb5";
|
||||
version = "1.13.1";
|
||||
name = "${pname}-${version}";
|
||||
webpage = http://web.mit.edu/kerberos/;
|
||||
libOnly = type == "lib";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
inherit name;
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${type}krb5-${version}";
|
||||
version = "1.13.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "${webpage}dist/krb5/1.13/${name}-signed.tar";
|
||||
sha256 = "0gk6jvr64rf6l4xcyxn8i3fr5d1j7dhqvwyv3vw2qdkzz7yjkxjd";
|
||||
url = "${meta.homepage}dist/krb5/1.13/krb5-${version}-signed.tar";
|
||||
sha256 = "1qbdzyrws7d0q4filsibh28z54pd5l987jr0ygv43iq9085w6a75";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig perl ncurses yacc openssl openldap ]
|
||||
nativeBuildInputs = [ pkgconfig perl yacc ]
|
||||
# Provides the mig command used by the build scripts
|
||||
++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds ;
|
||||
++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds;
|
||||
buildInputs = [ openssl ]
|
||||
++ optionals (!libOnly) [ openldap libedit ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar -xf $src
|
||||
tar -xzf ${name}.tar.gz
|
||||
cd ${name}/src
|
||||
tar -xzf krb5-${version}.tar.gz
|
||||
cd krb5-${version}/src
|
||||
'';
|
||||
|
||||
configureFlags = [ "--with-tcl=no" ];
|
||||
buildPhase = optionalString libOnly ''
|
||||
(cd util; make -j $NIX_BUILD_CORES)
|
||||
(cd include; make -j $NIX_BUILD_CORES)
|
||||
(cd lib; make -j $NIX_BUILD_CORES)
|
||||
(cd build-tools; make -j $NIX_BUILD_CORES)
|
||||
'';
|
||||
|
||||
installPhase = optionalString libOnly ''
|
||||
mkdir -p $out/{bin,include/{gssapi,gssrpc,kadm5,krb5},lib/pkgconfig,sbin,share/{et,man/man1}}
|
||||
(cd util; make -j $NIX_BUILD_CORES install)
|
||||
(cd include; make -j $NIX_BUILD_CORES install)
|
||||
(cd lib; make -j $NIX_BUILD_CORES install)
|
||||
(cd build-tools; make -j $NIX_BUILD_CORES install)
|
||||
rm -rf $out/{sbin,share}
|
||||
find $out/bin -type f | grep -v 'krb5-config' | xargs rm
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = {
|
||||
description = "MIT Kerberos 5";
|
||||
homepage = webpage;
|
||||
license = "MPL";
|
||||
homepage = http://web.mit.edu/kerberos/;
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ wkennington ];
|
||||
};
|
||||
|
||||
passthru.implementation = "krb5";
|
||||
})
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1zr3kadv35ii6liia0bpfgxpag27xcivp571ybckpbz4b10nnd14";
|
||||
};
|
||||
|
||||
patches = [ ./gcc-4.9.patch ];
|
||||
|
||||
nativeBuildInputs = [ ]
|
||||
++ optional nasmSupport nasm;
|
||||
|
||||
|
||||
33
pkgs/development/libraries/lame/gcc-4.9.patch
Normal file
33
pkgs/development/libraries/lame/gcc-4.9.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
fix sse optimizations build on 32-bit with gcc 4.9
|
||||
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=351af417bae0d09bd5a3753d1237f03adf591933
|
||||
|
||||
xmm_quantize_sub.c: In function 'init_xrpow_core_sse':
|
||||
xmm_quantize_sub.c:65:18: warning: SSE vector return without SSE enabled changes the ABI [-W
|
||||
psabi]
|
||||
const __m128 vec_fabs_mask = _mm_loadu_ps(&fabs_mask._float[0]);
|
||||
^
|
||||
In file included from xmm_quantize_sub.c:37:0:
|
||||
/usr/lib/gcc/i686-w64-mingw32/4.9.0/include/xmmintrin.h:933:1: error: inlining failed in call to always_inline '_mm_loadu_ps': target specific option mismatch
|
||||
_mm_loadu_ps (float const *__P)
|
||||
^
|
||||
xmm_quantize_sub.c:65:18: error: called from here
|
||||
const __m128 vec_fabs_mask = _mm_loadu_ps(&fabs_mask._float[0]);
|
||||
^
|
||||
--- lame/libmp3lame/vector/xmm_quantize_sub.c.orig 2014-06-08 12:16:19.455468042 -0700
|
||||
+++ lame/libmp3lame/vector/xmm_quantize_sub.c 2014-06-08 12:16:09.592356980 -0700
|
||||
@@ -35,6 +35,7 @@
|
||||
#ifdef HAVE_XMMINTRIN_H
|
||||
|
||||
#include <xmmintrin.h>
|
||||
+#pragma GCC target("sse")
|
||||
|
||||
typedef union {
|
||||
int32_t _i_32[4]; /* unions are initialized by its first member */
|
||||
@@ -124,6 +125,7 @@
|
||||
}
|
||||
|
||||
|
||||
+#pragma GCC target("sse2")
|
||||
void
|
||||
fht_SSE2(FLOAT * fz, int n)
|
||||
{
|
||||
143
pkgs/development/libraries/libarchive/CVE-2015-1197.patch
Normal file
143
pkgs/development/libraries/libarchive/CVE-2015-1197.patch
Normal file
@@ -0,0 +1,143 @@
|
||||
From 59357157706d47c365b2227739e17daba3607526 Mon Sep 17 00:00:00 2001
|
||||
From: Alessandro Ghedini <alessandro@ghedini.me>
|
||||
Date: Sun, 1 Mar 2015 12:07:45 +0100
|
||||
Subject: [PATCH] Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
|
||||
|
||||
This fixes a directory traversal in the cpio tool.
|
||||
---
|
||||
cpio/bsdcpio.1 | 3 ++-
|
||||
cpio/cpio.c | 2 ++
|
||||
libarchive/archive.h | 2 ++
|
||||
libarchive/archive_write_disk.3 | 3 +++
|
||||
libarchive/archive_write_disk_posix.c | 14 +++++++++++---
|
||||
libarchive/test/test_write_disk_secure.c | 23 +++++++++++++++++++++++
|
||||
6 files changed, 43 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cpio/bsdcpio.1 b/cpio/bsdcpio.1
|
||||
index f966aa0..e52546e 100644
|
||||
--- a/cpio/bsdcpio.1
|
||||
+++ b/cpio/bsdcpio.1
|
||||
@@ -156,7 +156,8 @@ See above for description.
|
||||
.It Fl Fl insecure
|
||||
(i and p mode only)
|
||||
Disable security checks during extraction or copying.
|
||||
-This allows extraction via symbolic links and path names containing
|
||||
+This allows extraction via symbolic links, absolute paths,
|
||||
+and path names containing
|
||||
.Sq ..
|
||||
in the name.
|
||||
.It Fl J , Fl Fl xz
|
||||
diff --git a/cpio/cpio.c b/cpio/cpio.c
|
||||
index 0acde11..b267e9b 100644
|
||||
--- a/cpio/cpio.c
|
||||
+++ b/cpio/cpio.c
|
||||
@@ -171,6 +171,7 @@ main(int argc, char *argv[])
|
||||
cpio->extract_flags |= ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER;
|
||||
cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS;
|
||||
cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT;
|
||||
+ cpio->extract_flags |= ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
|
||||
cpio->extract_flags |= ARCHIVE_EXTRACT_PERM;
|
||||
cpio->extract_flags |= ARCHIVE_EXTRACT_FFLAGS;
|
||||
cpio->extract_flags |= ARCHIVE_EXTRACT_ACL;
|
||||
@@ -256,6 +257,7 @@ main(int argc, char *argv[])
|
||||
case OPTION_INSECURE:
|
||||
cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_SYMLINKS;
|
||||
cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT;
|
||||
+ cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS;
|
||||
break;
|
||||
case 'L': /* GNU cpio */
|
||||
cpio->option_follow_links = 1;
|
||||
diff --git a/libarchive/archive.h b/libarchive/archive.h
|
||||
index 1f0fc38..ef635ac 100644
|
||||
--- a/libarchive/archive.h
|
||||
+++ b/libarchive/archive.h
|
||||
@@ -649,6 +649,8 @@ __LA_DECL int archive_read_set_passphrase_callback(struct archive *,
|
||||
/* Default: Do not use HFS+ compression if it was not compressed. */
|
||||
/* This has no effect except on Mac OS v10.6 or later. */
|
||||
#define ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED (0x8000)
|
||||
+/* Default: Do not reject entries with absolute paths */
|
||||
+#define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000)
|
||||
|
||||
__LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
|
||||
int flags);
|
||||
diff --git a/libarchive/archive_write_disk.3 b/libarchive/archive_write_disk.3
|
||||
index fa925cc..a2e7afa 100644
|
||||
--- a/libarchive/archive_write_disk.3
|
||||
+++ b/libarchive/archive_write_disk.3
|
||||
@@ -177,6 +177,9 @@ The default is to not refuse such paths.
|
||||
Note that paths ending in
|
||||
.Pa ..
|
||||
always cause an error, regardless of this flag.
|
||||
+.It Cm ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
|
||||
+Refuse to extract an absolute path.
|
||||
+The default is to not refuse such paths.
|
||||
.It Cm ARCHIVE_EXTRACT_SPARSE
|
||||
Scan data for blocks of NUL bytes and try to recreate them with holes.
|
||||
This results in sparse files, independent of whether the archive format
|
||||
diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
|
||||
index ab3bdac..c1290eb 100644
|
||||
--- a/libarchive/archive_write_disk_posix.c
|
||||
+++ b/libarchive/archive_write_disk_posix.c
|
||||
@@ -2509,8 +2509,9 @@ cleanup_pathname_win(struct archive_write_disk *a)
|
||||
/*
|
||||
* Canonicalize the pathname. In particular, this strips duplicate
|
||||
* '/' characters, '.' elements, and trailing '/'. It also raises an
|
||||
- * error for an empty path, a trailing '..' or (if _SECURE_NODOTDOT is
|
||||
- * set) any '..' in the path.
|
||||
+ * error for an empty path, a trailing '..', (if _SECURE_NODOTDOT is
|
||||
+ * set) any '..' in the path or (if ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS
|
||||
+ * is set) if the path is absolute.
|
||||
*/
|
||||
static int
|
||||
cleanup_pathname(struct archive_write_disk *a)
|
||||
@@ -2529,8 +2530,15 @@ cleanup_pathname(struct archive_write_disk *a)
|
||||
cleanup_pathname_win(a);
|
||||
#endif
|
||||
/* Skip leading '/'. */
|
||||
- if (*src == '/')
|
||||
+ if (*src == '/') {
|
||||
+ if (a->flags & ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS) {
|
||||
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
|
||||
+ "Path is absolute");
|
||||
+ return (ARCHIVE_FAILED);
|
||||
+ }
|
||||
+
|
||||
separator = *src++;
|
||||
+ }
|
||||
|
||||
/* Scan the pathname one element at a time. */
|
||||
for (;;) {
|
||||
diff --git a/libarchive/test/test_write_disk_secure.c b/libarchive/test/test_write_disk_secure.c
|
||||
index 31c5bfd..2c94206 100644
|
||||
--- a/libarchive/test/test_write_disk_secure.c
|
||||
+++ b/libarchive/test/test_write_disk_secure.c
|
||||
@@ -178,6 +178,29 @@ DEFINE_TEST(test_write_disk_secure)
|
||||
assert(S_ISDIR(st.st_mode));
|
||||
archive_entry_free(ae);
|
||||
|
||||
+ /*
|
||||
+ * Without security checks, we should be able to
|
||||
+ * extract an absolute path.
|
||||
+ */
|
||||
+ assert((ae = archive_entry_new()) != NULL);
|
||||
+ archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
|
||||
+ archive_entry_set_mode(ae, S_IFREG | 0777);
|
||||
+ assert(0 == archive_write_header(a, ae));
|
||||
+ assert(0 == archive_write_finish_entry(a));
|
||||
+ assertFileExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
|
||||
+ assert(0 == unlink("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp"));
|
||||
+
|
||||
+ /* But with security checks enabled, this should fail. */
|
||||
+ assert(archive_entry_clear(ae) != NULL);
|
||||
+ archive_entry_copy_pathname(ae, "/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
|
||||
+ archive_entry_set_mode(ae, S_IFREG | 0777);
|
||||
+ archive_write_disk_set_options(a, ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS);
|
||||
+ failure("Extracting an absolute path should fail here.");
|
||||
+ assertEqualInt(ARCHIVE_FAILED, archive_write_header(a, ae));
|
||||
+ archive_entry_free(ae);
|
||||
+ assert(0 == archive_write_finish_entry(a));
|
||||
+ assertFileNotExists("/tmp/libarchive_test-test_write_disk_secure-absolute_path.tmp");
|
||||
+
|
||||
assertEqualInt(ARCHIVE_OK, archive_write_free(a));
|
||||
|
||||
/* Test the entries on disk. */
|
||||
@@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./CVE-2013-0211.patch # https://github.com/libarchive/libarchive/commit/22531545
|
||||
./CVE-2015-1197.patch # https://github.com/NixOS/nixpkgs/issues/6799
|
||||
];
|
||||
|
||||
buildInputs = [ sharutils libxml2 zlib bzip2 openssl xz ] ++
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{ stdenv, fetchsvn, python, llvm, clang }:
|
||||
{ stdenv, fetchFromGitHub, python, llvm, clang }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libclc-2015-03-27";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "http://llvm.org/svn/llvm-project/libclc/trunk";
|
||||
rev = "233456";
|
||||
sha256 = "0g56kgffc1qr9rzhcjr4w8kljcicg0q828s9b4bmfzjvywd7hhr0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "llvm-mirror";
|
||||
repo = "libclc";
|
||||
rev = "0a2d1619921545b52303be5608b64dc46f381e97";
|
||||
sha256 = "0hgm013c0vlfqfbbf4cdajl01hhk1mhsfk4h4bfza1san97l0vcc";
|
||||
};
|
||||
|
||||
buildInputs = [ python llvm clang ];
|
||||
@@ -22,7 +23,7 @@ stdenv.mkDerivation {
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://libclc.llvm.org/;
|
||||
description = "implementation of the library requirements of the OpenCL C programming language";
|
||||
description = "Implementation of the library requirements of the OpenCL C programming language";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ wkennington ];
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, udev }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libdrm-2.4.60";
|
||||
name = "libdrm-2.4.61";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
|
||||
sha256 = "12cqnmssi6mbr93n29mm84k8wix5nx6zs82k7wcmj7z3r335ymwr";
|
||||
sha256 = "8b549092c8961a393a7e1d9a1bccddcea8e2af67c0d7d7c67babb9fc3b47699c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
] else null;
|
||||
|
||||
postInstall = ''
|
||||
sed -i ${stdenv.lib.optionalString (stdenv.isDarwin && stdenv.cc.nativeTools) "''"} s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
|
||||
sed -i s/-lncurses/-lncursesw/g $out/lib/pkgconfig/libedit.pc
|
||||
'';
|
||||
|
||||
configureFlags = [ "--enable-widec" ];
|
||||
|
||||
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1jyw7qbl0spxqa0dccj9x1jsw7cj7szff43cq4acmklnra4mzz48";
|
||||
};
|
||||
|
||||
patches = [ ./noreturn.patch ];
|
||||
|
||||
# Version 4.19 is not valid C11 (which Clang default to)
|
||||
# Check if this is still necessary on upgrade
|
||||
NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=c99" else null;
|
||||
|
||||
13
pkgs/development/libraries/libev/noreturn.patch
Normal file
13
pkgs/development/libraries/libev/noreturn.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/ev.c b/ev.c
|
||||
index 6f36c6d..b8a1c5f 100644
|
||||
--- a/ev.c
|
||||
+++ b/ev.c
|
||||
@@ -1026,7 +1026,7 @@ ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (
|
||||
#define ecb_unreachable() __builtin_unreachable ()
|
||||
#else
|
||||
/* this seems to work fine, but gcc always emits a warning for it :/ */
|
||||
- ecb_inline void ecb_unreachable (void) ecb_noreturn;
|
||||
+ ecb_inline ecb_noreturn void ecb_unreachable (void);
|
||||
ecb_inline void ecb_unreachable (void) { }
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchurl, stdenv, dejagnu }:
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libffi-3.2.1";
|
||||
@@ -10,15 +10,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = if stdenv.isCygwin then [ ./3.2.1-cygwin.patch ] else null;
|
||||
|
||||
buildInputs = stdenv.lib.optional doCheck dejagnu;
|
||||
|
||||
configureFlags = [
|
||||
"--with-gcc-arch=generic" # no detection of -march= or -mtune=
|
||||
"--enable-pax_emutramp"
|
||||
];
|
||||
|
||||
doCheck = stdenv.isLinux; # until we solve dejagnu problems on darwin and expect on BSD
|
||||
|
||||
dontStrip = stdenv ? cross; # Don't run the native `strip' when cross-compiling.
|
||||
|
||||
# Install headers in the right place.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libidn-1.30";
|
||||
name = "libidn-1.31";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/libidn/${name}.tar.gz";
|
||||
sha256 = "0lxh5r1z8gsk4jxx3rv8aasjv8p53j4y04kvfn2w30a0syagrf9r";
|
||||
sha256 = "026z12mczlag443ms9n954h36pi3m7iva9jfw8y4ispsj772zpxg";
|
||||
};
|
||||
|
||||
doCheck = ! stdenv.isDarwin;
|
||||
|
||||
@@ -17,7 +17,6 @@ stdenv.mkDerivation (rec {
|
||||
maintainers = [ stdenv.lib.maintainers.urkud ];
|
||||
};
|
||||
} // stdenv.lib.optionalAttrs (!stdenv.isLinux) {
|
||||
NIX_CFLAGS_COMPILE = "-I${libiconv}/include";
|
||||
|
||||
NIX_CFLAGS_LINK = "-L${libiconv}/lib -liconv";
|
||||
NIX_LDFLAGS = "-liconv";
|
||||
propagatedBuildInputs = [ libiconv ];
|
||||
})
|
||||
|
||||
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||
# The loaders.cache can be used by setting GDK_PIXBUF_MODULE_FILE to
|
||||
# point to this file in a wrapper.
|
||||
postConfigure = ''
|
||||
GDK_PIXBUF=$out/lib/gdk-pixbuf
|
||||
GDK_PIXBUF=$out/lib/gdk-pixbuf-2.0/2.10.0
|
||||
mkdir -p $GDK_PIXBUF/loaders
|
||||
sed -e "s#gdk_pixbuf_moduledir = .*#gdk_pixbuf_moduledir = $GDK_PIXBUF/loaders#" \
|
||||
-i gdk-pixbuf-loader/Makefile
|
||||
@@ -43,4 +43,11 @@ stdenv.mkDerivation rec {
|
||||
sed -e "s#\$(GDK_PIXBUF_QUERYLOADERS)#GDK_PIXBUF_MODULEDIR=$GDK_PIXBUF/loaders \$(GDK_PIXBUF_QUERYLOADERS)#" \
|
||||
-i gdk-pixbuf-loader/Makefile
|
||||
'';
|
||||
|
||||
# Merge gdkpixbuf and librsvg loaders
|
||||
postInstall = ''
|
||||
mv $GDK_PIXBUF/loaders.cache $GDK_PIXBUF/loaders.cache.tmp
|
||||
cat ${gdk_pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $GDK_PIXBUF/loaders.cache.tmp > $GDK_PIXBUF/loaders.cache
|
||||
rm $GDK_PIXBUF/loaders.cache.tmp
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
{ stdenv, fetchurl, fetchsvn, pkgconfig, zlib, libjpeg, xz }:
|
||||
{ stdenv, fetchurl, pkgconfig, zlib, libjpeg, xz }:
|
||||
|
||||
let
|
||||
version = "4.0.3";
|
||||
patchDir = fetchsvn {
|
||||
url = svn://svn.archlinux.org/packages/libtiff/trunk;
|
||||
rev = "198247";
|
||||
sha256 = "0a47l0zkc1zz7wxg64cyjv9z1djdvfyxgmwd03znlsac4zijkcy4";
|
||||
};
|
||||
version = "4.0.4beta";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libtiff-${version}";
|
||||
@@ -19,19 +14,6 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0wj8d1iwk9vnpax2h29xqc2hwknxg3s0ay2d5pxkg59ihbifn6pa";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
for p in ${patchDir}/*-{2013-4244,2012-4447,2012-4564,2013-1960,2013-1961,libjpeg-turbo}.patch; do
|
||||
patch -p1 < "$p"
|
||||
done
|
||||
(
|
||||
cd tools
|
||||
for p in ${patchDir}/*-CVE-{2013-4231,2013-4232}.patch; do
|
||||
patch -p0 < "$p"
|
||||
done
|
||||
)
|
||||
patch -p0 < ${patchDir}/${if stdenv.isDarwin then "tiff-4.0.3" else "*"}-tiff2pdf-colors.patch
|
||||
''; # ^ sh on darwin seems not to expand globs in redirects, and I don't want to rebuild all again elsewhere
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
propagatedBuildInputs = [ zlib libjpeg xz ]; #TODO: opengl support (bogus configure detection)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, pkgconfig, udev ? null }:
|
||||
{ stdenv, fetchurl, pkgconfig, udev ? null, libobjc, IOKit }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libusb-1.0.19";
|
||||
@@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig ];
|
||||
propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux udev;
|
||||
propagatedBuildInputs =
|
||||
stdenv.lib.optional stdenv.isLinux udev ++
|
||||
stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig }:
|
||||
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool, pkgconfig
|
||||
|
||||
, ApplicationServices, CoreServices }:
|
||||
|
||||
let
|
||||
stable = "stable";
|
||||
@@ -59,7 +61,8 @@ let
|
||||
mkWithAutotools = stability: version: sha256: stdenv.mkDerivation {
|
||||
name = mkName stability version;
|
||||
src = mkSrc version sha256;
|
||||
buildInputs = [ automake autoconf libtool pkgconfig ];
|
||||
buildInputs = [ automake autoconf libtool pkgconfig ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
|
||||
preConfigure = ''
|
||||
LIBTOOLIZE=libtoolize ./autogen.sh
|
||||
'';
|
||||
|
||||
@@ -26,11 +26,4 @@ stdenv.mkDerivation {
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/lib
|
||||
cp libXcomp.so* $out/lib
|
||||
mkdir $out/include
|
||||
cp NX.h $out/include
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -22,13 +22,6 @@ stdenv.mkDerivation rec {
|
||||
"DESTDIR=\${out}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm $out/lib/lib{mbedtls.so.8,polarssl.{a,so}}
|
||||
ln -s libmbedtls.so $out/lib/libmbedtls.so.8
|
||||
ln -s libmbedtls.so $out/lib/libpolarssl.so
|
||||
ln -s libmbedtls.a $out/lib/libpolarssl.a
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, flex, bison, autoreconfHook, substituteAll
|
||||
, python, libxml2Python, file, expat, makedepend, pythonPackages
|
||||
, libdrm, xorg, wayland, udev, llvmPackages, libffi, libomxil-bellagio
|
||||
, libvdpau, libelf, libva, libclc
|
||||
, libvdpau, libelf, libva
|
||||
, grsecEnabled
|
||||
, enableTextureFloats ? false # Texture floats are patented, see docs/patents.txt
|
||||
, enableExtraFeatures ? false # not maintained
|
||||
@@ -23,10 +23,9 @@ else
|
||||
*/
|
||||
|
||||
let
|
||||
version = "10.5.6";
|
||||
version = "10.6.1";
|
||||
# this is the default search path for DRI drivers
|
||||
driverLink = "/run/opengl-driver" + stdenv.lib.optionalString stdenv.isi686 "-32";
|
||||
clang = if llvmPackages ? clang-unwrapped then llvmPackages.clang-unwrapped else llvmPackages.clang;
|
||||
in
|
||||
with { inherit (stdenv.lib) optional optionals optionalString; };
|
||||
|
||||
@@ -38,7 +37,7 @@ stdenv.mkDerivation {
|
||||
"https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
|
||||
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
|
||||
];
|
||||
sha256 = "15d5icr7q0nq1a7718fsj4s1l29aa4qdxvmkgmjadxz5pm9ph0b6";
|
||||
sha256 = "6c80a2b647e57c85dc36e609d9aed17f878f0d8e0cf9ace86d14cf604101e1eb";
|
||||
};
|
||||
|
||||
prePatch = "patchShebangs .";
|
||||
@@ -63,7 +62,6 @@ stdenv.mkDerivation {
|
||||
configureFlags = [
|
||||
"--sysconfdir=/etc"
|
||||
"--localstatedir=/var"
|
||||
"--with-clang-libdir=${clang}/lib"
|
||||
"--with-dri-driverdir=$(drivers)/lib/dri"
|
||||
"--with-dri-searchpath=${driverLink}/lib/dri"
|
||||
|
||||
@@ -81,13 +79,11 @@ stdenv.mkDerivation {
|
||||
++ [
|
||||
"--enable-xvmc"
|
||||
"--enable-vdpau"
|
||||
"--enable-omx"
|
||||
"--enable-va"
|
||||
#"--enable-omx"
|
||||
#"--enable-va"
|
||||
|
||||
# TODO: Figure out how to enable opencl without having a runtime dependency on clang
|
||||
"--disable-opencl"
|
||||
#"--enable-opencl"
|
||||
#"--enable-opencl-icd"
|
||||
|
||||
"--with-gallium-drivers=svga,i915,ilo,r300,r600,radeonsi,nouveau,freedreno,swrast"
|
||||
"--enable-shared-glapi"
|
||||
@@ -111,8 +107,7 @@ stdenv.mkDerivation {
|
||||
autoreconfHook intltool expat libxml2Python llvmPackages.llvm
|
||||
glproto dri2proto dri3proto presentproto
|
||||
libX11 libXext libxcb libXt libXfixes libxshmfence
|
||||
libffi wayland libvdpau libelf libXvMC libomxil-bellagio libva
|
||||
libclc clang
|
||||
libffi wayland libvdpau libelf libXvMC /* libomxil-bellagio libva */
|
||||
] ++ optional stdenv.isLinux udev;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
@@ -132,9 +127,6 @@ stdenv.mkDerivation {
|
||||
`#$out/lib/libXvMC*` \
|
||||
$out/lib/gbm $out/lib/libgbm* \
|
||||
'' + ''
|
||||
$out/lib/gallium-pipe \
|
||||
$out/lib/libdricore* \
|
||||
$out/lib/libgallium* \
|
||||
$out/lib/vdpau \
|
||||
$out/lib/libxatracker*
|
||||
|
||||
@@ -149,18 +141,6 @@ stdenv.mkDerivation {
|
||||
$out/lib/pkgconfig/osmesa.pc
|
||||
|
||||
'' + /* now fix references in .la files */ ''
|
||||
sed "/^libdir=/s,$out,$drivers," -i \
|
||||
'' + optionalString enableExtraFeatures ''
|
||||
`#$drivers/lib/libXvMC*.la` \
|
||||
'' + ''
|
||||
$drivers/lib/gallium-pipe/*.la \
|
||||
$drivers/lib/libgallium.la \
|
||||
$drivers/lib/vdpau/*.la \
|
||||
$drivers/lib/libdricore*.la
|
||||
|
||||
sed "s,$out\(/lib/\(libdricore[0-9\.]*\|libgallium\).la\),$drivers\1,g" \
|
||||
-i $drivers/lib/*.la $drivers/lib/*/*.la
|
||||
|
||||
sed "/^libdir=/s,$out,$osmesa," -i \
|
||||
$osmesa/lib/libOSMesa*.la
|
||||
|
||||
|
||||
@@ -1,31 +1,14 @@
|
||||
{ stdenv, fetchurl
|
||||
{ lib, stdenv, fetchurl
|
||||
|
||||
# Optional Dependencies
|
||||
, gpm ? null
|
||||
, mouseSupport ? false
|
||||
, unicode ? true
|
||||
|
||||
, gpm
|
||||
|
||||
# Extra Options
|
||||
, abiVersion ? "5"
|
||||
, unicode ? true
|
||||
}:
|
||||
|
||||
let
|
||||
mkFlag = trueStr: falseStr: cond: name: val:
|
||||
if cond == null then null else
|
||||
"--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}";
|
||||
mkEnable = mkFlag "enable-" "disable-";
|
||||
mkWith = mkFlag "with-" "without-";
|
||||
mkOther = mkFlag "" "" true;
|
||||
|
||||
shouldUsePkg = pkg_: let
|
||||
pkg = (builtins.tryEval pkg_).value;
|
||||
in if stdenv.lib.any (x: x == stdenv.system) (pkg.meta.platforms or [])
|
||||
then pkg
|
||||
else null;
|
||||
|
||||
buildShared = !stdenv.isDarwin;
|
||||
|
||||
optGpm = shouldUsePkg gpm;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ncurses-5.9";
|
||||
|
||||
@@ -34,54 +17,23 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh";
|
||||
};
|
||||
|
||||
patches = [ ./clang.patch ];
|
||||
|
||||
buildInputs = [ optGpm ];
|
||||
# gcc-5.patch should be removed after 5.9
|
||||
patches = [ ./clang.patch ./gcc-5.patch ];
|
||||
|
||||
configureFlags = [
|
||||
(mkWith true "abi-version" abiVersion)
|
||||
(mkWith true "cxx" null)
|
||||
(mkWith true "cxx-binding" null)
|
||||
(mkWith false "ada" null)
|
||||
(mkWith true "manpages" null)
|
||||
(mkWith true "progs" null)
|
||||
(mkWith doCheck "tests" null)
|
||||
(mkWith true "curses-h" null)
|
||||
(mkEnable true "pc-files" null)
|
||||
(mkWith buildShared "shared" null)
|
||||
(mkWith true "normal" null)
|
||||
(mkWith false "debug" null)
|
||||
(mkWith false "termlib" null)
|
||||
(mkWith false "ticlib" null)
|
||||
(mkWith optGpm "gpm" null)
|
||||
(mkEnable true "overwrite" null)
|
||||
(mkEnable true "database" null)
|
||||
(mkWith true "xterm-new" null)
|
||||
(mkEnable true "symlinks" null)
|
||||
(mkEnable unicode "widec" null)
|
||||
(mkEnable true "ext-colors" null)
|
||||
(mkEnable true "ext-mouse" null)
|
||||
] ++ stdenv.lib.optionals stdenv.isCygwin [
|
||||
"--enable-sp-funcs"
|
||||
"--enable-term-driver"
|
||||
"--enable-const"
|
||||
"--enable-ext-colors"
|
||||
"--enable-ext-mouse"
|
||||
"--enable-reentrant"
|
||||
"--enable-colorfgbg"
|
||||
"--enable-tcap-names"
|
||||
];
|
||||
"--with-shared"
|
||||
"--without-debug"
|
||||
"--enable-pc-files"
|
||||
"--enable-symlinks"
|
||||
] ++ lib.optional unicode "--enable-widec";
|
||||
|
||||
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
|
||||
|
||||
# PKG_CONFIG_LIBDIR is where the *.pc files will be installed. If this
|
||||
# directory doesn't exist, the configure script will disable installation of
|
||||
# *.pc files. The configure script usually (on LSB distros) pick $(path of
|
||||
# pkg-config)/../lib/pkgconfig. On NixOS that path doesn't exist and is not
|
||||
# the place we want to put *.pc files from other packages anyway. So we must
|
||||
# tell it explicitly where to install with PKG_CONFIG_LIBDIR.
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=("--includedir=$out/include")
|
||||
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
|
||||
mkdir -p "$PKG_CONFIG_LIBDIR"
|
||||
'' + stdenv.lib.optionalString stdenv.isCygwin ''
|
||||
'' + lib.optionalString stdenv.isCygwin ''
|
||||
sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
|
||||
'';
|
||||
|
||||
@@ -94,49 +46,47 @@ stdenv.mkDerivation rec {
|
||||
# When building a wide-character (Unicode) build, create backward
|
||||
# compatibility links from the the "normal" libraries to the
|
||||
# wide-character libraries (e.g. libncurses.so to libncursesw.so).
|
||||
postInstall = if unicode then (''
|
||||
# Create a non-abi versioned config
|
||||
postInstall = ''
|
||||
# Determine what suffixes our libraries have
|
||||
suffix="$(awk -F': ' 'f{print $3; f=0} /default library suffix/{f=1}' config.log)"
|
||||
libs="$(ls $out/lib/pkgconfig | tr ' ' '\n' | sed "s,\(.*\)$suffix\.pc,\1,g")"
|
||||
suffixes="$(echo "$suffix" | awk '{for (i=1; i < length($0); i++) {x=substr($0, i+1, length($0)-i); print x}}')"
|
||||
|
||||
# Get the path to the config util
|
||||
cfg=$(basename $out/bin/ncurses*-config)
|
||||
ln -svf $cfg $out/bin/ncursesw-config
|
||||
ln -svf $cfg $out/bin/ncurses-config
|
||||
|
||||
# Allow for end users who #include <ncurses?w/*.h>
|
||||
ln -svf . $out/include/ncursesw
|
||||
ln -svf . $out/include/ncurses
|
||||
# symlink the full suffixed include directory
|
||||
ln -svf . $out/include/ncurses$suffix
|
||||
|
||||
# Create non-unicode compatability
|
||||
libs="$(find $out/lib -name \*w.a | sed 's,.*lib\(.*\)w.a.*,\1,g')"
|
||||
for lib in $libs; do
|
||||
if [ -e "$out/lib/lib''${lib}w.so" ]; then
|
||||
ln -svf lib''${lib}w.so $out/lib/lib$lib.so
|
||||
ln -svf lib''${lib}w.so.${abiVersion} $out/lib/lib$lib.so.${abiVersion}
|
||||
fi
|
||||
ln -svf lib''${lib}w.a $out/lib/lib$lib.a
|
||||
ln -svf ''${lib}w.pc $out/lib/pkgconfig/$lib.pc
|
||||
for newsuffix in $suffixes ""; do
|
||||
# Create a non-abi versioned config util links
|
||||
ln -svf $cfg $out/bin/ncurses$newsuffix-config
|
||||
|
||||
# Allow for end users who #include <ncurses?w/*.h>
|
||||
ln -svf . $out/include/ncurses$newsuffix
|
||||
|
||||
for lib in $libs; do
|
||||
for dylibtype in so dll dylib; do
|
||||
if [ -e "$out/lib/lib''${lib}$suffix.$dylibtype" ]; then
|
||||
ln -svf lib''${lib}$suffix.$dylibtype $out/lib/lib$lib$newsuffix.$dylibtype
|
||||
ln -svf lib''${lib}$suffix.$dylibtype.${abiVersion} $out/lib/lib$lib$newsuffix.$dylibtype.${abiVersion}
|
||||
fi
|
||||
done
|
||||
for statictype in a dll.a la; do
|
||||
if [ -e "$out/lib/lib''${lib}$suffix.$statictype" ]; then
|
||||
ln -svf lib''${lib}$suffix.$statictype $out/lib/lib$lib$newsuffix.$statictype
|
||||
fi
|
||||
done
|
||||
ln -svf ''${lib}$suffix.pc $out/lib/pkgconfig/$lib$newsuffix.pc
|
||||
done
|
||||
done
|
||||
|
||||
# Create curses compatability
|
||||
ln -svf libncursesw.so $out/lib/libcursesw.so
|
||||
ln -svf libncursesw.so $out/lib/libcurses.so
|
||||
'' + stdenv.lib.optionalString stdenv.isCygwin ''
|
||||
for lib in $libs; do
|
||||
if test -e $out/lib/lib''${lib}w.dll.a; then
|
||||
ln -svf lib''${lib}w.dll.a $out/lib/lib$lib.dll.a
|
||||
fi
|
||||
done
|
||||
'') else ''
|
||||
# Create a non-abi versioned config
|
||||
cfg=$(basename $out/bin/ncurses*-config)
|
||||
ln -svf $cfg $out/bin/ncurses-config
|
||||
|
||||
# Allow for end users who #include <ncurses/*.h>
|
||||
ln -svf . $out/include/ncurses
|
||||
|
||||
# Create curses compatability
|
||||
ln -svf libncurses.so $out/lib/libcurses.so
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
preFixup = ''
|
||||
rm $out/lib/*.a
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Free software emulation of curses in SVR4 and more";
|
||||
|
||||
longDescription = ''
|
||||
@@ -155,13 +105,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
homepage = http://www.gnu.org/software/ncurses/;
|
||||
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ wkennington ];
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = [ lib.maintainers.wkennington ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
ldflags = if unicode then "-lncursesw" else "-lncurses";
|
||||
ldflags = "-lncurses";
|
||||
inherit unicode abiVersion;
|
||||
};
|
||||
}
|
||||
|
||||
46
pkgs/development/libraries/ncurses/gcc-5.patch
Normal file
46
pkgs/development/libraries/ncurses/gcc-5.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
https://bugs.gentoo.org/545114
|
||||
|
||||
extracted from the upstream change (which had many unrelated commits in one)
|
||||
|
||||
From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
|
||||
From: "Thomas E. Dickey" <dickey@invisible-island.net>
|
||||
Date: Sun, 7 Dec 2014 03:10:09 +0000
|
||||
Subject: [PATCH] ncurses 5.9 - patch 20141206
|
||||
|
||||
+ modify MKlib_gen.sh to work around change in development version of
|
||||
gcc introduced here:
|
||||
https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
|
||||
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
|
||||
(reports by Marcus Shawcroft, Maohui Lei).
|
||||
|
||||
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
|
||||
index d8cc3c9..b91398c 100755
|
||||
--- a/ncurses/base/MKlib_gen.sh
|
||||
+++ b/ncurses/base/MKlib_gen.sh
|
||||
@@ -474,11 +474,22 @@ sed -n -f $ED1 \
|
||||
-e 's/gen_$//' \
|
||||
-e 's/ / /g' >>$TMP
|
||||
|
||||
+cat >$ED1 <<EOF
|
||||
+s/ / /g
|
||||
+s/^ //
|
||||
+s/ $//
|
||||
+s/P_NCURSES_BOOL/NCURSES_BOOL/g
|
||||
+EOF
|
||||
+
|
||||
+# A patch discussed here:
|
||||
+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
|
||||
+# introduces spurious #line markers. Work around that by ignoring the system's
|
||||
+# attempt to define "bool" and using our own symbol here.
|
||||
+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
|
||||
+cat $ED2 >$TMP
|
||||
+
|
||||
$preprocessor $TMP 2>/dev/null \
|
||||
-| sed \
|
||||
- -e 's/ / /g' \
|
||||
- -e 's/^ //' \
|
||||
- -e 's/_Bool/NCURSES_BOOL/g' \
|
||||
+| sed -f $ED1 \
|
||||
| $AWK -f $AW2 \
|
||||
| sed -f $ED3 \
|
||||
| sed \
|
||||
@@ -34,12 +34,12 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${prefix}nghttp2-${version}";
|
||||
version = "0.7.14";
|
||||
version = "1.0.2";
|
||||
|
||||
# Don't use fetchFromGitHub since this needs a bootstrap curl
|
||||
src = fetchurl {
|
||||
url = "http://pub.wak.io/nixos/tarballs/nghttp2-${version}.tar.bz2";
|
||||
sha256 = "000d50yzyysbr9ldhvnbpzn35vplqm08dnmh55wc5zk273gy383f";
|
||||
sha256 = "633dd6d5d1f29a4d802d6c9e5b9eeb0b9104f35652396f26999a27515b6c1c14";
|
||||
};
|
||||
|
||||
# Configure script searches for a symbol which does not exist in jemalloc on Darwin
|
||||
|
||||
@@ -1,57 +1,27 @@
|
||||
{ stdenv, fetchurl, perl
|
||||
, withCryptodev ? false, cryptodevHeaders }:
|
||||
|
||||
with stdenv.lib;
|
||||
let
|
||||
name = "openssl-1.0.2c";
|
||||
|
||||
opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]
|
||||
opensslCrossSystem = attrByPath [ "openssl" "system" ]
|
||||
(throw "openssl needs its platform name cross building" null)
|
||||
stdenv.cross;
|
||||
|
||||
patchesCross = isCross: let
|
||||
isDarwin = stdenv.isDarwin || (isCross && stdenv.cross.libc == "libSystem");
|
||||
in
|
||||
[ # Allow the location of the X509 certificate file (the CA
|
||||
# bundle) to be set through the environment variable
|
||||
# ‘OPENSSL_X509_CERT_FILE’. This is necessary because the
|
||||
# default location ($out/ssl/cert.pem) doesn't exist, and
|
||||
# hardcoding something like /etc/ssl/cert.pem is impure and
|
||||
# cannot be overriden per-process. For security, the
|
||||
# environment variable is ignored for setuid binaries.
|
||||
# FIXME: drop this patch; it really isn't necessary, because
|
||||
# OpenSSL already supports a ‘SSL_CERT_FILE’ variable.
|
||||
./cert-file.patch
|
||||
]
|
||||
|
||||
++ stdenv.lib.optionals (isCross && opensslCrossSystem == "hurd-x86")
|
||||
[ ./cert-file-path-max.patch # merge with `cert-file.patch' eventually
|
||||
./gnu.patch # submitted upstream
|
||||
]
|
||||
|
||||
++ stdenv.lib.optionals (stdenv.system == "x86_64-kfreebsd-gnu")
|
||||
[ ./gnu.patch
|
||||
./kfreebsd-gnu.patch
|
||||
];
|
||||
|
||||
extraPatches = stdenv.lib.optional stdenv.isCygwin ./1.0.1-cygwin64.patch;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "openssl-1.0.2d";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://www.openssl.org/source/${name}.tar.gz"
|
||||
"http://openssl.linux-mirror.org/source/${name}.tar.gz"
|
||||
];
|
||||
sha256 = "10vasdg52qiyqvgbp14n9z7ghglmhzvag9qpiz2nfqssycvvlf00";
|
||||
sha1 = "d01d17b44663e8ffa6a33a5a30053779d9593c3d";
|
||||
};
|
||||
|
||||
patches = (patchesCross false) ++ extraPatches;
|
||||
|
||||
buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
|
||||
patches = optional stdenv.isCygwin ./1.0.1-cygwin64.patch;
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
|
||||
|
||||
# On x86_64-darwin, "./config" misdetects the system as
|
||||
# "darwin-i386-cc". So specify the system type explicitly.
|
||||
@@ -60,46 +30,48 @@ stdenv.mkDerivation {
|
||||
else if stdenv.system == "x86_64-solaris" then "./Configure solaris64-x86_64-gcc"
|
||||
else "./config";
|
||||
|
||||
configureFlags = "shared --libdir=lib --openssldir=etc/ssl" +
|
||||
stdenv.lib.optionalString withCryptodev " -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS";
|
||||
configureFlags = [
|
||||
"shared"
|
||||
"--libdir=lib"
|
||||
"--openssldir=etc/ssl"
|
||||
] ++ stdenv.lib.optionals withCryptodev [
|
||||
"-DHAVE_CRYPTODEV"
|
||||
"-DUSE_CRYPTODEV_DIGESTS"
|
||||
];
|
||||
|
||||
# CYGXXX: used to be set for cygwin with optionalString. Not needed
|
||||
# anymore but kept to prevent rebuild.
|
||||
preBuild = "";
|
||||
|
||||
makeFlags = "MANDIR=$(out)/share/man";
|
||||
makeFlags = [
|
||||
"MANDIR=$(out)/share/man"
|
||||
];
|
||||
|
||||
# Parallel building is broken in OpenSSL.
|
||||
enableParallelBuilding = false;
|
||||
|
||||
postInstall =
|
||||
''
|
||||
# If we're building dynamic libraries, then don't install static
|
||||
# libraries.
|
||||
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib)" ]; then
|
||||
rm $out/lib/*.a
|
||||
fi
|
||||
''; # */
|
||||
postInstall = ''
|
||||
# If we're building dynamic libraries, then don't install static
|
||||
# libraries.
|
||||
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
|
||||
rm "$out/lib/"*.a
|
||||
fi
|
||||
|
||||
# remove dependency on Perl at runtime
|
||||
rm -r $out/etc/ssl/misc $out/bin/c_rehash
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Check to make sure we don't depend on perl
|
||||
if grep -r '${perl}' $out; then
|
||||
echo "Found an erroneous dependency on perl ^^^" >&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
patches = patchesCross true;
|
||||
|
||||
preConfigure=''
|
||||
# It's configure does not like --build or --host
|
||||
export configureFlags="--libdir=lib --cross-compile-prefix=${stdenv.cross.config}- shared ${opensslCrossSystem}"
|
||||
export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Openssl installs readonly files, which otherwise we can't strip.
|
||||
# This could at some stdenv hash change be put out of crossAttrs, too
|
||||
chmod -R +w $out
|
||||
|
||||
# Remove references to perl, to avoid depending on it at runtime
|
||||
rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget
|
||||
'';
|
||||
configureScript = "./Configure";
|
||||
} // stdenv.lib.optionalAttrs (opensslCrossSystem == "darwin64-x86_64-cc") {
|
||||
CC = "gcc";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
This patch, to be applied after `cert-file.patch', fixes compilation
|
||||
on GNU/Hurd where `PATH_MAX' is not defined.
|
||||
|
||||
diff -ubB --show-c-function openssl-1.0.0e/crypto/x509/x509_def.c.orig openssl-1.0.0e/crypto/x509/x509_def.c
|
||||
--- openssl-1.0.0e/crypto/x509/x509_def.c.orig 2012-01-06 00:08:48.000000000 +0100
|
||||
+++ openssl-1.0.0e/crypto/x509/x509_def.c 2012-01-06 00:11:29.000000000 +0100
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
@@ -76,14 +77,16 @@ const char *X509_get_default_cert_dir(vo
|
||||
|
||||
const char *X509_get_default_cert_file(void)
|
||||
{
|
||||
- static char buf[PATH_MAX] = X509_CERT_FILE;
|
||||
+ static char *buf;
|
||||
static int init = 0;
|
||||
if (!init) {
|
||||
init = 1;
|
||||
char * s = getenv("OPENSSL_X509_CERT_FILE");
|
||||
if (s && getuid() == geteuid()) {
|
||||
- strncpy(buf, s, sizeof(buf));
|
||||
- buf[sizeof(buf) - 1] = 0;
|
||||
+ buf = strdup(s);
|
||||
+ }
|
||||
+ if (!s) {
|
||||
+ buf = strdup(X509_CERT_FILE);
|
||||
}
|
||||
}
|
||||
return buf;
|
||||
@@ -1,39 +0,0 @@
|
||||
diff -ru openssl-1.0.1m-orig/crypto/x509/x509_def.c openssl-1.0.1m/crypto/x509/x509_def.c
|
||||
--- openssl-1.0.1m-orig/crypto/x509/x509_def.c 2015-03-19 14:19:00.000000000 +0100
|
||||
+++ openssl-1.0.1m/crypto/x509/x509_def.c 2015-03-19 15:50:44.676683616 +0100
|
||||
@@ -57,6 +57,10 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <limits.h>
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/x509.h>
|
||||
@@ -78,7 +82,23 @@
|
||||
|
||||
const char *X509_get_default_cert_file(void)
|
||||
{
|
||||
- return (X509_CERT_FILE);
|
||||
+ static char buf[PATH_MAX] = X509_CERT_FILE;
|
||||
+ static int init = 0;
|
||||
+ if (!init) {
|
||||
+ init = 1;
|
||||
+ char * s = getenv("OPENSSL_X509_CERT_FILE");
|
||||
+ if (s) {
|
||||
+#ifndef OPENSSL_SYS_WINDOWS
|
||||
+ if (getuid() == geteuid()) {
|
||||
+#endif
|
||||
+ strncpy(buf, s, sizeof(buf));
|
||||
+ buf[sizeof(buf) - 1] = 0;
|
||||
+#ifndef OPENSSL_SYS_WINDOWS
|
||||
+ }
|
||||
+#endif
|
||||
+ }
|
||||
+ }
|
||||
+ return buf;
|
||||
}
|
||||
|
||||
const char *X509_get_default_cert_dir_env(void)
|
||||
@@ -1,59 +1,28 @@
|
||||
{ stdenv, fetchurl, perl
|
||||
, withCryptodev ? false, cryptodevHeaders }:
|
||||
|
||||
with stdenv.lib;
|
||||
let
|
||||
name = "openssl-1.0.1m";
|
||||
|
||||
opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]
|
||||
opensslCrossSystem = attrByPath [ "openssl" "system" ]
|
||||
(throw "openssl needs its platform name cross building" null)
|
||||
stdenv.cross;
|
||||
|
||||
patchesCross = isCross: let
|
||||
isDarwin = stdenv.isDarwin || (isCross && stdenv.cross.libc == "libSystem");
|
||||
in
|
||||
[ # Allow the location of the X509 certificate file (the CA
|
||||
# bundle) to be set through the environment variable
|
||||
# ‘OPENSSL_X509_CERT_FILE’. This is necessary because the
|
||||
# default location ($out/ssl/cert.pem) doesn't exist, and
|
||||
# hardcoding something like /etc/ssl/cert.pem is impure and
|
||||
# cannot be overriden per-process. For security, the
|
||||
# environment variable is ignored for setuid binaries.
|
||||
# FIXME: drop this patch; it really isn't necessary, because
|
||||
# OpenSSL already supports a ‘SSL_CERT_FILE’ variable.
|
||||
./cert-file.patch
|
||||
]
|
||||
|
||||
++ stdenv.lib.optionals (isCross && opensslCrossSystem == "hurd-x86")
|
||||
[ ./cert-file-path-max.patch # merge with `cert-file.patch' eventually
|
||||
./gnu.patch # submitted upstream
|
||||
]
|
||||
|
||||
++ stdenv.lib.optionals (stdenv.system == "x86_64-kfreebsd-gnu")
|
||||
[ ./gnu.patch
|
||||
./kfreebsd-gnu.patch
|
||||
]
|
||||
|
||||
++ stdenv.lib.optional isDarwin ./darwin-arch.patch;
|
||||
|
||||
extraPatches = stdenv.lib.optional stdenv.isCygwin ./1.0.1-cygwin64.patch;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "openssl-1.0.1p";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://www.openssl.org/source/${name}.tar.gz"
|
||||
"http://openssl.linux-mirror.org/source/${name}.tar.gz"
|
||||
];
|
||||
sha256 = "0x7gvyybmqm4lv62mlhlm80f1rn7il2qh8224rahqv0i15xhnpq9";
|
||||
sha1 = "9d1977cc89242cd11471269ece2ed4650947c046";
|
||||
};
|
||||
|
||||
patches = (patchesCross false) ++ extraPatches;
|
||||
|
||||
buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
|
||||
patches = optional stdenv.isCygwin ./1.0.1-cygwin64.patch
|
||||
++ optional (stdenv.isDarwin || (stdenv ? cross && stdenv.cross.libc == "libSystem")) ./darwin-arch.patch;
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
|
||||
|
||||
# On x86_64-darwin, "./config" misdetects the system as
|
||||
# "darwin-i386-cc". So specify the system type explicitly.
|
||||
@@ -62,46 +31,48 @@ stdenv.mkDerivation {
|
||||
else if stdenv.system == "x86_64-solaris" then "./Configure solaris64-x86_64-gcc"
|
||||
else "./config";
|
||||
|
||||
configureFlags = "shared --libdir=lib --openssldir=etc/ssl" +
|
||||
stdenv.lib.optionalString withCryptodev " -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS";
|
||||
configureFlags = [
|
||||
"shared"
|
||||
"--libdir=lib"
|
||||
"--openssldir=etc/ssl"
|
||||
] ++ stdenv.lib.optionals withCryptodev [
|
||||
"-DHAVE_CRYPTODEV"
|
||||
"-DUSE_CRYPTODEV_DIGESTS"
|
||||
];
|
||||
|
||||
# CYGXXX: used to be set for cygwin with optionalString. Not needed
|
||||
# anymore but kept to prevent rebuild.
|
||||
preBuild = "";
|
||||
|
||||
makeFlags = "MANDIR=$(out)/share/man";
|
||||
makeFlags = [
|
||||
"MANDIR=$(out)/share/man"
|
||||
];
|
||||
|
||||
# Parallel building is broken in OpenSSL.
|
||||
enableParallelBuilding = false;
|
||||
|
||||
postInstall =
|
||||
''
|
||||
# If we're building dynamic libraries, then don't install static
|
||||
# libraries.
|
||||
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib)" ]; then
|
||||
rm $out/lib/*.a
|
||||
fi
|
||||
''; # */
|
||||
postInstall = ''
|
||||
# If we're building dynamic libraries, then don't install static
|
||||
# libraries.
|
||||
if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
|
||||
rm "$out/lib/"*.a
|
||||
fi
|
||||
|
||||
# remove dependency on Perl at runtime
|
||||
rm -r $out/etc/ssl/misc $out/bin/c_rehash
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Check to make sure we don't depend on perl
|
||||
if grep -r '${perl}' $out; then
|
||||
echo "Found an erroneous dependency on perl ^^^" >&2
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
crossAttrs = {
|
||||
patches = patchesCross true;
|
||||
|
||||
preConfigure=''
|
||||
# It's configure does not like --build or --host
|
||||
export configureFlags="--libdir=lib --cross-compile-prefix=${stdenv.cross.config}- shared ${opensslCrossSystem}"
|
||||
export configureFlags="${concatStringsSep " " (configureFlags ++ [ opensslCrossSystem ])}"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Openssl installs readonly files, which otherwise we can't strip.
|
||||
# This could at some stdenv hash change be put out of crossAttrs, too
|
||||
chmod -R +w $out
|
||||
|
||||
# Remove references to perl, to avoid depending on it at runtime
|
||||
rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget
|
||||
'';
|
||||
configureScript = "./Configure";
|
||||
} // stdenv.lib.optionalAttrs (opensslCrossSystem == "darwin64-x86_64-cc") {
|
||||
CC = "gcc";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
Patch to fix compilation on GNU/Hurd and GNU/kFreeBSD.
|
||||
|
||||
--- openssl-1.0.0e/Configure 2012-01-06 00:39:49.000000000 +0100
|
||||
+++ openssl-1.0.0e/Configure 2012-01-06 00:39:51.000000000 +0100
|
||||
@@ -563,7 +563,7 @@ my %table=(
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
##### GNU Hurd
|
||||
-"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
+"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
##### OS/2 EMX
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
|
||||
--- openssl-1.0.0e/crypto/dso/dso_dlfcn.c 2012-01-06 00:05:47.000000000 +0100
|
||||
+++ openssl-1.0.0e/crypto/dso/dso_dlfcn.c 2012-01-06 00:21:05.000000000 +0100
|
||||
@@ -60,7 +60,7 @@
|
||||
that handle _GNU_SOURCE and other similar macros. Defining it later
|
||||
is simply too late, because those headers are protected from re-
|
||||
inclusion. */
|
||||
-#ifdef __linux
|
||||
+#if defined __linux || defined __GNU__ || defined __GLIBC__
|
||||
# ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE /* make sure dladdr is declared */
|
||||
# endif
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur openssl-1.0.0d-orig/Configure openssl-1.0.0d/Configure
|
||||
--- openssl-1.0.0d-orig/Configure 2010-11-30 17:19:26.000000000 -0500
|
||||
+++ openssl-1.0.0d/Configure 2011-11-16 13:52:57.614416683 -0500
|
||||
@@ -563,7 +563,7 @@
|
||||
"newsos4-gcc","gcc:-O -DB_ENDIAN::(unknown):NEWS4:-lmld -liberty:BN_LLONG RC4_CHAR RC4_CHUNK DES_PTR DES_RISC1 DES_UNROLL BF_PTR::::",
|
||||
|
||||
##### GNU Hurd
|
||||
-"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
+"hurd-x86","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
|
||||
##### OS/2 EMX
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
@@ -1,36 +0,0 @@
|
||||
Allow compilation on GNU/kFreeBSD. Ideally, there'd be a single way to process
|
||||
all glibc-based system, but the build system is soooo broken.
|
||||
|
||||
--- openssl-1.0.0i/config
|
||||
+++ openssl-1.0.0i/config
|
||||
@@ -170,6 +170,10 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${
|
||||
echo "${MACHINE}-whatever-linux1"; exit 0
|
||||
;;
|
||||
|
||||
+ GNU/kFreeBSD*)
|
||||
+ echo "kfreebsd-gnu"; exit 0;
|
||||
+ ;;
|
||||
+
|
||||
GNU*)
|
||||
echo "hurd-x86"; exit 0;
|
||||
;;
|
||||
@@ -810,6 +814,7 @@ case "$GUESSOS" in
|
||||
beos-*) OUT="$GUESSOS" ;;
|
||||
x86pc-*-qnx6) OUT="QNX6-i386" ;;
|
||||
*-*-qnx6) OUT="QNX6" ;;
|
||||
+ kfreebsd-gnu) OUT="kfreebsd-gnu";;
|
||||
*) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
|
||||
esac
|
||||
|
||||
|
||||
--- openssl-1.0.0i/Configure
|
||||
+++ openssl-1.0.0i/Configure
|
||||
@@ -565,6 +565,9 @@ my %table=(
|
||||
##### GNU Hurd
|
||||
"hurd-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC",
|
||||
|
||||
+##### GNU/kFreeBSD on x86_64, copied from "linux-x86_64"
|
||||
+"kfreebsd-gnu", "gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+
|
||||
##### OS/2 EMX
|
||||
"OS2-EMX", "gcc::::::::",
|
||||
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = glib.flattenInclude;
|
||||
|
||||
patches = stdenv.lib.optional stdenv.cc.isClang ./fix-clang36.patch;
|
||||
patches = stdenv.lib.optional stdenv.isDarwin ./fix-clang36.patch;
|
||||
|
||||
meta = {
|
||||
homepage = http://pixman.org;
|
||||
|
||||
@@ -15,11 +15,11 @@ let
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "polkit-0.112";
|
||||
name = "polkit-0.113";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.freedesktop.org/software/polkit/releases/${name}.tar.gz";
|
||||
sha256 = "1xkary7yirdcjdva950nqyhmsz48qhrdsr78zciahj27p8yg95fn";
|
||||
sha256 = "109w86kfqrgz83g9ivggplmgc77rz8kx8646izvm2jb57h4rbh71";
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
'' + stdenv.lib.optionalString useSystemd /* bogus chroot detection */ ''
|
||||
sed '/libsystemd-login autoconfigured, but system does not appear to use systemd/s/.*/:/' -i configure
|
||||
sed '/libsystemd autoconfigured/s/.*/:/' -i configure
|
||||
''
|
||||
# ‘libpolkit-agent-1.so’ should call the setuid wrapper on
|
||||
# NixOS. Hard-coding the path is kinda ugly. Maybe we can just
|
||||
|
||||
@@ -17,7 +17,7 @@ with stdenv.lib;
|
||||
|
||||
let
|
||||
v_maj = "4.8";
|
||||
v_min = "6";
|
||||
v_min = "7";
|
||||
vers = "${v_maj}.${v_min}";
|
||||
in
|
||||
|
||||
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
||||
src = fetchurl {
|
||||
url = "http://download.qt-project.org/official_releases/qt/"
|
||||
+ "${v_maj}/${vers}/qt-everywhere-opensource-src-${vers}.tar.gz";
|
||||
sha256 = "0b036iqgmbbv37dgwwfihw3mihjbnw3kb5kaisdy0qi8nn8xs54b";
|
||||
sha256 = "183fca7n7439nlhxyg1z7aky0izgbyll3iwakw4gwivy16aj5272";
|
||||
};
|
||||
|
||||
# The version property must be kept because it will be included into the QtSDK package name
|
||||
@@ -126,8 +126,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ perl pkgconfig which ];
|
||||
|
||||
# occasional build problems if one has too many cores (like on Hydra)
|
||||
# @vcunat has been unable to find a *reliable* fix
|
||||
enableParallelBuilding = false;
|
||||
|
||||
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin
|
||||
|
||||
@@ -20,9 +20,11 @@ addQtModule() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $qtSubmodule ]] && [[ -d "$1/lib" ]]; then
|
||||
if [[ -d "$1/lib" ]]; then
|
||||
@lndir@/bin/lndir -silent "$1/lib" "$qtOut/lib"
|
||||
find "$1/lib" -printf 'lib/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
||||
if [[ -n $qtSubmodule ]]; then
|
||||
find "$1/lib" -printf 'lib/%P\n' >> "$qtOut/nix-support/qt-inputs"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
|
||||
# Environment vars used for building certain configurations
|
||||
PORTABLE = "1";
|
||||
USE_SSE = "1";
|
||||
CMAKE_CXX_FLAGS = "-std=gnu++11";
|
||||
JEMALLOC_LIB = stdenv.lib.optionalString (malloc == jemalloc) "-ljemalloc";
|
||||
|
||||
buildFlags = [
|
||||
|
||||
@@ -8,18 +8,18 @@ assert expat != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "wayland-${version}";
|
||||
version = "1.7.0";
|
||||
version = "1.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://wayland.freedesktop.org/releases/${name}.tar.xz";
|
||||
sha256 = "173w0pqzk2m7hjlg15bymrx7ynxgq1ciadg03hzybxwnvfi4gsmx";
|
||||
sha256 = "1j3gfzn8i0xhk3j34mwb2srrscjxfyi279jhyq80mz943j6r6z7i";
|
||||
};
|
||||
|
||||
configureFlags = "--with-scanner";
|
||||
configureFlags = "--with-scanner --disable-documentation";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
buildInputs = [ libffi docbook_xsl doxygen graphviz libxslt xmlto expat ];
|
||||
buildInputs = [ libffi /* docbook_xsl doxygen graphviz libxslt xmlto */ expat ];
|
||||
|
||||
meta = {
|
||||
description = "Reference implementation of the wayland protocol";
|
||||
|
||||
@@ -13,6 +13,13 @@ stdenv.mkDerivation (rec {
|
||||
sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n";
|
||||
};
|
||||
|
||||
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace configure \
|
||||
--replace '/usr/bin/libtool' 'ar' \
|
||||
--replace 'AR="libtool"' 'AR="ar"' \
|
||||
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
|
||||
'';
|
||||
|
||||
configureFlags = if static then "" else "--shared";
|
||||
|
||||
preConfigure = ''
|
||||
|
||||
Reference in New Issue
Block a user