summary refs log tree commit diff
path: root/pkgs/misc/jackaudio/default.nix
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-11-11 15:20:41 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2018-11-13 19:13:48 -0600
commitf2a20b6e520989bc2c01d362c31fa94cbf6bee52 (patch)
treea18463cd63f58a9c217f1d6160315c75ba2a5790 /pkgs/misc/jackaudio/default.nix
parent92ebfa13833065a23cd3479eefc2624b46ec45dd (diff)
downloadnixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.tar
nixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.tar.gz
nixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.tar.bz2
nixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.tar.lz
nixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.tar.xz
nixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.tar.zst
nixpkgs-f2a20b6e520989bc2c01d362c31fa94cbf6bee52.zip
treewide: use wafHook
Replace "waf" phases with wafHook that manages everything
automatically. Should make things more modular.

Packages affected here are:

- a2jmidid
- ams-lv2
- ardour
- fomp
- guitarix
- ingen
- jalv
- mda-lv2
- non
- patchage
- hamster-time-tracker
- kupfer
- xiphos
- xfce4-dockbarx-plugin
- xfce4-namebar-plugin
- dropbox
- clasp
- aubio
- liliv
- lv2
- lvtk
- ntk
- raul
- sratom
- suil
- ganv
- ndn-cxx
- ns3
- serd
- sord
- termbox
- wxmupen64plus
- jackaudio
- pflask
- blockhash
- glmark2
- weighttp
Diffstat (limited to 'pkgs/misc/jackaudio/default.nix')
-rw-r--r--pkgs/misc/jackaudio/default.nix35
1 files changed, 12 insertions, 23 deletions
diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix
index efd5aa4e919..d264b7f3279 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 ''