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 {
|
2020-02-16 06:45:40 +01:00
|
|
|
# Either use specified GHC or use GHC 8.6.5 (which we need for LTS 14.4)
|
|
|
|
ghc = if isNull ghc then pkgs.haskell.compiler.ghc865 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
|
|
|
}
|