on master help sign in
Use benchmark and fusion-plugin deps by default
f10c944Harendra Kumar
default.nix+4−5
@@ -1,8 +1,5 @@
1# CAUTION! a spelling mistake in arg string is ignored silently.
1# CAUTION! a spelling mistake in arg string is ignored silently.
2#
2#
3−# To include benchmark deps use:
4−# nix-shell --argstr c2nix "--benchmark --flag fusion-plugin"
5−#
6# To build the chart executable for running bench.sh use:
3# To build the chart executable for running bench.sh use:
7# nix-shell --argstr c2nix "--flag dev" --run "cabal build chart --flag dev"
4# nix-shell --argstr c2nix "--flag dev" --run "cabal build chart --flag dev"
8#
5#
@@ -36,6 +33,8 @@ let haskellPackages =
36 then orig.overrideAttrs (oldAttrs: { src = null; })
33 then orig.overrideAttrs (oldAttrs: { src = null; })
37 else orig;
34 else orig;
38
35
36+ flags = "--benchmark --flag fusion-plugin " + c2nix;
37+
39 mkHaskellPackages = inShell:
38 mkHaskellPackages = inShell:
40 haskellPackages.override {
39 haskellPackages.override {
41 # We could disbale doCheck on all like this, but it would make the
40 # We could disbale doCheck on all like this, but it would make the
@@ -48,10 +47,10 @@ let haskellPackages =
48 overrides = self: super:
47 overrides = self: super:
49 with nixpkgs.haskell.lib;
48 with nixpkgs.haskell.lib;
50 {
49 {
51− streamly = mkPackage super "streamly" ./. c2nix inShell;
50+ streamly = mkPackage super "streamly" ./. flags inShell;
52 streamly-benchmarks =
51 streamly-benchmarks =
53 mkPackage super "streamly-benchmarks"
52 mkPackage super "streamly-benchmarks"
54− ./benchmark c2nix inShell;
53+ ./benchmark flags inShell;
55
54
56 # Example to Use a different version of a package
55 # Example to Use a different version of a package
57 #QuickCheck = self.QuickCheck_2_14;
56 #QuickCheck = self.QuickCheck_2_14;