From fdcd875b0e70750d670501269b4fec76e05b0647 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 15 Mar 2016 10:59:12 +0100 Subject: [PATCH] anki: update sqlalchemy build input and clean up the expression SQLAlchemy-0.9.9 was broken recently, probably because of an sqlite update. So we just use the latest version. The build expression used to take the entire package set as an argument, which is poor style because it hides the true dependencies from the interface. I've change the code to expect the appropriate individual packages instead. --- pkgs/games/anki/default.nix | 13 +++++++------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/games/anki/default.nix b/pkgs/games/anki/default.nix index 4c06f9126a96..f4fff289fec8 100644 --- a/pkgs/games/anki/default.nix +++ b/pkgs/games/anki/default.nix @@ -1,11 +1,12 @@ { stdenv, lib, fetchurl, substituteAll, lame, mplayer -, libpulseaudio, python, pyqt4, qt4, pythonPackages +, libpulseaudio, python, pyqt4, qt4, wrapPython +, pysqlite, sqlalchemy, pyaudio, beautifulsoup, httplib2, matplotlib # This little flag adds a huge number of dependencies, but we assume that # everyone wants Anki to draw plots with statistics by default. -, plotsSupport ? true }: +, plotsSupport ? true +}: let - py = pythonPackages; version = "2.0.33"; in stdenv.mkDerivation rec { @@ -18,10 +19,10 @@ stdenv.mkDerivation rec { sha256 = "1d5rf5gcw98m38wam6wh3hyh7qd78ws7zipm67xg744flqsjrzmr"; }; - pythonPath = [ pyqt4 py.pysqlite py.sqlalchemy9 py.pyaudio py.beautifulsoup py.httplib2 ] - ++ lib.optional plotsSupport py.matplotlib; + pythonPath = [ pyqt4 pysqlite sqlalchemy pyaudio beautifulsoup httplib2 ] + ++ lib.optional plotsSupport matplotlib; - buildInputs = [ python py.wrapPython lame mplayer libpulseaudio ]; + buildInputs = [ python wrapPython lame mplayer libpulseaudio ]; phases = [ "unpackPhase" "patchPhase" "installPhase" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03a2e2756a15..f45905b63a4f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14540,7 +14540,9 @@ let andyetitmoves = if stdenv.isLinux then callPackage ../games/andyetitmoves {} else null; - anki = callPackage ../games/anki { }; + anki = callPackage ../games/anki { + inherit (pythonPackages) wrapPython pysqlite sqlalchemy pyaudio beautifulsoup httplib2 matplotlib; + }; armagetronad = callPackage ../games/armagetronad { };