2018-05-25 04:33:15 +02:00
|
|
|
{ghc ? null }:
|
|
|
|
|
|
|
|
let
|
|
|
|
# Use pinned packages
|
2018-07-24 23:16:45 +02:00
|
|
|
nixpkgs = with (builtins.fromJSON (builtins.readFile ./nix/src.json));
|
|
|
|
builtins.fetchTarball {
|
|
|
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
|
|
|
inherit sha256;
|
2018-05-25 04:33:15 +02:00
|
|
|
};
|
|
|
|
|
2018-07-24 23:16:45 +02:00
|
|
|
pkgs = import nixpkgs {};
|
2018-05-25 04:33:15 +02:00
|
|
|
in
|
|
|
|
pkgs.haskell.lib.buildStackProject {
|
2019-02-06 04:32:15 +01:00
|
|
|
# Either use specified GHC or use GHC 8.4.4 (which we need for LTS 12.26)
|
|
|
|
ghc = if isNull ghc then pkgs.haskell.compiler.ghc844 else ghc;
|
2018-07-24 23:16:45 +02:00
|
|
|
extraArgs = "--system-ghc";
|
2018-05-25 04:33:15 +02:00
|
|
|
name = "tf-env";
|
2018-07-24 23:16:45 +02:00
|
|
|
buildInputs = with pkgs; [ snappy zlib protobuf libtensorflow ];
|
2018-05-25 04:33:15 +02:00
|
|
|
}
|