Skip to content

Instantly share code, notes, and snippets.

@athas
Created April 8, 2020 19:54
Show Gist options
  • Select an option

  • Save athas/4b6e2ced36095681e70c320a48be293f to your computer and use it in GitHub Desktop.

Select an option

Save athas/4b6e2ced36095681e70c320a48be293f to your computer and use it in GitHub Desktop.
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc883" }:
let
# pkgs = nixpkgs.pkgsMusl;
pkgs = nixpkgs;
futhark =
pkgs.haskell.packages.${compiler}.callCabal2nix "futhark"
( pkgs.lib.cleanSource ./. ) { };
in
pkgs.haskell.lib.overrideCabal
futhark
( oldDrv: {
isLibrary = false;
isExecutable = true;
enableSharedExecutables = false;
enableSharedLibraries = false;
enableLibraryProfiling = false;
configureFlags = [
"--ghc-option=-optl=-static"
"--extra-lib-dirs=${pkgs.gmp6.override { withStatic = true; }}/lib"
"--extra-lib-dirs=${pkgs.zlib.static}/lib"
"--extra-lib-dirs=${pkgs.libffi.overrideAttrs (old: { dontDisableStatic = true; })}/lib"
];
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment