Merge remote-tracking branch 'upstream/master' into hardened-stdenv

This commit is contained in:
Robin Gloster
2016-04-18 13:49:22 +00:00
1369 changed files with 35810 additions and 10571 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
};
cmakeFlags = ''
-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include
-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include
-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include
-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include
-DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0
-DCMAKE_BUILD_TYPE=Release
-DENABLE_LTO=True
+2 -2
View File
@@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
};
cmakeFlags = ''
-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib}/lib/glib-2.0/include
-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2}/lib/gtk-2.0/include
-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include
-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include
-DGTK2_INCLUDE_DIRS=${gtk2}/include/gtk-2.0
-DCMAKE_BUILD_TYPE=Release
-DENABLE_LTO=True
@@ -1,26 +1,23 @@
diff -rupN higan_v095-source.orig/GNUmakefile higan_v095-source/GNUmakefile
--- higan_v095-source.orig/GNUmakefile 2015-11-04 10:28:26.173428178 +0100
+++ higan_v095-source/GNUmakefile 2015-11-04 10:28:31.752231593 +0100
@@ -12,7 +12,8 @@ target := tomoko
# console := true
# compiler
-flags += -I. -O3
+flags += -I. $(CXXFLAGS)
+link += $(LDFLAGS)
objects := libco
# profile-guided optimization mode
diff -rupN higan_v095-source.orig/icarus/GNUmakefile higan_v095-source/icarus/GNUmakefile
--- higan_v095-source.orig/icarus/GNUmakefile 2015-11-04 10:28:26.186486119 +0100
+++ higan_v095-source/icarus/GNUmakefile 2015-11-04 10:28:48.755059317 +0100
@@ -1,8 +1,8 @@
include ../nall/GNUmakefile
include ../hiro/GNUmakefile
-flags += -I.. -O3
-link +=
+flags += -I.. $(CXXFLAGS)
+link += $(LDFLAGS)
objects := obj/hiro.o obj/icarus.o
objects += $(if $(call streq,$(platform),windows),obj/resource.o)
diff -rupN higan_v097-source.old/higan/GNUmakefile higan_v097-source/higan/GNUmakefile
--- higan_v097-source.old/higan/GNUmakefile 2016-01-24 09:21:45.822940200 +0100
+++ higan_v097-source/higan/GNUmakefile 2016-01-24 09:24:03.028722500 +0100
@@ -36,7 +36,7 @@ ifeq ($(platform),windows)
else ifeq ($(platform),macosx)
flags += -march=native
else ifneq ($(filter $(platform),linux bsd),)
- flags += -march=native -fopenmp
+ flags += -fopenmp
link += -fopenmp
link += -Wl,-export-dynamic
link += -lX11 -lXext
diff -rupN higan_v097-source.old/nall/GNUmakefile higan_v097-source/nall/GNUmakefile
--- higan_v097-source.old/nall/GNUmakefile 2016-01-24 09:21:46.021749600 +0100
+++ higan_v097-source/nall/GNUmakefile 2016-01-24 09:25:06.347100800 +0100
@@ -40,8 +40,8 @@ cflags := -x c -std=c99
objcflags := -x objective-c -std=c99
cppflags := -x c++ -std=c++14
objcppflags := -x objective-c++ -std=c++14
-flags :=
-link :=
+flags := $(CXXFLAGS)
+link := $(LDFLAGS)
+16 -17
View File
@@ -5,18 +5,18 @@
, mesa, SDL
, libao, openal, libpulseaudio
, gtk, gtksourceview
, profile ? "balanced" # Options: accuracy, balanced, performance
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "higan-${meta.version}";
sourceName = "higan_v${meta.version}-source";
name = "higan-${version}";
version = "098";
sourceName = "higan_v${version}-source";
src = fetchurl {
urls = [ "http://download.byuu.org/${sourceName}.7z" ];
sha256 = "0yc5gwg6dq9iwi2qk3g66wn8j2l55nhdb0311jzmdsh86zcrpvqh";
sha256 = "0qphvjfv17dbmzgb4pny2q6ln0lsgzyhalq6qyqxc3qwm4fzdjv1";
curlOpts = "--user-agent 'Mozilla/5.0'"; # the good old user-agent trick...
};
@@ -31,18 +31,17 @@ stdenv.mkDerivation rec {
'';
buildPhase = ''
make compiler=c++ profile=${profile} -C icarus
make compiler=c++ profile=${profile}
make compiler=c++ -C icarus
make compiler=c++ -C higan
'';
installPhase = ''
install -dm 755 $out/bin $out/share/applications $out/share/higan $out/share/pixmaps
install -m 755 icarus/icarus $out/bin/
install -m 755 out/tomoko $out/bin/
(cd $out/bin; ln -Ts tomoko higan) #backwards compatibility
install -m 644 data/higan.desktop $out/share/applications/
install -m 644 data/higan.png $out/share/pixmaps/
cp -dr --no-preserve='ownership' profile/* data/cheats.bml $out/share/higan/
install -m 755 icarus/out/icarus $out/bin/
install -m 755 higan/out/higan $out/bin/
install -m 644 higan/data/higan.desktop $out/share/applications/
install -m 644 higan/data/higan.png $out/share/pixmaps/
cp --recursive --no-dereference --preserve='links' --no-preserve='ownership' higan/data/cheats.bml higan/profile/* $out/share/higan/
'';
fixupPhase = ''
@@ -54,21 +53,22 @@ stdenv.mkDerivation rec {
cat <<EOF > $out/bin/higan-init.sh
#!${stdenv.shell}
cp --update --recursive $out/share/higan \$HOME/.config
chmod --recursive u+w \$HOME/.config/higan
cp --update $out/share/higan/cheats.bml \$HOME/.config/
cp --recursive --update $out/share/higan/*.sys \$HOME/.local/share/higan/
EOF
chmod +x $out/bin/higan-init.sh
'';
meta = {
version = "096";
description = "An open-source, cycle-accurate Nintendo multi-system emulator";
longDescription = ''
Higan (formerly bsnes) is a Nintendo multi-system emulator.
It currently supports the following systems:
Famicom; Super Famicom;
Game Boy; Game Boy Color; Game Boy Advance
WonderSwan; WonderSwan Color
higan also supports the following subsystems:
Super Game Boy; BS-X Satellaview; Sufami Turbo
'';
@@ -82,5 +82,4 @@ stdenv.mkDerivation rec {
#
# TODO:
# - fix the BML and BIOS paths - maybe submitting
# a custom patch to Higan project would not be a bad idea...
# - Qt support
# a custom patch to upstream would not be a bad idea...
+10 -10
View File
@@ -1,22 +1,23 @@
{ stdenv, fetchurl, pkgconfig, cmake, ffmpeg, imagemagick, libzip, SDL2
{ stdenv, fetchgit
, pkgconfig, cmake, libzip, epoxy, ffmpeg, imagemagick, SDL2
, qtbase, qtmultimedia }:
stdenv.mkDerivation rec {
name = "mgba-${meta.version}";
src = fetchurl {
url = "https://github.com/mgba-emu/mgba/archive/${meta.version}.tar.gz";
sha256 = "0z52w4dkgjjviwi6w13gls082zclljgx1sa8nlyb1xcnnrn6980l";
name = "mgba-git-${version}";
version = "20160325";
src = fetchgit {
url = "https://github.com/mgba-emu/mgba.git";
rev = "be2641c77b4a438e0db487bc82b43bc27a26e0c2";
sha256 = "0ygsmmp24w14x5fm2qz2v68p59bs2ravn22axrg2ipn5skkgrvxz";
};
buildInputs = [
pkgconfig cmake ffmpeg imagemagick libzip SDL2
pkgconfig cmake libzip epoxy ffmpeg imagemagick SDL2
qtbase qtmultimedia
];
enableParallelBuilding = true;
meta = with stdenv.lib; {
version = "0.3.1";
homepage = https://mgba.io;
description = "A modern GBA emulator with a focus on accuracy";
longDescription = ''
@@ -38,4 +39,3 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ MP2E AndersonTorres ];
};
}
+3 -2
View File
@@ -24,12 +24,13 @@ stdenv.mkDerivation rec {
-DCMAKE_BUILD_PO=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$out" \
-DDISABLE_ADVANCE_SIMD=TRUE \
-DDISABLE_PCSX2_WRAPPER=TRUE \
-DDOC_DIR="$out/share/doc/pcsx2" \
-DGAMEINDEX_DIR="$out/share/pcsx2" \
-DGLSL_SHADER_DIR="$out/share/pcsx2" \
-DGTK2_GLIBCONFIG_INCLUDE_DIR='${glib}/lib/glib-2.0/include' \
-DGTK2_GDKCONFIG_INCLUDE_DIR='${gtk2}/lib/gtk-2.0/include' \
-DGTK2_GLIBCONFIG_INCLUDE_DIR='${glib.out}/lib/glib-2.0/include' \
-DGTK2_GDKCONFIG_INCLUDE_DIR='${gtk2.out}/lib/gtk-2.0/include' \
-DGTK2_INCLUDE_DIRS='${gtk2}/include/gtk-2.0' \
-DPACKAGE_MODE=TRUE \
-DPLUGIN_DIR="$out/lib/pcsx2" \
+1 -1
View File
@@ -207,7 +207,7 @@ in
extraBuildInputs = [ libpng SDL ];
}).override {
patchPhase = "sed -i -e 's,SDL_CONFIG=\".*\",SDL_CONFIG=\"${SDL}/bin/sdl-config\",' configure";
patchPhase = "sed -i -e 's,SDL_CONFIG=\".*\",SDL_CONFIG=\"${SDL.dev}/bin/sdl-config\",' configure";
configurePhase = "./configure";
};
+19 -8
View File
@@ -1,5 +1,6 @@
{ stdenv, lib, pkgArches,
name, version, src, monos, geckos, platforms,
pkgconfig, fontforge, makeWrapper, flex, bison,
pulseaudioSupport,
buildScript ? null, configureFlags ? ""
}:
@@ -14,29 +15,39 @@ stdenv.mkDerivation ((lib.optionalAttrs (! isNull buildScript) {
}) // rec {
inherit name src configureFlags;
buildInputs = toBuildInputs pkgArches (pkgs: with pkgs; [
pkgconfig alsaLib lcms2 fontforge libxml2 libxslt makeWrapper flex bison
]);
nativeBuildInputs = [
pkgconfig fontforge makeWrapper flex bison
];
nativeBuildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
buildInputs = toBuildInputs pkgArches (pkgs: (with pkgs; [
freetype fontconfig mesa mesa_noglu.osmesa libdrm libpng libjpeg openssl gnutls cups ncurses
alsaLib libxml2 libxslt lcms2 gettext dbus mpg123 openal
])
++ lib.optional pulseaudioSupport pkgs.libpulseaudio
++ (with pkgs.xorg; [
xlibsWrapper libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite
libXi libXcursor libXinerama libXrandr libXrender libXxf86vm libXcomposite libXext
]));
# Wine locates a lot of libraries dynamically through dlopen(). Add
# them to the RPATH so that the user doesn't have to set them in
# LD_LIBRARY_PATH.
NIX_LDFLAGS = map
(path: "-rpath ${path}/lib")
([ stdenv.cc.cc ] ++ nativeBuildInputs);
NIX_LDFLAGS = map (path: "-rpath " + path) (
map (x: "${x}/lib") ([ stdenv.cc.cc ] ++ (map (x: x.lib or x.out) buildInputs))
# libpulsecommon.so is linked but not found otherwise
++ lib.optionals pulseaudioSupport (map (x: "${x}/lib/pulseaudio") (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ])))
);
# Don't shrink the ELF RPATHs in order to keep the extra RPATH
# elements specified above.
dontPatchELF = true;
# Disable stripping to avoid breaking placeholder DLLs/EXEs.
# Symptoms of broken placeholders are: when the wineprefix is created
# drive_c/windows/system32 will only contain a few files instead of
# hundreds, there will be an error about winemenubuilder and MountMgr
# on startup of Wine, and the Drives tab in winecfg will show an error.
dontStrip = true;
## FIXME
# Add capability to ignore known failing tests
# and enable doCheck
+13 -9
View File
@@ -1,32 +1,36 @@
{ system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage,
{ system, stdenv, stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage, callPackage_i686,
overrideCC, wrapCCMulti, gcc49,
pulseaudioSupport,
wineRelease ? "stable"
}:
let src = lib.getAttr wineRelease (callPackage ./sources.nix {});
in with src; {
wine32 = import ./base.nix {
wine32 = callPackage_i686 ./base.nix {
name = "wine-${version}";
inherit src version pulseaudioSupport;
inherit (pkgsi686Linux) lib stdenv;
pkgArches = [ pkgsi686Linux ];
geckos = [ gecko32 ];
monos = [ mono ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
wine64 = import ./base.nix {
wine64 = callPackage ./base.nix {
name = "wine64-${version}";
inherit src version pulseaudioSupport lib stdenv;
inherit src version pulseaudioSupport;
# FIXME: drop this when GCC is updated to >5.3.
# Corresponding bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140
stdenv = overrideCC stdenv gcc49;
pkgArches = [ pkgs ];
geckos = [ gecko64 ];
monos = [ mono ];
configureFlags = "--enable-win64";
configureFlags = [ "--enable-win64" ];
platforms = [ "x86_64-linux" ];
};
wineWow = import ./base.nix {
wineWow = callPackage ./base.nix {
name = "wine-wow-${version}";
inherit src version pulseaudioSupport lib;
stdenv = stdenv_32bit;
inherit src version pulseaudioSupport;
# FIXME: see above.
stdenv = overrideCC stdenv_32bit (wrapCCMulti gcc49);
pkgArches = [ pkgs pkgsi686Linux ];
geckos = [ gecko32 gecko64 ];
monos = [ mono ];
+3 -3
View File
@@ -30,9 +30,9 @@ in rec {
};
unstable = fetchurl rec {
version = "1.9.4";
version = "1.9.7";
url = "mirror://sourceforge/wine/wine-${version}.tar.bz2";
sha256 = "1f5v1gns0xs512a6ym785cn29j8dxdbnxnvkg8v0p1w0p6vfmhbm";
sha256 = "1v47i0pxqcixnh06x23kzp2dbz1cf3d2sric0bw6xqh54ph5yw29";
inherit (stable) mono;
gecko32 = fetchurl rec {
version = "2.44";
@@ -48,7 +48,7 @@ in rec {
staging = fetchFromGitHub rec {
inherit (unstable) version;
sha256 = "0xjxbip0ab1lqgxrww08082ndsb8b5wjfwlf51zlr3f59c9bx9y5";
sha256 = "1h5hwd07qyx0qw5whf6lcp7v57kqd6mrrcvwwg1bydir68b0zp16";
owner = "wine-compholio";
repo = "wine-staging";
rev = "v${version}";