I set up my haskell project with cabal2nix following this guide (https://github.com/Gabriel439/haskell-nix/blob/master/project1/README.md).
My cabal file looks like this
cabal-version: >=1.10
-- Initial package description 'tensorFlowCabal.cabal' generated by 'cabal
-- init'. For further documentation, see
-- http://haskell.org/cabal/users-guide/
name: tensorFlowCabal
version: 0.1.0.0
-- synopsis:
-- description:
-- bug-reports:
-- license:
license-file: LICENSE
author: felix
maintainer: felix@aipieper
-- copyright:
-- category:
build-type: Simple
extra-source-files: CHANGELOG.md
executable tensorFlowCabal
main-is: Main.hs
-- other-modules:
-- other-extensions:
build-depends: base >=4.12 && <4.13,
tensorflow
-- hs-source-dirs:
default-language: Haskell2010
my release.nix looks like this
let
config = {
allowBroken = true;
packageOverrides = pkgs: rec {
haskellPackages = pkgs.haskellPackages.override {
overrides = haskellPackagesNew: haskellPackagesOld: rec {
project =
haskellPackagesNew.callPackage ./tensorFlowCabal.nix { };
};
};
};
};
pkgs = import <nixpkgs> { inherit config; };
in
{ tensorFlowCabal = pkgs.haskellPackages.project;
}
when I try to run nix-build i just get the error:
error: tensorflow-1.15.2 not supported for interpreter python2.7
(use '--show-trace' to show detailed location information)
I don’t really understand it because in my global nix config is python 3.7.6 defined. Most likely did I do a horrible mistake, I am new to nix. I would like to use tensorflow in haskell, but I can’t get it working. Any help is appreciated.