Be able to pass doOptimize/doProfiling flags to nix build
This commit is contained in:
parent
3c04c87ece
commit
ef3bc04a7c
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
, doBenchmark ? false
|
, doBenchmark ? false
|
||||||
, doTracing ? false
|
, doTracing ? false
|
||||||
|
# enables GHC optimizations for production use
|
||||||
|
, doOptimize ? false
|
||||||
|
# enables profiling support in GHC
|
||||||
|
, doProfiling ? false
|
||||||
, doStrict ? false
|
, doStrict ? false
|
||||||
|
|
||||||
, rev ? "b37872d4268164614e3ecef6e1f730d48cf5a90f"
|
, rev ? "b37872d4268164614e3ecef6e1f730d48cf5a90f"
|
||||||
|
@ -70,7 +74,8 @@ drv = haskellPackages.developPackage {
|
||||||
pkgs.haskell.packages.${compiler}.cabal-install
|
pkgs.haskell.packages.${compiler}.cabal-install
|
||||||
];
|
];
|
||||||
|
|
||||||
enableLibraryProfiling = false;
|
enableLibraryProfiling = doProfiling;
|
||||||
|
enableExecutableProfiling = doProfiling;
|
||||||
|
|
||||||
testHaskellDepends = attrs.testHaskellDepends ++
|
testHaskellDepends = attrs.testHaskellDepends ++
|
||||||
[ pkgs.nix
|
[ pkgs.nix
|
||||||
|
@ -88,6 +93,7 @@ drv = haskellPackages.developPackage {
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
pkgs.stdenv.lib.optional doTracing "--flags=tracing"
|
pkgs.stdenv.lib.optional doTracing "--flags=tracing"
|
||||||
|
++ pkgs.stdenv.lib.optional doOptimize "--flags=optimize"
|
||||||
++ pkgs.stdenv.lib.optional doStrict "--ghc-options=-Werror";
|
++ pkgs.stdenv.lib.optional doStrict "--ghc-options=-Werror";
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
--
|
--
|
||||||
-- see: https://github.com/sol/hpack
|
-- see: https://github.com/sol/hpack
|
||||||
--
|
--
|
||||||
-- hash: 07b6631da5bfe4929607211146ef8fdde38ea28d4aece34188af8e33d0287e5e
|
-- hash: bd9c8bad70af6e6bdc23b53988448061d7ab6aaee6054beb9d0f696e717f8a3c
|
||||||
|
|
||||||
name: hnix
|
name: hnix
|
||||||
version: 0.5.2
|
version: 0.5.2
|
||||||
|
@ -573,7 +573,7 @@ executable hnix
|
||||||
Paths_hnix
|
Paths_hnix
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
main
|
main
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall -rtsopts
|
||||||
build-depends:
|
build-depends:
|
||||||
aeson
|
aeson
|
||||||
, base >=4.9 && <5
|
, base >=4.9 && <5
|
||||||
|
|
|
@ -155,6 +155,7 @@ executables:
|
||||||
hnix:
|
hnix:
|
||||||
source-dirs: main
|
source-dirs: main
|
||||||
main: Main.hs
|
main: Main.hs
|
||||||
|
ghc-options: -rtsopts
|
||||||
dependencies:
|
dependencies:
|
||||||
- hnix
|
- hnix
|
||||||
- aeson
|
- aeson
|
||||||
|
|
Loading…
Reference in a new issue