about summary refs log tree commit diff
path: root/pkgs/development/libraries/speech-tools
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2015-06-25 22:57:31 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2015-11-24 14:45:15 +0100
commita2ccc807744c7450f145a7d72ae060e4b48ba144 (patch)
tree80ea29e015d78bfc9e73ef586155b5b28daab224 /pkgs/development/libraries/speech-tools
parent022bbe1c0ce6abafda8b4f193284ddb4505fb37c (diff)
downloadnixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.tar
nixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.tar.gz
nixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.tar.bz2
nixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.tar.lz
nixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.tar.xz
nixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.tar.zst
nixlib-a2ccc807744c7450f145a7d72ae060e4b48ba144.zip
speech_tools: reimplement using mkDerivation
Diffstat (limited to 'pkgs/development/libraries/speech-tools')
-rw-r--r--pkgs/development/libraries/speech-tools/default.nix57
1 files changed, 18 insertions, 39 deletions
diff --git a/pkgs/development/libraries/speech-tools/default.nix b/pkgs/development/libraries/speech-tools/default.nix
index 79a633c65417..fba354213556 100644
--- a/pkgs/development/libraries/speech-tools/default.nix
+++ b/pkgs/development/libraries/speech-tools/default.nix
@@ -1,40 +1,22 @@
-x@{builderDefsPackage
-  , gawk, alsaLib, ncurses
-  , ...}:
-builderDefsPackage
-(a :
-let
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
-    [];
+{ stdenv, fetchurl, gawk, alsaLib, ncurses }:
 
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="speech_tools";
-    version="2.1";
-    name="${baseName}-${version}";
-    url="http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz";
-    hash="1s9bkfgdgyas8v2cr7x3dg0ck1xf9mn1q6a73gwy524sjb6nfqgz";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-  };
+stdenv.mkDerivation rec {
+  name = "speech_tools-${version}";
+  version = "2.1";
 
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
+  src = fetchurl {
+    url = "http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz";
+    sha256 = "1s9bkfgdgyas8v2cr7x3dg0ck1xf9mn1q6a73gwy524sjb6nfqgz";
+  };
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doUnpack" "killUsrBin" "doConfigure" "doMakeInstall" "doDeploy" "fixPaths"];
+  buildInputs = [ alsaLib ncurses ];
 
-  killUsrBin = a.fullDepEntry ''
+  preConfigure = ''
     sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . )
     sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . )
-  '' ["minInit" "doUnpack"];
+  '';
 
-  doDeploy = a.fullDepEntry ''
+  installPhase = ''
     mkdir -p "$out"/{bin,lib}
     for d in bin lib; do
       for i in ./$d/*; do
@@ -42,24 +24,21 @@ rec {
           cp -r "$(readlink -f $i)" "$out/$d"
       done
     done
-  '' ["doMakeInstall" "defEnsureDir"];
-
-  fixPaths = a.doPatchShebangs "$out/bin";
+  '';
 
-  meta = {
+  meta = with stdenv.lib; {
     broken = true;
     description = "Text-to-speech engine";
-    maintainers = with a.lib.maintainers;
+    maintainers = with maintainers;
     [
       raskin
     ];
-    platforms = with a.lib.platforms;
-      linux;
-    license = a.lib.licenses.free;
+    platforms = platforms.linux;
+    license = licenses.free;
   };
   passthru = {
     updateInfo = {
       downloadPage = "http://www.festvox.org/packed/festival/";
     };
   };
-}) x
+}