Created
March 22, 2021 17:33
-
-
Save idontgetoutmuch/080e4a61f1ceb073c71a1e03a780c92f 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
let | |
myHaskellPackageOverlay = self: super: { | |
myHaskellPackages = super.haskellPackages.override { | |
overrides = hself: hsuper: rec { | |
accelerate = | |
let accelerateSrc = builtins.fetchGit { | |
url = "https://github.com/AccelerateHS/accelerate.git"; | |
rev = "49a39ea6e3d2d13cbfa8605dcb57a29ef13db1f9"; | |
}; | |
acc = hself.callCabal2nix "accelerate" accelerateSrc {}; | |
in | |
super.haskell.lib.dontHaddock (super.haskell.lib.dontCheck acc); | |
accelerate-blas = | |
let accelerate-blasSrc = builtins.fetchGit { | |
url = "https://github.com/tmcdonell/accelerate-blas.git"; | |
rev = "4e59e73f8545db76ea5d4570fb118af4080b0385"; | |
}; | |
acc-blas = hself.callCabal2nix "accelerate-blas" accelerate-blasSrc {}; | |
in | |
super.haskell.lib.dontHaddock (super.haskell.lib.dontCheck (super.haskell.lib.enableCabalFlag acc-blas "-llvm-ptx")); | |
}; | |
}; | |
}; | |
in | |
{ nixpkgs ? import <nixpkgs> { config.allowBroken = true; overlays = [ myHaskellPackageOverlay ]; }, compiler ? "default", doBenchmark ? false }: | |
let | |
inherit (nixpkgs) pkgs; | |
f = { mkDerivation, accelerate, accelerate-blas, base, stdenv | |
}: | |
mkDerivation { | |
pname = "lorri-test"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = false; | |
isExecutable = true; | |
executableHaskellDepends = [ | |
accelerate | |
accelerate-blas | |
base | |
]; | |
homepage = "https://github.com/idontgetoutmuch/whatever"; | |
description = "Whatever"; | |
license = stdenv.lib.licenses.bsd3; | |
}; | |
drv = pkgs.myHaskellPackages.callPackage f { | |
accelerate = pkgs.myHaskellPackages.accelerate; | |
accelerate-blas = pkgs.myHaskellPackages.accelerate-blas; | |
}; | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment