summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2018-04-03 13:51:06 +0100
committerDominic Steinitz <dominic@steinitz.org>2018-04-03 13:51:06 +0100
commit6d03ae09d70c4378a46f2a0dbc6811b0cda92aab (patch)
tree413c9dfe941bdfdcd540c0822aa6b0eba87238dd
parent17e9c7e6dd2028c6c2710c7d5c19df294ec8d442 (diff)
Simplify shell.nix
-rw-r--r--shell.nix43
1 files changed, 2 insertions, 41 deletions
diff --git a/shell.nix b/shell.nix
index 056cd5d..8f9488b 100644
--- a/shell.nix
+++ b/shell.nix
@@ -58,7 +58,7 @@ mkDerivation {
58 executableSystemDepends = [ 58 executableSystemDepends = [
59 pkgs.blas 59 pkgs.blas
60 pkgs.liblapack 60 pkgs.liblapack
61 patched-gsl 61 pkgs.gsl
62 sundials 62 sundials
63 pkgs.zlib 63 pkgs.zlib
64 ] ++ (if pkgs.stdenv.isDarwin then [pkgs.darwin.apple_sdk.frameworks.Accelerate] else []); 64 ] ++ (if pkgs.stdenv.isDarwin then [pkgs.darwin.apple_sdk.frameworks.Accelerate] else []);
@@ -71,46 +71,7 @@ haskellPackages = if compiler == "default"
71 71
72variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; 72variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;
73 73
74patched-hmatrix = pkgs.haskellPackages.hmatrix.overrideAttrs (oldAttrs: rec { 74drv = variant (haskellPackages.callPackage f {});
75 src = nixpkgs.fetchgit {
76 url = git://github.com/albertoruiz/hmatrix;
77 rev = "d83b17190029c11e3ab8b504e5cdc917f5863120";
78 sha256 = "11wr59wg21rky59j3kkd3ba6aqns9gkh0r1fnhwhn3fp7zfhanqn";
79 };
80 postUnpack = ''
81 sourceRoot=''${sourceRoot}/packages/base
82 echo Source root reset to ''${sourceRoot}
83 '';
84});
85
86patched-hmatrix-gsl = pkgs.haskellPackages.hmatrix-gsl.overrideAttrs (oldAttrs: rec {
87 src = nixpkgs.fetchgit {
88 url = git://github.com/albertoruiz/hmatrix;
89 rev = "d83b17190029c11e3ab8b504e5cdc917f5863120";
90 sha256 = "11wr59wg21rky59j3kkd3ba6aqns9gkh0r1fnhwhn3fp7zfhanqn";
91 };
92 postUnpack = ''
93 sourceRoot=''${sourceRoot}/packages/gsl
94 echo Source root reset to ''${sourceRoot}
95 '';
96});
97
98patched-gsl = pkgs.gsl.overrideAttrs (oldAttrs: rec {
99 src = nixpkgs.fetchgit {
100 url = git://github.com/idontgetoutmuch/gsl;
101 rev = "c2035977d65cd804169ff3370da6723cf879be75";
102 sha256 = "1fqp77gp9nl3av1z58cwg8fivik4rff394wgjzc76ayd04y0d1k7";
103 };
104 version = "2.5";
105 name = "gsl-${version}";
106 doCheck = false;
107 CFLAGS = "-DDEBUG";
108});
109
110drv = variant (haskellPackages.callPackage f {
111 hmatrix = patched-hmatrix;
112 hmatrix-gsl = patched-hmatrix-gsl;
113});
114 75
115in 76in
116 77