diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-13 19:17:00 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-13 19:17:00 -0600 |
commit | 73951bc0c8c02fabe97e645838a52a12618dcd8f (patch) | |
tree | ff4e31068bad8bed19dd69301cf812c77d9bd532 /pkgs/misc | |
parent | daf3297cb46f73522d021e22c4dc7e0eb6920333 (diff) | |
parent | 83d02fad5f9e2117309d00eeb3b99f355523c917 (diff) | |
download | nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.tar nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.tar.gz nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.tar.bz2 nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.tar.lz nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.tar.xz nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.tar.zst nixlib-73951bc0c8c02fabe97e645838a52a12618dcd8f.zip |
Merge pull request #50293 from matthewbauer/cleanups2
Add setup-hooks for scons and waf
Diffstat (limited to 'pkgs/misc')
-rw-r--r-- | pkgs/misc/emulators/dosbox/unstable.nix | 41 | ||||
-rw-r--r-- | pkgs/misc/emulators/fceux/default.nix | 10 | ||||
-rw-r--r-- | pkgs/misc/emulators/wxmupen64plus/default.nix | 13 | ||||
-rw-r--r-- | pkgs/misc/jackaudio/default.nix | 35 |
4 files changed, 24 insertions, 75 deletions
diff --git a/pkgs/misc/emulators/dosbox/unstable.nix b/pkgs/misc/emulators/dosbox/unstable.nix deleted file mode 100644 index e1762d66641a..000000000000 --- a/pkgs/misc/emulators/dosbox/unstable.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, fetchsvn, SDL, SDL_net, SDL_sound, libpng, makeDesktopItem, libGLU_combined, autoreconfHook }: - -let revision = "4025"; - revisionDate = "2017-07-02"; - revisionSha = "0hbghdlvm6qibp0df35qxq35km4nza3sm301x380ghamxq2vgy6a"; -in stdenv.mkDerivation rec { - name = "dosbox-unstable-${revisionDate}"; - - src = fetchsvn { - url = "https://dosbox.svn.sourceforge.net/svnroot/dosbox/dosbox/trunk"; - rev = revision; - sha256 = revisionSha; - }; - - hardeningDisable = [ "format" ]; - - nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ SDL SDL_net SDL_sound libpng libGLU_combined ]; - - desktopItem = makeDesktopItem { - name = "dosbox"; - exec = "dosbox"; - comment = "x86 emulator with internal DOS"; - desktopName = "DOSBox (SVN)"; - genericName = "DOS emulator"; - categories = "Application;Emulator;"; - }; - - postInstall = '' - mkdir -p $out/share/applications - cp ${desktopItem}/share/applications/* $out/share/applications - ''; - - meta = { - homepage = http://www.dosbox.com/; - description = "A DOS emulator"; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ binarin ]; - license = stdenv.lib.licenses.gpl2Plus; - }; -} diff --git a/pkgs/misc/emulators/fceux/default.nix b/pkgs/misc/emulators/fceux/default.nix index 70cf32d54cc2..13ebeb1d2a96 100644 --- a/pkgs/misc/emulators/fceux/default.nix +++ b/pkgs/misc/emulators/fceux/default.nix @@ -8,23 +8,23 @@ stdenv.mkDerivation { sha256 = "0gl2i3qdmcm7v9m5kpfz98w05d8m33990jiwka043ya7lflxvrjb"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig scons ]; buildInputs = [ - scons zlib SDL lua5_1 + zlib SDL lua5_1 ]; - phases = "unpackPhase buildPhase"; + sconsFlags = "OPENGL=false GTK=false CREATE_AVI=false LOGO=false"; + prefixKey = "--prefix="; # sed allows scons to find libraries in nix. # mkdir is a hack to make scons succeed. It still doesn't # actually put the files in there due to a bug in the SConstruct file. # OPENGL doesn't work because fceux dlopens the library. - buildPhase = '' + preBuild = '' sed -e 's/env *= *Environment *.*/&; env['"'"'ENV'"'"']=os.environ;/' -i SConstruct export CC="gcc" export CXX="g++" mkdir -p "$out" "$out/share/applications" "$out/share/pixmaps" - scons --prefix="$out" OPENGL=false GTK=false CREATE_AVI=false LOGO=false install ''; meta = { diff --git a/pkgs/misc/emulators/wxmupen64plus/default.nix b/pkgs/misc/emulators/wxmupen64plus/default.nix index 7be911763181..e63d27ec4039 100644 --- a/pkgs/misc/emulators/wxmupen64plus/default.nix +++ b/pkgs/misc/emulators/wxmupen64plus/default.nix @@ -1,4 +1,5 @@ -{stdenv, fetchurl, python, wxGTK29, mupen64plus, SDL, libX11, libGLU_combined}: +{ stdenv, fetchurl, python, wxGTK29, mupen64plus, SDL, libX11, libGLU_combined +, wafHook }: stdenv.mkDerivation { name = "wxmupen64plus-0.3"; @@ -7,23 +8,23 @@ stdenv.mkDerivation { sha256 = "1mnxi4k011dd300k35li2p6x4wccwi6im21qz8dkznnz397ps67c"; }; + nativeBuildInputs = [ wafHook ]; buildInputs = [ python wxGTK29 SDL libX11 libGLU_combined ]; - configurePhase = '' + preConfigure = '' tar xf ${mupen64plus.src} APIDIR=$(eval echo `pwd`/mupen64plus*/source/mupen64plus-core/src/api) export CXXFLAGS="-I${libX11.dev}/include/X11 -DLIBDIR=\\\"${mupen64plus}/lib/\\\"" export LDFLAGS="-lwx_gtk2u_adv-2.9" - python waf configure --mupenapi=$APIDIR --wxconfig=`type -P wx-config` --prefix=$out + + configureFlagsArray+=("--mupenapi=$APIDIR" "--wxconfig=`type -P wx-config`") ''; - buildPhase = "python waf"; - installPhase = "python waf install"; + NIX_CFLAGS_COMPILE = "-fpermissive"; meta = { description = "GUI for the Mupen64Plus 2.0 emulator"; license = stdenv.lib.licenses.gpl2Plus; homepage = https://bitbucket.org/auria/wxmupen64plus/wiki/Home; - broken = true; }; } diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index efd5aa4e9194..d264b7f3279b 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchFromGitHub, pkgconfig, python2Packages, makeWrapper , bash, libsamplerate, libsndfile, readline, eigen, celt +, wafHook # Darwin Dependencies , aften, AudioToolbox, CoreAudio, CoreFoundation @@ -35,13 +36,13 @@ stdenv.mkDerivation rec { sha256 = "0ynpyn0l77m94b50g7ysl795nvam3ra65wx5zb46nxspgbf6wnkh"; }; - nativeBuildInputs = [ pkgconfig python makeWrapper ]; + nativeBuildInputs = [ pkgconfig python makeWrapper wafHook ]; buildInputs = [ libsamplerate libsndfile readline eigen celt optDbus optPythonDBus optLibffado optAlsaLib optLibopus - ] ++ stdenv.lib.optionals stdenv.isDarwin [ aften AudioToolbox CoreAudio CoreFoundation ]; + ] ++ optionals stdenv.isDarwin [ aften AudioToolbox CoreAudio CoreFoundation ]; # CoreFoundation 10.10 doesn't include CFNotificationCenter.h yet. - patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin-cf.patch ]; + patches = optionals stdenv.isDarwin [ ./darwin-cf.patch ]; prePatch = '' substituteInPlace svnversion_regenerate.sh \ @@ -51,30 +52,18 @@ stdenv.mkDerivation rec { # It looks like one of the frameworks depends on <CoreFoundation/CFAttributedString.h> # since frameworks are impure we also have to use the impure CoreFoundation here. # FIXME: remove when CoreFoundation is updated to 10.11 - preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + preConfigure = optionalString stdenv.isDarwin '' export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE" ''; - configurePhase = '' - runHook preConfigure + configureFlags = [ + "--classic" + "--autostart=${if (optDbus != null) then "dbus" else "classic"}" + ] ++ optional (optDbus != null) "--dbus" + ++ optional (optLibffado != null) "--firewire" + ++ optional (optAlsaLib != null) "--alsa"; - python waf configure --prefix=$out \ - ${optionalString (optDbus != null) "--dbus"} \ - --classic \ - ${optionalString (optLibffado != null) "--firewire"} \ - ${optionalString (optAlsaLib != null) "--alsa"} \ - --autostart=${if (optDbus != null) then "dbus" else "classic"} \ - - runHook postConfigure - ''; - - buildPhase = '' - python waf build - ''; - - installPhase = '' - python waf install - '' + (if libOnly then '' + postInstall = (if libOnly then '' rm -rf $out/{bin,share} rm -rf $out/lib/{jack,libjacknet*,libjackserver*} '' else '' |