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 {
|
2018-07-24 23:16:45 +02:00
|
|
|
# Either use specified GHC or use GHC 8.2.2 (which we need for LTS 11.9)
|
|
|
|
ghc = if isNull ghc then pkgs.haskell.compiler.ghc822 else ghc;
|
|
|
|
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
|
|
|
}
|