aboutsummaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-07-27 11:16:17 +0200
committerYann Herklotz <git@yannherklotz.com>2019-07-27 11:16:17 +0200
commitd57842487d86d710bdbf83b9c2bbe1fa8c1dd6e2 (patch)
treee49085644295d968108b169502b33bdd4c95aee5 /default.nix
parent7e5621f79dfbeb2e5112bef931c4cfc858a2f19e (diff)
downloadverismith-d57842487d86d710bdbf83b9c2bbe1fa8c1dd6e2.tar.gz
verismith-d57842487d86d710bdbf83b9c2bbe1fa8c1dd6e2.zip
Make the nix build more concise
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix48
1 files changed, 12 insertions, 36 deletions
diff --git a/default.nix b/default.nix
index 027ff1b..69de51c 100644
--- a/default.nix
+++ b/default.nix
@@ -1,36 +1,12 @@
-{ mkDerivation, alex, array, base, binary, blaze-html, bytestring
-, Cabal, cabal-doctest, criterion, cryptonite, deepseq, DRBG
-, exceptions, fgl, fgl-visualize, filepath, gitrev, hedgehog
-, hedgehog-fn, lens, lifted-base, memory, monad-control
-, optparse-applicative, parsec, prettyprinter, random
-, recursion-schemes, shakespeare, shelly, statistics, stdenv, tasty
-, tasty-hedgehog, tasty-hunit, template-haskell, text, time
-, tomland, transformers, transformers-base, unordered-containers
-, vector
-}:
-mkDerivation {
- pname = "verifuzz";
- version = "0.3.1.0";
- src = ./.;
- isLibrary = true;
- isExecutable = true;
- setupHaskellDepends = [ base Cabal cabal-doctest ];
- libraryHaskellDepends = [
- array base binary blaze-html bytestring cryptonite deepseq DRBG
- exceptions fgl fgl-visualize filepath gitrev hedgehog lens
- lifted-base memory monad-control optparse-applicative parsec
- prettyprinter random recursion-schemes shakespeare shelly
- statistics template-haskell text time tomland transformers
- transformers-base unordered-containers vector
- ];
- libraryToolDepends = [ alex ];
- executableHaskellDepends = [ base ];
- testHaskellDepends = [
- base fgl hedgehog hedgehog-fn lens parsec shakespeare tasty
- tasty-hedgehog tasty-hunit text
- ];
- benchmarkHaskellDepends = [ base criterion lens ];
- homepage = "https://github.com/ymherklotz/VeriFuzz#readme";
- description = "Random verilog generation and simulator testing";
- license = stdenv.lib.licenses.bsd3;
-}
+{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc865", doBenchmark ? false } :
+let
+ haskellPackages = nixpkgs.pkgs.haskellPackages.override {
+ overrides = haskellPackagesNew: haskellPackagesOld: rec {
+ hedgehog-fn = haskellPackagesNew.callPackage ./nix/hedgehog-fn.nix {};
+ tomland = nixpkgs.pkgs.haskell.lib.dontCheck (haskellPackagesNew.callPackage ./nix/tomland.nix {});
+ parser-combinators = haskellPackagesNew.callPackage ./nix/parser-combinators.nix {};
+ tasty-hedgehog = haskellPackagesNew.callPackage ./nix/tasty-hedgehog.nix {};
+ };
+ };
+in
+ haskellPackages.callCabal2nix "verifuzz" (./.) {}