Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Jun 22, 2016
2 parents f073df6 + ebf1cb2 commit c05d829
Show file tree
Hide file tree
Showing 51 changed files with 431 additions and 200 deletions.
8 changes: 4 additions & 4 deletions nixos/lib/testing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ rec {
--add-flags "$vms" \
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
--run "testScript=\"\$(cat $out/test-script)\"" \
--set testScript '"$testScript"' \
--set VLANS '"${toString vlans}"'
--set testScript '$testScript' \
--set VLANS '${toString vlans}'
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
wrapProgram $out/bin/nixos-run-vms \
--add-flags "$vms" \
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
--set tests '"startAll; joinAll;"' \
--set VLANS '"${toString vlans}"' \
--set tests 'startAll; joinAll;' \
--set VLANS '${toString vlans}' \
${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"}
''; # "

Expand Down
1 change: 1 addition & 0 deletions pkgs/applications/graphics/leocad/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
buildInputs = [ qt4 qmake4Hook zlib ];

postPatch = ''
sed '1i#include <cmath>' -i common/camera.cpp
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
'';
Expand Down
12 changes: 8 additions & 4 deletions pkgs/applications/graphics/photivo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ stdenv.mkDerivation rec {
sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h";
};

nativeBuildInputs = [ cmake pkgconfig ];

buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];
patchPhase = '' # kinda icky
postPatch = '' # kinda icky
sed -e '/("@INSTALL@")/d' \
-e s,@INSTALL@,$out/share/photivo, \
-i Sources/ptSettings.cpp
sed '1i#include <math.h>' -i Sources/filters/ptFilter_StdCurve.cpp
'';

nativeBuildInputs = [ cmake pkgconfig ];

buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];

enableParallelBuilding = true;

meta = with stdenv.lib; {
platforms = platforms.linux;
maintainers = [ maintainers.mornfall ];
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/misc/cli-visualizer/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "16768gyi85mkizfn874q2q9xf32knw08z27si3k5bk99492dxwzw";
};

postPatch = ''
sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
'';

buildInputs = [ fftw ncurses libpulseaudio ];

buildFlags = [ "ENABLE_PULSE=1" ];
Expand Down
2 changes: 2 additions & 0 deletions pkgs/applications/misc/termite/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ let
sha256 = "1cw4yw7n9m2si8b7zcfyz9pyihncabxm5g39v1mxslfajxgwzmd8";
};

postPatch = "sed '1i#include <math.h>' -i termite.cc";

makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];

buildInputs = [ pkgconfig vte gtk3 ncurses ];
Expand Down
5 changes: 5 additions & 0 deletions pkgs/applications/science/robotics/qgroundcontrol/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ stdenv.mkDerivation rec {
] ++ qtInputs;

patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ];
postPatch = ''
sed '1i#include <cmath>' -i src/Vehicle/Vehicle.cc \
-i src/comm/{QGCFlightGearLink,QGCJSBSimLink}.cc \
-i src/{uas/UAS,ui/QGCDataPlot2D}.cc
'';

preConfigure = ''
mkdir build
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/video/simplescreenrecorder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ stdenv.mkDerivation rec {
sha256 = "1d89ncspjd8c4mckf0nb6y3hrxpv4rjpbj868pznhvfmdgr5nvql";
};

postPatch = "sed '1i#include <random>' -i src/Benchmark.cpp";

buildInputs = [
alsaLib ffmpeg libjack2 libX11 libXext libXfixes mesa pkgconfig
libpulseaudio qt4
];

enableParallelBuilding = true;

meta = with stdenv.lib; {
description = "A screen recorder for Linux";
homepage = http://www.maartenbaert.be/simplescreenrecorder;
Expand Down
9 changes: 8 additions & 1 deletion pkgs/applications/virtualization/virtualbox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,14 @@ in stdenv.mkDerivation {
set +x
'';

patches = optional enableHardening ./hardened.patch;
patches = optional enableHardening ./hardened.patch
++ [
(fetchurl rec {
name = "fix-detect-gcc-5.4.patch";
url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=827193;filename=${name};msg=5";
sha256 = "0y6v5dc6fqj9iv27cl8q2g87v1kxg19129mpas4vjg7g0529v4g9";
})
];

postPatch = ''
sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ stdenv.mkDerivation {
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
echo "${libc_lib}" > $out/nix-support/orig-libc
echo "${libc_dev}" > $out/nix-support/orig-libc-dev
''

+ (if nativeTools then ''
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/gcc-cross-wrapper/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ chmod +x "$out/bin/$crossConfig-ld"
# Glibc.
test -n "$gcc" && echo $gcc > $out/nix-support/orig-cc
test -n "$libc" && echo $libc > $out/nix-support/orig-libc
test -n "$libc_dev" && echo $libc_dev > $out/nix-support/orig-libc-dev

doSubstitute "$addFlags" "$out/nix-support/add-flags"

Expand Down
4 changes: 3 additions & 1 deletion pkgs/build-support/gcc-cross-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ stdenv.mkDerivation {
ldWrapper = ./ld-wrapper.sh;
utils = ./utils.sh;
addFlags = ./add-flags;
inherit nativeTools nativeLibc nativePrefix gcc libc binutils;
inherit nativeTools nativeLibc nativePrefix gcc binutils;
libc = if libc ? out then libc.out else libc;
libc_dev = if libc ? dev then libc.dev else libc;
crossConfig = if cross != null then cross.config else null;
osxMinVersion = cross.osxMinVersion or null;
gccLibs = if gcc != null then gccLibs else null;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/setup-hooks/make-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ makeWrapper() {
varName=${params[$((n + 1))]}
value=${params[$((n + 2))]}
n=$((n + 2))
echo "export $varName=$value" >> $wrapper
echo "export $varName=\"$value\"" >> $wrapper
fi

if test "$p" = "--unset"; then
Expand Down
1 change: 1 addition & 0 deletions pkgs/build-support/trivial-builders.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rec {
runCommand = name: env: buildCommand:
stdenv.mkDerivation ({
inherit name buildCommand;
passAsFile = [ "buildCommand" ];
} // env);


Expand Down
6 changes: 3 additions & 3 deletions pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
let

common = { pname, sha256 }: stdenv.mkDerivation rec {
name = "${pname}-1.78.1";
name = "${pname}-1.79.1";

src = fetchurl {
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
Expand Down Expand Up @@ -35,12 +35,12 @@ in {

docbook_xsl = common {
pname = "docbook-xsl";
sha256 = "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9";
sha256 = "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj";
};

docbook_xsl_ns = common {
pname = "docbook-xsl-ns";
sha256 = "1x3sc0axk9z3i6n0jhlsmzlmb723a4sjgslm9g12by6phirdx3ng";
sha256 = "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin";
};

}
3 changes: 3 additions & 0 deletions pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ plasmaPackage rec {
})
./0003-tzdir.patch
];
postPatch = ''
sed '1i#include <cmath>' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
'';
NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ];
cmakeFlags = [
"-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg"
Expand Down
38 changes: 26 additions & 12 deletions pkgs/development/compilers/gcc/4.5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ stdenv.mkDerivation ({
sed -i "${gnu_h}" \
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
sed -i "${gnu_h}" \
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
sed -i gcc/config/t-gnu \
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g'
''
else if cross != null || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
Expand All @@ -197,18 +197,18 @@ stdenv.mkDerivation ({
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
echo " fixing \`$header'..."
sed -i "$header" \
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
done
''
else null;

inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
libcCross crossMingw;

nativeBuildInputs = [ texinfo which ]
nativeBuildInputs = [ texinfo which gettext ]
++ optional (perl != null) perl;

buildInputs = [ gmp mpfr libmpc libelf gettext ]
buildInputs = [ gmp mpfr libmpc libelf ]
++ (optional (ppl != null) ppl)
++ (optional (cloogppl != null) cloogppl)
++ (optional (zlib != null) zlib)
Expand Down Expand Up @@ -284,6 +284,7 @@ stdenv.mkDerivation ({
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
--with-gmp=${gmp.crossDrv}
--with-mpfr=${mpfr.crossDrv}
--with-mpc=${libmpc.crossDrv}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
Expand Down Expand Up @@ -346,15 +347,28 @@ stdenv.mkDerivation ({
++ optional (libpthread != null) libpthread)));

EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null
then "-idirafter ${libcCross}/include"
if cross != null && libcCross != null then [
"-idirafter ${libcCross.dev}/include"
]
++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib"
]
else null;

EXTRA_TARGET_LDFLAGS =
if cross != null && libcCross != null
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
(optionalString (libpthreadCross != null)
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
if cross != null && libcCross != null then [
"-Wl,-L${libcCross.out}/lib"
]
++ (if crossStageStatic then [
"-B${libcCross.out}/lib"
] else [
"-Wl,-rpath,${libcCross.out}/lib"
"-Wl,-rpath-link,${libcCross.out}/lib"
])
++ optionals (libpthreadCross != null) [
"-L${libpthreadCross}/lib"
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
]
else null;

passthru = { inherit langC langCC langAda langFortran langVhdl
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/compilers/gcc/4.6/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ postInstall() {
# Move runtime libraries to $lib.
mkdir -p $lib/lib
ln -s lib $lib/lib64
mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/
moveToOutput "lib/lib*.so" "$lib"
moveToOutput "lib/lib*.so.*[0-9]" "$lib"
moveToOutput "lib/*.la" "$lib"
for i in $lib/lib/*.la; do
substituteInPlace $i --replace $out $lib
done
Expand Down
34 changes: 24 additions & 10 deletions pkgs/development/compilers/gcc/4.6/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ stdenv.mkDerivation ({
sed -i "${gnu_h}" \
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
sed -i "${gnu_h}" \
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
sed -i gcc/config/t-gnu \
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g'
''
else if cross != null || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
Expand All @@ -247,7 +247,7 @@ stdenv.mkDerivation ({
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
echo " fixing \`$header'..."
sed -i "$header" \
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
done
''
else null;
Expand Down Expand Up @@ -357,6 +357,7 @@ stdenv.mkDerivation ({
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
--with-gmp=${gmp.crossDrv}
--with-mpfr=${mpfr.crossDrv}
--with-mpc=${libmpc.crossDrv}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
Expand Down Expand Up @@ -421,15 +422,28 @@ stdenv.mkDerivation ({
++ optional (libpthread != null) libpthread)));

EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null
then "-idirafter ${libcCross}/include"
if cross != null && libcCross != null then [
"-idirafter ${libcCross.dev}/include"
]
++ optionals (! crossStageStatic) [
"-B${libcCross.out}/lib"
]
else null;

EXTRA_TARGET_LDFLAGS =
if cross != null && libcCross != null
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
(optionalString (libpthreadCross != null)
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
if cross != null && libcCross != null then [
"-Wl,-L${libcCross.out}/lib"
]
++ (if crossStageStatic then [
"-B${libcCross.out}/lib"
] else [
"-Wl,-rpath,${libcCross.out}/lib"
"-Wl,-rpath-link,${libcCross.out}/lib"
])
++ optionals (libpthreadCross != null) [
"-L${libpthreadCross}/lib"
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
]
else null;

passthru = { inherit langC langCC langAda langFortran langVhdl
Expand Down
Loading

0 comments on commit c05d829

Please sign in to comment.