aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-03-08 21:41:39 +0000
committerYann Herklotz <git@yannherklotz.com>2020-03-08 21:41:39 +0000
commit010d7343133ebe53a472b9d26fdeb509db31d4c9 (patch)
tree1d66a6a7f4d1ee1c52e08e6332f326a1e08b6366
parentba8fa15b77dc834a4d6d2c07627ef6c16ad53d0e (diff)
parentfeb21582faab8a30e5e9180420f4449764a11a9b (diff)
downloadverismith-010d7343133ebe53a472b9d26fdeb509db31d4c9.tar.gz
verismith-010d7343133ebe53a472b9d26fdeb509db31d4c9.zip
Merge branch 'master' into develop
-rw-r--r--.envrc9
-rw-r--r--.travis.yml15
-rw-r--r--README.md2
-rw-r--r--Setup.hs4
-rw-r--r--default.nix6
-rwxr-xr-xscripts/build.sh10
-rw-r--r--verismith.cabal10
7 files changed, 43 insertions, 13 deletions
diff --git a/.envrc b/.envrc
index 051d09d..f4c5cf4 100644
--- a/.envrc
+++ b/.envrc
@@ -1 +1,8 @@
-eval "$(lorri direnv)"
+command -v lorri >/dev/null 2>&1
+lorri_available=$?
+
+if [[ $lorri_available -eq 0 ]]; then
+ eval "$(lorri direnv)"
+else
+ use nix
+fi
diff --git a/.travis.yml b/.travis.yml
index dd99ef4..8b9190b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,3 +2,18 @@ language: nix # automatically runs nix-build
git:
depth: 3 # not 1 to build commits in the queue
+
+jobs:
+ include:
+ - name: "Cabal build"
+ env: NIX=0
+ - name: "Nix build"
+ env: NIX=1
+
+cache:
+ directories:
+ - $HOME/.cabal
+
+before_script: if [[ $NIX -eq 0 ]]; then nix-env -i cabal-install ghc; fi
+
+script: ./scripts/build.sh
diff --git a/README.md b/README.md
index 398a7d6..b552eb3 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,7 @@ Some external packages are required to use Verismith properly:
A stable version of Verismith is available on [hackage](https://hackage.haskell.org/package/verismith) and can be installed using cabal directly without having to build the project from the repository:
-**Note**: Only **GHC 8.6.5** is currently supported, work is going on to support newer versions of GHC.
+**Note**: Only **GHC 8.6.5-8.8.2 ** are currently supported.
``` shell
cabal install verismith
diff --git a/Setup.hs b/Setup.hs
index bdfe8ae..c0cac3b 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,4 +1,4 @@
-import Distribution.Extra.Doctest
+import Distribution.Simple
main :: IO ()
-main = defaultMainWithDoctests "doctest"
+main = defaultMain
diff --git a/default.nix b/default.nix
index 0e25b05..516691e 100644
--- a/default.nix
+++ b/default.nix
@@ -1,6 +1,10 @@
{ nixpkgs ? null, compiler ? "ghc865", doBenchmark ? false } :
let
- pinnedPkg = <nixpkgs>;
+ pinnedPkg = builtins.fetchGit {
+ name = "nixos-unstable-2020-03-06";
+ url = https://github.com/nixos/nixpkgs/;
+ rev = "93ba4ecd58602d3f69f74f9d45d60a8f949544e2";
+ };
npkgs = if nixpkgs == null
then import pinnedPkg {}
else import nixpkgs {};
diff --git a/scripts/build.sh b/scripts/build.sh
new file mode 100755
index 0000000..a08a179
--- /dev/null
+++ b/scripts/build.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if ! [[ -z $NIX ]]; then
+ if [[ $NIX -eq 0 ]]; then
+ cabal update
+ cabal build
+ else
+ nix-build
+ fi
+fi
diff --git a/verismith.cabal b/verismith.cabal
index e88d3df..43280d5 100644
--- a/verismith.cabal
+++ b/verismith.cabal
@@ -1,5 +1,5 @@
name: verismith
-version: 1.0.0.0
+version: 1.0.0.2
synopsis: Random verilog generation and simulator testing.
description:
Verismith provides random verilog generation modules
@@ -11,7 +11,7 @@ author: Yann Herklotz
maintainer: yann [at] yannherklotz [dot] com
copyright: 2018-2020 Yann Herklotz
category: Hardware
-build-type: Custom
+build-type: Simple
cabal-version: >=1.10
extra-source-files: README.md
, examples/*.v
@@ -29,12 +29,6 @@ source-repository this
location: https://github.com/ymherklotz/verismith
tag: v1.0.0.0
-custom-setup
- setup-depends:
- base >= 4 && <5,
- cabal-doctest >= 1 && <1.1,
- Cabal >= 1.10 && <2.5
-
library
hs-source-dirs: src
default-language: Haskell2010