-
-
Save cleverca22/025a197a47f6d21b0af27457b4b5d542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ bootstrap ? import <nixpkgs> {}, compiler ? "ghc822", doBenchmark ? false, withHoogle ? true }: | |
let | |
pkgs = bootstrap; | |
origHaskellPackages = pkgs.haskell.packages.${compiler}; | |
defaultHaskellPackages = origHaskellPackages.extend fixTensorOverlay; | |
fixTensorOverlay = self: super: { | |
tensorflow-proto = pkgs.haskell.lib.overrideCabal super.tensorflow-proto (drv: { | |
libraryToolDepends = drv.libraryToolDepends ++ [ pkgs.protobuf ]; | |
}); | |
}; | |
# hoogle server --port=8080 --local --haskell | |
hoogleOverlay = self: super: { | |
ghc = super.ghc // { withPackages = super.ghc.withHoogle; }; | |
ghcWithPackages = self.ghc.withPackages; | |
}; | |
hoogleHaskellPackages = ( | |
if withHoogle then (defaultHaskellPackages.extend hoogleOverlay) | |
else defaultHaskellPackages | |
); | |
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | |
project = ./project.nix; | |
drv = variant (hoogleHaskellPackages.callPackage project { | |
pkgconfig = pkgs.pkgconfig; | |
protoc = pkgs.protobuf; | |
}); | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ mkDerivation, pkgconfig, aeson, array, base, brick, containers, either | |
, fuzzy, hashable, hmatrix, hunspell, lens, megaparsec, mtl | |
, optparse-applicative, recursion-schemes, split, stdenv, stm | |
, template-haskell, text, bytestring, transformers, unordered-containers | |
, vector, vty, protoc, tensorflow, tensorflow-ops | |
}: | |
mkDerivation { | |
pname = "project"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = false; | |
isExecutable = true; | |
setupHaskellDepends = [ protoc ]; | |
libraryToolDepends = [ protoc ]; | |
libraryHaskellDepends = [ | |
array base containers either fuzzy hashable hmatrix lens megaparsec | |
mtl recursion-schemes split stm text bytestring transformers | |
unordered-containers vector tensorflow tensorflow-ops | |
]; | |
librarySystemDepends = [ pkgconfig hunspell protoc ]; | |
executableHaskellDepends = [ | |
aeson base brick containers lens optparse-applicative | |
template-haskell text unordered-containers vty | |
]; | |
license = stdenv.lib.licenses.unfree; | |
hydraPlatforms = stdenv.lib.platforms.none; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment