Skip to content

Commit 538aa0f

Browse files
committedMay 30, 2017
Merge branch 'staging' (early part)
The comparison looks nice on Hydra.
2 parents 30ce98b + 595141d commit 538aa0f

File tree

24 files changed

+202
-85
lines changed

24 files changed

+202
-85
lines changed
 

‎pkgs/development/compilers/llvm/4/clang/default.nix

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python }:
1+
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
2+
, fixDarwinDylibNames
3+
}:
24

35
let
46
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
@@ -13,23 +15,37 @@ let
1315
mv clang-tools-extra-* $sourceRoot/tools/extra
1416
'';
1517

16-
buildInputs = [ cmake libedit libxml2 llvm python ];
18+
nativeBuildInputs = [ cmake python python.pkgs.sphinx ];
19+
buildInputs = [ libedit libxml2 llvm ]
20+
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
1721

1822
cmakeFlags = [
1923
"-DCMAKE_CXX_FLAGS=-std=c++11"
24+
"-DCLANG_INCLUDE_DOCS=ON"
25+
"-DLLVM_ENABLE_SPHINX=ON"
26+
"-DSPHINX_OUTPUT_MAN=ON"
27+
"-DSPHINX_OUTPUT_HTML=OFF"
28+
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
2029
] ++
2130
# Maybe with compiler-rt this won't be needed?
2231
(stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
2332
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
2433

2534
patches = [ ./purity.patch ];
2635

36+
postBuild = ''
37+
cmake --build . --target docs-clang-man
38+
'';
39+
2740
postPatch = ''
2841
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp
2942
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
43+
44+
# Patch for standalone doc building
45+
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
3046
'';
3147

32-
outputs = [ "out" "python" ];
48+
outputs = [ "out" "man" "python" ];
3349

3450
# Clang expects to find LLVMgold in its own prefix
3551
# Clang expects to find sanitizer libraries in its own prefix
@@ -46,6 +62,12 @@ let
4662
mv $out/share/clang/*.py $python/share/clang
4763
4864
rm $out/bin/c-index-test
65+
66+
# Manually install clang manpage
67+
cp docs/man/*.1 $out/share/man/man1/
68+
69+
# Move it and other man pages to 'man' output
70+
moveToOutput "share/man" "$man"
4971
'';
5072

5173
enableParallelBuilding = true;

‎pkgs/development/compilers/llvm/4/libc++abi.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ stdenv.mkDerivation {
55

66
src = fetch "libcxxabi" "1n416kv27anabg9jsw6331r28ic30xk46p381lx2vbb2jrhwpafw";
77

8-
buildInputs = [ cmake ] ++ stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
8+
nativeBuildInputs = [ cmake ];
9+
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
910

1011
postUnpack = ''
1112
unpackFile ${libcxx.src}

‎pkgs/development/compilers/llvm/4/lld.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ stdenv.mkDerivation {
1212

1313
src = fetch "lld" "00km1qawk146pyjqa6aphcdzgkzrmg6cgk0ikg4661ffp5bn9q1k";
1414

15-
buildInputs = [ cmake llvm ];
15+
nativeBuildInputs = [ cmake ];
16+
buildInputs = [ llvm ];
1617

1718
outputs = [ "out" "dev" ];
1819

‎pkgs/development/compilers/llvm/4/lldb.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ stdenv.mkDerivation {
3030
cmake/modules/LLDBStandalone.cmake
3131
'';
3232

33-
buildInputs = [ cmake python which swig ncurses zlib libedit libxml2 llvm ]
33+
nativeBuildInputs = [ cmake python which swig ];
34+
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
3435
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc ];
3536

3637
CXXFLAGS = "-fno-rtti";

‎pkgs/development/compilers/llvm/4/llvm.nix

+11-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ in stdenv.mkDerivation rec {
3838
mv compiler-rt-* $sourceRoot/projects/compiler-rt
3939
'';
4040

41-
outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
41+
outputs = [ "out" "man" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
4242

43-
buildInputs = [ perl groff cmake libxml2 python libffi ]
43+
nativeBuildInputs = [ perl groff cmake python python.pkgs.sphinx ];
44+
buildInputs = [ libxml2 libffi ]
4445
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi ];
4546

4647
propagatedBuildInputs = [ ncurses zlib ];
@@ -80,6 +81,11 @@ in stdenv.mkDerivation rec {
8081
"-DLLVM_ENABLE_FFI=ON"
8182
"-DLLVM_ENABLE_RTTI=ON"
8283
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code
84+
"-DLLVM_BUILD_DOCS=ON"
85+
"-DLLVM_ENABLE_SPHINX=ON"
86+
"-DSPHINX_OUTPUT_MAN=ON"
87+
"-DSPHINX_OUTPUT_HTML=OFF"
88+
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
8389
] ++ stdenv.lib.optional enableSharedLibraries [
8490
"-DLLVM_LINK_LLVM_DYLIB=ON"
8591
] ++ stdenv.lib.optional (!isDarwin)
@@ -103,7 +109,9 @@ in stdenv.mkDerivation rec {
103109
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
104110
'';
105111

106-
postInstall = ""
112+
postInstall = ''
113+
moveToOutput "share/man" "$man"
114+
''
107115
+ stdenv.lib.optionalString (enableSharedLibraries) ''
108116
moveToOutput "lib/libLLVM-*" "$lib"
109117
moveToOutput "lib/libLLVM.${shlib}" "$lib"

‎pkgs/development/compilers/llvm/4/openmp.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ stdenv.mkDerivation {
1212

1313
src = fetch "openmp" "09kf41zgv551fnv628kqhlwgqkd2bkiwii9gqi6q12djgdddhmfv";
1414

15-
buildInputs = [ cmake llvm perl ];
15+
nativeBuildInputs = [ cmake perl ];
16+
buildInputs = [ llvm ];
1617

1718
enableParallelBuilding = true;
1819

‎pkgs/development/libraries/libdrm/default.nix

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind }:
1+
{ stdenv, fetchurl, pkgconfig, libpthreadstubs, libpciaccess, valgrind-light }:
22

33
stdenv.mkDerivation rec {
4-
name = "libdrm-2.4.79";
4+
name = "libdrm-2.4.81";
55

66
src = fetchurl {
77
url = "http://dri.freedesktop.org/libdrm/${name}.tar.bz2";
8-
sha256 = "c6aaf319293bce38023e9a637471b0f45c93c807d2a279060d741fc7a2e5b197";
8+
sha256 = "8cc05c195ac8708199979a94c4e4d1a928c14ec338ecbcb38ead09f54dae11ae";
99
};
1010

1111
outputs = [ "out" "dev" ];
1212

1313
nativeBuildInputs = [ pkgconfig ];
14-
buildInputs = [ libpthreadstubs libpciaccess ];
14+
buildInputs = [ libpthreadstubs libpciaccess valgrind-light ];
1515
# libdrm as of 2.4.70 does not actually do anything with udev.
1616

1717
patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch;
1818

1919
preConfigure = stdenv.lib.optionalString stdenv.isDarwin
2020
"echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache";
2121

22-
configureFlags = [ "--disable-valgrind" ]
22+
configureFlags = [ ]
2323
++ stdenv.lib.optionals (stdenv.isArm || stdenv.isAarch64) [ "--enable-tegra-experimental-api" "--enable-etnaviv-experimental-api" ]
2424
++ stdenv.lib.optional stdenv.isDarwin "-C";
2525

‎pkgs/development/libraries/libtasn1/default.nix

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ stdenv.mkDerivation rec {
88
sha256 = "00jsix5hny0g768zv4hk78dib7w0qmk5fbizf4jj37r51nd4s6k8";
99
};
1010

11+
patches = [
12+
(fetchurl {
13+
name = "CVE-2017-6891.patch";
14+
url = "https://git.savannah.gnu.org/gitweb/?p=libtasn1.git;a=patch;h=5520704d075802df25ce4ffccc010ba1641bd484";
15+
sha256 = "000r6wb87zkx8yhzkf1c3h7p5akwhjw51cv8f1yjnplrqqrr7h2k";
16+
})
17+
];
18+
1119
outputs = [ "out" "dev" "devdoc" ];
1220
outputBin = "dev";
1321

‎pkgs/development/libraries/mesa/default.nix

+6-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
, pkgconfig, intltool, autoreconfHook, substituteAll
33
, file, expat, libdrm, xorg, wayland, openssl
44
, llvmPackages, libffi, libomxil-bellagio, libva
5-
, libelf, libvdpau, python2
5+
, libelf, libvdpau
66
, grsecEnabled ? false
77
, enableRadv ? false
88
# Texture floats are patented, see docs/patents.txt, so we don't enable them for full Mesa.
@@ -36,7 +36,7 @@ let
3636
then ["nouveau" "freedreno" "vc4" "etnaviv" "imx"]
3737
else if stdenv.isAarch64
3838
then ["nouveau" "vc4" ]
39-
else ["i915" "ilo" "r300" "r600" "radeonsi" "nouveau"];
39+
else ["i915" "r300" "r600" "radeonsi" "nouveau"];
4040
defaultDriDrivers =
4141
if (stdenv.isArm || stdenv.isAarch64)
4242
then ["nouveau"]
@@ -67,7 +67,7 @@ let
6767
in
6868

6969
let
70-
version = "17.0.6";
70+
version = "17.1.1";
7171
branch = head (splitString "." version);
7272
driverLink = "/run/opengl-driver" + optionalString stdenv.isi686 "-32";
7373
in
@@ -82,7 +82,7 @@ stdenv.mkDerivation {
8282
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
8383
"https://launchpad.net/mesa/trunk/${version}/+download/mesa-${version}.tar.xz"
8484
];
85-
sha256 = "17d60jjzg4ddm95gk2cqx0xz6b9anmmz6ax4majwr3gis2yg7v49";
85+
sha256 = "aed503f94c0c1630a162a3e276f4ee12a86764cee4cb92338ea2dea99a04e7ef";
8686
};
8787

8888
prePatch = "patchShebangs .";
@@ -103,7 +103,7 @@ stdenv.mkDerivation {
103103
"--localstatedir=/var"
104104
"--with-dri-driverdir=$(drivers)/lib/dri"
105105
"--with-dri-searchpath=${driverLink}/lib/dri"
106-
"--with-egl-platforms=x11,wayland,drm"
106+
"--with-platforms=x11,wayland,drm"
107107
]
108108
++ (optional (galliumDrivers != [])
109109
("--with-gallium-drivers=" +
@@ -126,7 +126,7 @@ stdenv.mkDerivation {
126126
"--enable-glx"
127127
"--enable-glx-tls"
128128
"--enable-gallium-osmesa" # used by wine
129-
"--enable-gallium-llvm"
129+
"--enable-llvm"
130130
"--enable-egl"
131131
"--enable-xa" # used in vmware driver
132132
"--enable-gbm"
@@ -152,7 +152,6 @@ stdenv.mkDerivation {
152152
libX11 libXext libxcb libXt libXfixes libxshmfence
153153
libffi wayland libvdpau libelf libXvMC
154154
libomxil-bellagio libva libpthreadstubs openssl/*or another sha1 provider*/
155-
(python2.withPackages (ps: [ ps.Mako ]))
156155
];
157156

158157

‎pkgs/development/libraries/mesa/symlink-drivers.patch

+11-8
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ diff -ru -x '*~' mesa-12.0.3-orig/src/gallium/targets/dri/Makefile.am mesa-12.0.
1111
install-data-hook:
1212
for i in $(TARGET_DRIVERS); do \
1313
- ln -f $(DESTDIR)$(dridir)/gallium_dri.so \
14-
+ ln -srf $(DESTDIR)$(dridir)/gallium_dri.so \
14+
+ ln -srf $(DESTDIR)$(dridir)/gallium_dri.so \
1515
$(DESTDIR)$(dridir)/$${i}_dri.so; \
1616
done; \
17-
- $(RM) $(DESTDIR)$(dridir)/gallium_dri.*
18-
+ $(RM) $(DESTDIR)$(dridir)/gallium_dri.la
17+
- $(RM) $(DESTDIR)$(dridir)/gallium_dri.*; \
18+
+ $(RM) $(DESTDIR)$(dridir)/gallium_dri.la \
19+
$(RM) -d $(DESTDIR)$(dridir) &>/dev/null || true
1920

2021
uninstall-hook:
2122
for i in $(TARGET_DRIVERS); do \
@@ -60,8 +61,9 @@ diff -ru -x '*~' mesa-12.0.3-orig/src/gallium/targets/vdpau/Makefile.am mesa-12.
6061
ln -sf $${l} \
6162
$${dest_dir}/$${k}; \
6263
done; \
63-
- $(RM) $${dest_dir}/libvdpau_gallium.*
64-
+ $(RM) $${dest_dir}/libvdpau_gallium.la
64+
- $(RM) $${dest_dir}/libvdpau_gallium.*; \
65+
+ $(RM) $${dest_dir}/libvdpau_gallium.la \
66+
$(RM) -d $${dest_dir} &>/dev/null || true
6567

6668
uninstall-hook:
6769
for i in $(TARGET_DRIVERS); do \
@@ -73,16 +75,17 @@ diff -ru -x '*~' mesa-12.0.3-orig/src/gallium/targets/xvmc/Makefile.am mesa-12.0
7375
k=libXvMC$${i}.$(LIB_EXT); \
7476
l=$${k}.$(XVMC_MAJOR).$(XVMC_MINOR).0; \
7577
- ln -f $${dest_dir}/$${j}.$(XVMC_MAJOR).$(XVMC_MINOR).0 \
76-
+ ln -srf $${dest_dir}/$${j}.$(XVMC_MAJOR).$(XVMC_MINOR).0 \
78+
+ ln -srf $${dest_dir}/$${j}.$(XVMC_MAJOR).$(XVMC_MINOR).0 \
7779
$${dest_dir}/$${l}; \
7880
ln -sf $${l} \
7981
$${dest_dir}/$${k}.$(XVMC_MAJOR).$(XVMC_MINOR); \
8082
@@ -82,7 +82,7 @@
8183
ln -sf $${l} \
8284
$${dest_dir}/$${k}; \
8385
done; \
84-
- $(RM) $${dest_dir}/libXvMCgallium.*
85-
+ $(RM) $${dest_dir}/libXvMCgallium.la
86+
- $(RM) $${dest_dir}/libXvMCgallium.*; \
87+
+ $(RM) $${dest_dir}/libXvMCgallium.la \
88+
$(RM) -d $${dest_dir} &>/dev/null || true
8689

8790
uninstall-hook:
8891
for i in $(TARGET_DRIVERS); do \

‎pkgs/development/libraries/polkit/default.nix

+24-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey_17
2-
, gobjectIntrospection, libxslt, docbook_xsl, docbook_xml_dtd_412
3-
, useSystemd ? stdenv.isLinux, systemd }:
1+
{ stdenv, fetchurl, fetchpatch, autoreconfHook, pkgconfig, glib, expat, pam
2+
, intltool, spidermonkey_17 , gobjectIntrospection, libxslt, docbook_xsl
3+
, docbook_xml_dtd_412, gtk_doc
4+
, useSystemd ? stdenv.isLinux, systemd
5+
}:
46

57
let
68

@@ -22,11 +24,28 @@ stdenv.mkDerivation rec {
2224
sha256 = "109w86kfqrgz83g9ivggplmgc77rz8kx8646izvm2jb57h4rbh71";
2325
};
2426

27+
patches = [
28+
(fetchpatch {
29+
url = "http://pkgs.fedoraproject.org/cgit/rpms/polkit.git/plain/polkit-0.113-agent-leaks.patch?id=fa6fd575804de92886c95d3bc2b7eb2abcd13760";
30+
sha256 = "1cxnhj0y30g7ldqq1y6zwsbdwcx7h97d3mpd3h5jy7dhg3h9ym91";
31+
})
32+
(fetchpatch {
33+
url = "http://pkgs.fedoraproject.org/cgit/rpms/polkit.git/plain/polkit-0.113-polkitpermission-leak.patch?id=fa6fd575804de92886c95d3bc2b7eb2abcd13760";
34+
sha256 = "1h1rkd4avqyyr8q6836zzr3w10jf521gcqnvhrhzwdpgp1ay4si7";
35+
})
36+
(fetchpatch {
37+
url = "http://pkgs.fedoraproject.org/cgit/rpms/polkit.git/plain/polkit-0.113-itstool.patch?id=fa6fd575804de92886c95d3bc2b7eb2abcd13760";
38+
sha256 = "0bxmjwp8ahy1y5g1l0kxmld0l3mlvb2l0i5n1qabia3d5iyjkyfh";
39+
})
40+
];
41+
2542
outputs = [ "bin" "dev" "out" ]; # small man pages in $bin
2643

44+
nativeBuildInputs =
45+
[ gtk_doc pkgconfig autoreconfHook ]
46+
++ [ libxslt docbook_xsl docbook_xml_dtd_412 ]; # man pages
2747
buildInputs =
28-
[ pkgconfig glib expat pam intltool spidermonkey_17 gobjectIntrospection ]
29-
++ [ libxslt docbook_xsl docbook_xml_dtd_412 ] # man pages
48+
[ glib expat pam intltool spidermonkey_17 gobjectIntrospection ]
3049
++ stdenv.lib.optional useSystemd systemd;
3150

3251
# Ugly hack to overwrite hardcoded directories

‎pkgs/development/python-modules/ldap.nix

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ buildPythonPackage, isPy3k, fetchPypi
1+
{ lib, writeText, buildPythonPackage, isPy3k, fetchPypi
22
, openldap, cyrus_sasl, openssl }:
33

44
buildPythonPackage rec {
@@ -12,6 +12,28 @@ buildPythonPackage rec {
1212
sha256 = "88bab69e519dd8bd83becbe36bd141c174b0fe309e84936cf1bae685b31be779";
1313
};
1414

15+
# Needed by tests to setup a mockup ldap server.
16+
BIN = "${openldap}/bin";
17+
SBIN = "${openldap}/bin";
18+
SLAPD = "${openldap}/libexec/slapd";
19+
SCHEMA = "${openldap}/etc/schema";
20+
21+
patches = lib.singleton (writeText "avoid-syslog.diff" ''
22+
diff a/Lib/slapdtest.py b/Lib/slapdtest.py
23+
--- a/Lib/slapdtest.py
24+
+++ b/Lib/slapdtest.py
25+
@@ -60,7 +60,8 @@ def combined_logger(
26+
pass
27+
# for writing to syslog
28+
new_logger = logging.getLogger(log_name)
29+
- if sys_log_format:
30+
+ # /dev/log does not exist in nix build environment.
31+
+ if False:
32+
my_syslog_formatter = logging.Formatter(
33+
fmt=' '.join((log_name, sys_log_format)))
34+
my_syslog_handler = logging.handlers.SysLogHandler(
35+
'');
36+
1537
NIX_CFLAGS_COMPILE = "-I${cyrus_sasl.dev}/include/sasl";
1638
propagatedBuildInputs = [openldap cyrus_sasl openssl];
1739
}

‎pkgs/development/tools/rtags/default.nix

-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ stdenv.mkDerivation rec {
2222

2323
enableParallelBuilding = true;
2424

25-
postInstall = lib.optionalString stdenv.isDarwin ''
26-
for f in $out/bin/{rc,rdm,rp}; do
27-
install_name_tool -change @rpath/libclang.dylib ${llvmPackages.clang.cc}/lib/libclang.dylib ''${f}
28-
done
29-
'';
30-
3125
meta = {
3226
description = "C/C++ client-server indexer based on clang";
3327
homepage = https://github.com/andersbakken/rtags;

0 commit comments

Comments
 (0)
Please sign in to comment.