diff options
-rw-r--r-- | .envrc | 9 | ||||
-rw-r--r-- | .travis.yml | 15 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | Setup.hs | 4 | ||||
-rw-r--r-- | default.nix | 6 | ||||
-rwxr-xr-x | scripts/build.sh | 10 | ||||
-rw-r--r-- | verismith.cabal | 10 |
7 files changed, 43 insertions, 13 deletions
@@ -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 @@ -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 @@ -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 |