From b687ffa0d246b913699b8e2b2f0e1ffb370ada17 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sat, 9 Dec 2017 22:41:18 +0000 Subject: [PATCH] gurobipy: fix eval --- .../development/python-modules/gurobipy/darwin.nix | 2 +- pkgs/development/python-modules/gurobipy/linux.nix | 14 ++++++-------- pkgs/top-level/python-packages.nix | 8 ++++---- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/gurobipy/darwin.nix b/pkgs/development/python-modules/gurobipy/darwin.nix index 95a59bf44c7c..9d7374bd5bd4 100644 --- a/pkgs/development/python-modules/gurobipy/darwin.nix +++ b/pkgs/development/python-modules/gurobipy/darwin.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, python, xar, cpio, cctools, insert_dylib }: -assert python.isPy27 && python.ucsEncoding == 2; +assert python.pkgs.isPy27 && python.ucsEncoding == 2; stdenv.mkDerivation { name = "gurobipy-7.0.2"; src = fetchurl diff --git a/pkgs/development/python-modules/gurobipy/linux.nix b/pkgs/development/python-modules/gurobipy/linux.nix index fa4d58c77b76..f65ae4a2ed2e 100644 --- a/pkgs/development/python-modules/gurobipy/linux.nix +++ b/pkgs/development/python-modules/gurobipy/linux.nix @@ -1,12 +1,10 @@ { stdenv, fetchurl, python }: -assert python.isPy27; -let utf = if python.ucsEncoding == 2 - then "16" - else if python.ucsEncoding == 4 - then "32" - else throw "Unsupported python UCS encoding UCS${toString python.ucsEncoding}"; -in -stdenv.mkDerivation +assert python.pkgs.isPy27; +let utf = + if python.ucsEncoding == 2 then "16" + else if python.ucsEncoding == 4 then "32" + else throw "Unsupported python UCS encoding UCS${toString python.ucsEncoding}"; +in stdenv.mkDerivation { name = "gurobipy-7.0.2"; src = fetchurl { url = "http://packages.gurobi.com/7.0/gurobi7.0.2_linux64.tar.gz"; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d99a7168a11d..075b33cd087e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5631,11 +5631,11 @@ in { }; gurobipy = if stdenv.system == "x86_64-darwin" - then callPackage ../development/python-modules/gurobipy/darwin.nix - { inherit (pkgs.darwin) cctools insert_dylib; - } + then callPackage ../development/python-modules/gurobipy/darwin.nix { + inherit (pkgs.darwin) cctools insert_dylib; + } else if stdenv.system == "x86_64-linux" - then callPackage ../development/python-modules/gurobipy/linux.nix {} + then callPackage ../development/python-modules/gurobipy/linux.nix {} else throw "gurobipy not yet supported on ${stdenv.system}"; helper = buildPythonPackage rec {