mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-26 21:09:44 +01:00
ff69c12223
* I upgraded nixpkgs to the latest master which now contains libtensorflow. This replaces the custom tensorflow-c. Note that libtensorflow also builds on OS X and has optional CUDA support. * nixpkgs is now pinned using builtins.fetchTarball which means we can build with an empty NIX_PATH thus making the build pure. This does require Nix-2.0 but this has been released for a while with NixOS-18.03. * The stack override has been replaced by passing `extraArgs = "--system-ghc";` to buildStackProject.
19 lines
589 B
Nix
19 lines
589 B
Nix
{ghc ? null }:
|
|
|
|
let
|
|
# Use pinned packages
|
|
nixpkgs = with (builtins.fromJSON (builtins.readFile ./nix/src.json));
|
|
builtins.fetchTarball {
|
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
|
inherit sha256;
|
|
};
|
|
|
|
pkgs = import nixpkgs {};
|
|
in
|
|
pkgs.haskell.lib.buildStackProject {
|
|
# 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";
|
|
name = "tf-env";
|
|
buildInputs = with pkgs; [ snappy zlib protobuf libtensorflow ];
|
|
}
|