Skip to content

Commit 32916ab

Browse files
committedJun 11, 2017
Merge older staging
Enough rebuilds have finished on Hydra now.
2 parents d373b7b + cb9f953 commit 32916ab

File tree

19 files changed

+142
-68
lines changed

19 files changed

+142
-68
lines changed
 

‎nixos/modules/module-list.nix

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@
283283
./services/misc/etcd.nix
284284
./services/misc/felix.nix
285285
./services/misc/folding-at-home.nix
286+
./services/misc/fstrim.nix
286287
./services/misc/gammu-smsd.nix
287288
./services/misc/geoip-updater.nix
288289
#./services/misc/gitit.nix
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{ config, lib, pkgs, ... }:
2+
3+
with lib;
4+
5+
let
6+
7+
cfg = config.services.fstrim;
8+
9+
in {
10+
11+
options = {
12+
13+
services.fstrim = {
14+
enable = mkEnableOption "periodic SSD TRIM of mounted partitions in background";
15+
16+
interval = mkOption {
17+
type = types.string;
18+
default = "weekly";
19+
description = ''
20+
How often we run fstrim. For most desktop and server systems
21+
a sufficient trimming frequency is once a week.
22+
23+
The format is described in
24+
<citerefentry><refentrytitle>systemd.time</refentrytitle>
25+
<manvolnum>7</manvolnum></citerefentry>.
26+
'';
27+
};
28+
};
29+
30+
};
31+
32+
config = mkIf cfg.enable {
33+
34+
systemd.packages = [ pkgs.utillinux ];
35+
36+
systemd.timers.fstrim = {
37+
timerConfig = {
38+
OnCalendar = cfg.interval;
39+
};
40+
wantedBy = [ "timers.target" ];
41+
};
42+
43+
};
44+
45+
}

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

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
22
, fixDarwinDylibNames
3+
, enableManpages ? true
34
}:
45

56
let
@@ -15,25 +16,28 @@ let
1516
mv clang-tools-extra-* $sourceRoot/tools/extra
1617
'';
1718

18-
nativeBuildInputs = [ cmake python python.pkgs.sphinx ];
19+
nativeBuildInputs = [ cmake python ]
20+
++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
21+
1922
buildInputs = [ libedit libxml2 llvm ]
2023
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
2124

2225
cmakeFlags = [
2326
"-DCMAKE_CXX_FLAGS=-std=c++11"
27+
] ++ stdenv.lib.optionals enableManpages [
2428
"-DCLANG_INCLUDE_DOCS=ON"
2529
"-DLLVM_ENABLE_SPHINX=ON"
2630
"-DSPHINX_OUTPUT_MAN=ON"
2731
"-DSPHINX_OUTPUT_HTML=OFF"
2832
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
29-
] ++
33+
]
3034
# Maybe with compiler-rt this won't be needed?
31-
(stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
32-
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
35+
++ stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}"
36+
++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include";
3337

3438
patches = [ ./purity.patch ];
3539

36-
postBuild = ''
40+
postBuild = stdenv.lib.optionalString enableManpages ''
3741
cmake --build . --target docs-clang-man
3842
'';
3943

@@ -45,7 +49,8 @@ let
4549
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
4650
'';
4751

48-
outputs = [ "out" "man" "python" ];
52+
outputs = [ "out" "python" ]
53+
++ stdenv.lib.optional enableManpages "man";
4954

5055
# Clang expects to find LLVMgold in its own prefix
5156
# Clang expects to find sanitizer libraries in its own prefix
@@ -62,7 +67,8 @@ let
6267
mv $out/share/clang/*.py $python/share/clang
6368
6469
rm $out/bin/c-index-test
65-
70+
''
71+
+ stdenv.lib.optionalString enableManpages ''
6672
# Manually install clang manpage
6773
cp docs/man/*.1 $out/share/man/man1/
6874

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

+16-8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
, compiler-rt_src
1717
, libcxxabi
1818
, debugVersion ? false
19+
, enableManpages ? true
1920
, enableSharedLibraries ? true
2021
, darwin
2122
}:
@@ -38,9 +39,13 @@ in stdenv.mkDerivation rec {
3839
mv compiler-rt-* $sourceRoot/projects/compiler-rt
3940
'';
4041

41-
outputs = [ "out" "man" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
42+
outputs = [ "out" ]
43+
++ stdenv.lib.optional enableSharedLibraries "lib"
44+
++ stdenv.lib.optional enableManpages "man";
45+
46+
nativeBuildInputs = [ perl groff cmake python ]
47+
++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
4248

43-
nativeBuildInputs = [ perl groff cmake python python.pkgs.sphinx ];
4449
buildInputs = [ libxml2 libffi ]
4550
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi ];
4651

@@ -81,16 +86,19 @@ in stdenv.mkDerivation rec {
8186
"-DLLVM_ENABLE_FFI=ON"
8287
"-DLLVM_ENABLE_RTTI=ON"
8388
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code
89+
]
90+
++ stdenv.lib.optional enableSharedLibraries
91+
"-DLLVM_LINK_LLVM_DYLIB=ON"
92+
++ stdenv.lib.optionals enableManpages [
8493
"-DLLVM_BUILD_DOCS=ON"
8594
"-DLLVM_ENABLE_SPHINX=ON"
8695
"-DSPHINX_OUTPUT_MAN=ON"
8796
"-DSPHINX_OUTPUT_HTML=OFF"
8897
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
89-
] ++ stdenv.lib.optional enableSharedLibraries [
90-
"-DLLVM_LINK_LLVM_DYLIB=ON"
91-
] ++ stdenv.lib.optional (!isDarwin)
98+
]
99+
++ stdenv.lib.optional (!isDarwin)
92100
"-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
93-
++ stdenv.lib.optionals (isDarwin) [
101+
++ stdenv.lib.optionals (isDarwin) [
94102
"-DLLVM_ENABLE_LIBCXX=ON"
95103
"-DCAN_TARGET_i386=false"
96104
];
@@ -109,10 +117,10 @@ in stdenv.mkDerivation rec {
109117
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
110118
'';
111119

112-
postInstall = ''
120+
postInstall = stdenv.lib.optionalString enableManpages ''
113121
moveToOutput "share/man" "$man"
114122
''
115-
+ stdenv.lib.optionalString (enableSharedLibraries) ''
123+
+ stdenv.lib.optionalString enableSharedLibraries ''
116124
moveToOutput "lib/libLLVM-*" "$lib"
117125
moveToOutput "lib/libLLVM.${shlib}" "$lib"
118126
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \

‎pkgs/development/libraries/gnutls/3.5.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{ callPackage, fetchurl, libunistring, ... } @ args:
22

33
callPackage ./generic.nix (args // rec {
4-
version = "3.5.12";
4+
version = "3.5.13";
55

66
src = fetchurl {
77
url = "ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-${version}.tar.xz";
8-
sha256 = "1jspvrmydqgz30c1ji94b55gr2dynz7p96p4y8fkhad0xajkkjv3";
8+
sha256 = "15ihq6p0hnnhs8cnjrkj40dmlcaa1jjg8xg0g2ydbnlqs454ixbr";
99
};
1010

1111
# Skip two tests introduced in 3.5.11. Probable reasons of failure:

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

+2-11
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,9 @@ stdenv.mkDerivation ({
3333
echo Source root reset to ''${sourceRoot}
3434
'';
3535

36-
# This pre/postPatch shenanigans is to handle that the patches expect
37-
# to be outside of `source`.
38-
prePatch = ''
39-
pushd ..
40-
'';
41-
postPatch = ''
42-
popd
43-
patch -p4 < ${keywordFix}
44-
'';
36+
patchFlags = "-p4";
4537

46-
patches = [
47-
];
38+
patches = [ keywordFix ];
4839

4940
preConfigure = ''
5041
sed -i -e "s|/bin/sh|${stdenv.shell}|" configure

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ assert enableCapabilities -> stdenv.isLinux;
44

55
stdenv.mkDerivation rec {
66
name = "libgcrypt-${version}";
7-
version = "1.7.6";
7+
version = "1.7.7";
88

99
src = fetchurl {
1010
url = "mirror://gnupg/libgcrypt/${name}.tar.bz2";
11-
sha256 = "1g05prhgqw4ryd0w433q8nhds0h93kf47hfjagi2r7dghkpaysk2";
11+
sha256 = "16ndaj93asw122mwjz172x2ilpm03w1yp5mqcrp3xslk0yx5xf5r";
1212
};
1313

1414
outputs = [ "out" "dev" "info" ];

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{ stdenv, fetchurl, fetchpatch, pkgconfig, zlib, libjpeg, xz }:
22

33
let
4-
version = "4.0.7";
4+
version = "4.0.8";
55
in
66
stdenv.mkDerivation rec {
77
name = "libtiff-${version}";
88

99
src = fetchurl {
1010
url = "http://download.osgeo.org/libtiff/tiff-${version}.tar.gz";
11-
sha256 = "06ghqhr4db1ssq0acyyz49gr8k41gzw6pqb6mbn5r7jqp77s4hwz";
11+
sha256 = "0419mh6kkhz5fkyl77gv0in8x4d2jpdpfs147y8mj86rrjlabmsr";
1212
};
1313

1414
prePatch =let
15-
# https://lwn.net/Vulnerabilities/711777/ and more patched in *-6 -> *-7
1615
debian = fetchurl {
17-
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.7-6.debian.tar.xz;
18-
sha256 = "9c9048c28205bdbeb5ba36c7a194d0cd604bd137c70961607bfc8a079be5fa31";
16+
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.8-2.debian.tar.xz;
17+
sha256 = "1ssjh6vn9rvl2jwm34i3p89g8lj0c7fj3cziva9rj4vasfps58ng";
1918
};
2019
in ''
2120
tar xf '${debian}'

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ let
109109
in {
110110

111111
openssl_1_0_2 = common {
112-
version = "1.0.2k";
113-
sha256 = "1h6qi35w6hv6rd73p4cdgdzg732pdrfgpp37cgwz1v9a3z37ffbb";
112+
version = "1.0.2l";
113+
sha256 = "037kvpisc6qh5dkppcwbm5bg2q800xh2hma3vghz8xcycmdij1yf";
114114
};
115115

116116
openssl_1_1_0 = common {

‎pkgs/development/python-modules/bootstrapped-pip/default.nix

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, python, fetchPypi, makeWrapper, unzip }:
1+
{ stdenv, python, fetchPypi, fetchurl, makeWrapper, unzip }:
22

33
let
44
wheel_source = fetchPypi {
@@ -13,6 +13,15 @@ let
1313
format = "wheel";
1414
sha256 = "f2900e560efc479938a219433c48f15a4ff4ecfe575a65de385eeb44f2425587";
1515
};
16+
17+
# TODO: Shouldn't be necessary anymore for pip > 9.0.1!
18+
# https://github.com/NixOS/nixpkgs/issues/26392
19+
# https://github.com/pypa/setuptools/issues/885
20+
pkg_resources = fetchurl {
21+
url = https://raw.githubusercontent.com/pypa/setuptools/v36.0.1/pkg_resources/__init__.py;
22+
sha256 = "1wdnq3mammk75mifkdmmjx7yhnpydvnvi804na8ym4mj934l2jkv";
23+
};
24+
1625
in stdenv.mkDerivation rec {
1726
pname = "pip";
1827
version = "9.0.1";
@@ -29,6 +38,8 @@ in stdenv.mkDerivation rec {
2938
unzip -d $out/${python.sitePackages} $src
3039
unzip -d $out/${python.sitePackages} ${setuptools_source}
3140
unzip -d $out/${python.sitePackages} ${wheel_source}
41+
# TODO: Shouldn't be necessary anymore for pip > 9.0.1!
42+
cp ${pkg_resources} $out/${python.sitePackages}/pip/_vendor/pkg_resources/__init__.py
3243
'';
3344

3445
patchPhase = ''

‎pkgs/development/tools/build-managers/cmake/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# darwin attributes
44
, ps
55
, isBootstrap ? false
6-
, useSharedLibraries ? !stdenv.isCygwin
6+
, useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
77
, useNcurses ? false, ncurses
88
, useQt4 ? false, qt4
99
}:

‎pkgs/os-specific/linux/nfs-utils/default.nix

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ in stdenv.mkDerivation rec {
3939
sed -i "s,^PATH=.*,PATH=$out/bin:${statdPath}," utils/statd/start-statd
4040
4141
configureFlags="--with-start-statd=$out/bin/start-statd $configureFlags"
42+
43+
substituteInPlace utils/mount/Makefile.in \
44+
--replace "chmod 4511" "chmod 0511"
4245
'';
4346

4447
makeFlags = [

‎pkgs/os-specific/linux/shadow/default.nix

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
4141
})
4242
];
4343

44+
# The nix daemon often forbids even creating set[ug]id files.
45+
postPatch =
46+
''sed 's/^\(s[ug]idperms\) = [0-9]755/\1 = 0755/' -i src/Makefile.am
47+
'';
48+
4449
outputs = [ "out" "su" "man" ];
4550

4651
enableParallelBuilding = true;

‎pkgs/os-specific/linux/util-linux/default.nix

+14-15
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,30 @@ stdenv.mkDerivation rec {
2929
preConfigure = "export scanf_cv_type_modifier=ms";
3030
};
3131

32+
preConfigure = lib.optionalString (systemd != null) ''
33+
configureFlags+=" --with-systemd --with-systemdsystemunitdir=$bin/lib/systemd/system/"
34+
'';
35+
3236
# !!! It would be better to obtain the path to the mount helpers
3337
# (/sbin/mount.*) through an environment variable, but that's
3438
# somewhat risky because we have to consider that mount can setuid
3539
# root...
36-
configureFlags = ''
37-
--enable-write
38-
--enable-last
39-
--enable-mesg
40-
--disable-use-tty-group
41-
--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin
42-
${if ncurses == null then "--without-ncurses" else ""}
43-
${if systemd == null then "" else ''
44-
--with-systemd
45-
--with-systemdsystemunitdir=$out/lib/systemd/system/
46-
''}
47-
'';
40+
configureFlags = [
41+
"--enable-write"
42+
"--enable-last"
43+
"--enable-mesg"
44+
"--disable-use-tty-group"
45+
"--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin"
46+
"--disable-makeinstall-setuid" "--disable-makeinstall-chown"
47+
]
48+
++ lib.optional (ncurses == null) "--without-ncurses";
4849

4950
makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
5051

5152
nativeBuildInputs = [ pkgconfig ];
5253
buildInputs =
5354
[ zlib pam ]
54-
++ lib.optional (ncurses != null) ncurses
55-
++ lib.optional (systemd != null) systemd
56-
++ lib.optional (perl != null) perl;
55+
++ lib.filter (p: p != null) [ ncurses systemd perl ];
5756

5857
postInstall = ''
5958
rm "$bin/bin/su" # su should be supplied by the su package (shadow)

‎pkgs/stdenv/darwin/default.nix

+6-6
Original file line numberDiff line numberDiff line change
@@ -233,11 +233,11 @@ in rec {
233233
libcxxabi libcxx ncurses libffi zlib gmp pcre gnugrep
234234
coreutils findutils diffutils patchutils;
235235

236-
llvmPackages = let llvmOverride = llvmPackages.llvm.override { inherit libcxxabi; };
237-
in super.llvmPackages // {
238-
llvm = llvmOverride;
239-
clang-unwrapped = llvmPackages.clang-unwrapped.override { llvm = llvmOverride; };
240-
};
236+
llvmPackages = let llvmOverride = llvmPackages.llvm.override { enableManpages = false; inherit libcxxabi; }; in
237+
super.llvmPackages // {
238+
llvm = llvmOverride;
239+
clang-unwrapped = llvmPackages.clang-unwrapped.override { enableManpages = false; llvm = llvmOverride; };
240+
};
241241

242242
darwin = super.darwin // {
243243
inherit (darwin) dyld Libsystem libiconv locale;
@@ -313,7 +313,7 @@ in rec {
313313
xz.out xz.bin libcxx libcxxabi gmp.out gnumake findutils bzip2.out
314314
bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
315315
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
316-
gnugrep llvmPackages.clang-unwrapped llvmPackages.clang-unwrapped.man patch pcre.out binutils-raw.out
316+
gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
317317
binutils-raw.dev binutils gettext
318318
]) ++ (with pkgs.darwin; [
319319
dyld Libsystem CF cctools ICU libiconv locale

0 commit comments

Comments
 (0)
Please sign in to comment.