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