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-04-12 04:27:15 +02:00
|
|
|
# Either use specified GHC or use GHC 8.6.4 (which we need for LTS 13.13)
|
|
|
|
ghc = if isNull ghc then pkgs.haskell.compiler.ghc864 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
|
|
|
}
|