Skip to content

Instantly share code, notes, and snippets.

# From Mathieu's PR
# {ghc}:
# with import <nixpkgs> {};
# let
# gfortranlibdir = "${gfortran7.cc.lib}";
# # XXX Workaround https://ghc.haskell.org/trac/ghc/ticket/11042.
# libHack = if stdenv.isDarwin then {
{ nixpkgs ? import <nixpkgs>
{}
, compiler ? "ghc822"
, doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, ad, base, c2hs, diagrams-lib, diagrams-rasterific, gcc
#include "MyTypes.h"
void complex_add(Complex *a, Complex *b, Complex *c){
c->re = a->re + b->re;
c->im = a->im + b->im;
}
bash-3.2$ nix-shell shell.nix -I nixpkgs=/Users/dom/nixpkgs
these derivations will be built:
/nix/store/9701sn4vbjxgfrn6zgiky495fiyz8xsl-sundials-3.1.0.drv
building path(s) ‘/nix/store/1m9cicrvhwq27lb8f5hv0pgb3jx9wcs2-sundials-3.1.0’
unpacking sources
unpacking source archive /nix/store/z0rbcd9cjl5i8mdpk350wwswfgadqhv6-sundials-3.1.0.tar.gz
source root is nas-1.9.4
setting SOURCE_DATE_EPOCH to timestamp 1381168715 of file nas-1.9.4/HISTORY
patching sources
configuring
sundials =
let
pname = "sundials"
version = "3.1.0;
in stdenv.mkDerivation {
name = "${pname}-${version}";
src = fetchurl {
url = "https://computation.llnl.gov/projects/${pname}/download/${pname}-${version}.tar.gz";
bash-3.2$ nix-shell shell.nix -I nixpkgs=/Users/dom/nixpkgs
warning: dumping very large path (> 256 MiB); this may run out of memory
these derivations will be built:
/nix/store/0wakp1czwfiq8qls8gjdkd637y1siryh-gsl-2.6.drv
/nix/store/af9q1010xar2db68sy2xbyrdzpmg6z80-hmatrix-gsl-0.18.0.1.drv
/nix/store/ivjcp47c2c4gm7iyxyjkfrxgji0fpc2i-ghc-8.2.2-with-packages.drv
building path(s) ‘/nix/store/67srawwfsjp9gsf013fc2vaay6sq9gxp-gsl-2.6’
unpacking sources
unpacking source archive /nix/store/qvf0bz4864jy0f234fsk4wz1ldy29fix-gsl
source root is gsl
{ nixpkgs ? import <nixpkgs>
{}
# { overlays = [(self: super: {gsl = super.gsl.overrideAttrs (o: {CFLAGS = "-DDEBUG";});})]; }
, compiler ? "ghc822"
, doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
{ nixpkgs ? import <nixpkgs> { overlays = [(self: super: {gsl = super.gsl.overrideAttrs (o: {CFLAGS = "-DDEBUG";});})]; }
, compiler ? "ghc822"
, doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, ad, array, base, bytestring, cassava, containers
, datasets, diagrams-lib, diagrams-rasterific, foldl, Frames, ghc-prim, gsl
{ nixpkgs ? import <nixpkgs> { overlays = [(self: super: {gsl = super.gsl.overrideAttrs (o: {CFLAGS = "-DDEBUG";});})]; }
, compiler ? "ghc822"
, doBenchmark ? false }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, ad, array, base, bytestring, cassava, containers
, datasets, diagrams-lib, diagrams-rasterific, foldl, Frames, ghc-prim, gsl
{ fetchurl, fetchpatch, stdenv }:
stdenv.mkDerivation rec {
name = "gsl-2.4";
src = fetchurl {
url = "mirror://gnu/gsl/${name}.tar.gz";
sha256 = "16yfs5n444s03np1naj6yp1fsysd42kdscxzkg0k2yvfjixx0ijd";
};
CFLAGS = "-DDEBUG";