diff options
author | Doron Behar <doron.behar@gmail.com> | 2019-10-05 08:38:15 +0300 |
---|---|---|
committer | Doron Behar <doron.behar@gmail.com> | 2019-10-05 10:08:47 +0300 |
commit | a246b74f21765bf08b57c6e1ca2d5bef6226ca1c (patch) | |
tree | 70e0d78e82bdf03cc75199ef44aa2e00ab703d7c /pkgs/development/libraries/gaia | |
parent | cf6dd6cc0c27428746ee372aa55760e70f1c1c43 (diff) | |
download | nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.tar nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.tar.gz nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.tar.bz2 nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.tar.lz nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.tar.xz nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.tar.zst nixpkgs-a246b74f21765bf08b57c6e1ca2d5bef6226ca1c.zip |
Improve pythonSupport handling
Use pythonPackages instead of just python and add an attribute to python-packages.nix.
Diffstat (limited to 'pkgs/development/libraries/gaia')
-rw-r--r-- | pkgs/development/libraries/gaia/default.nix | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/development/libraries/gaia/default.nix b/pkgs/development/libraries/gaia/default.nix index 0809f4d62a1..9195317b7b4 100644 --- a/pkgs/development/libraries/gaia/default.nix +++ b/pkgs/development/libraries/gaia/default.nix @@ -7,15 +7,15 @@ , wafHook , makeWrapper , qt4 -, python -, pythonSupport ? true +, pythonPackages +, pythonSupport ? false # Default to false since it breaks the build, see https://github.com/MTG/gaia/issues/11 , stlfacadeSupport ? false , assertsSupport ? true , cyclopsSupport ? true }: -assert pythonSupport -> python != null; +assert pythonSupport -> pythonPackages != null; stdenv.mkDerivation rec { pname = "gaia"; @@ -37,9 +37,9 @@ stdenv.mkDerivation rec { ''; # This is not exactly specified in upstream's README but it's needed by the - # resultings $out/bin/gaiafusion script + # resulting $out/bin/gaiafusion script pythonEnv = (if pythonSupport then - python.withPackages(ps: with ps; [ + pythonPackages.python.withPackages(ps: with ps; [ pyyaml ]) else null); @@ -66,10 +66,10 @@ stdenv.mkDerivation rec { ++ lib.optionals (cyclopsSupport) [ "--with-cyclops" ] ; # only gaiafusion is a python executable that needs patchShebangs - postInstall = lib.optionalString '' + postInstall = lib.optionalString (pythonSupport) '' # We can't use patchShebangs because it will use bare bones $python/bin/python # and we need a python environment with pyyaml - wrapProgram $out/bin/gaiafusion --prefix PYTHONPATH : $out/${python.sitePackages}:${pythonEnv}/${python.sitePackages} + wrapProgram $out/bin/gaiafusion --prefix PYTHONPATH : $out/${pythonPackages.python.sitePackages}:${pythonEnv}/${pythonPackages.python.sitePackages} ''; meta = with lib; { |