From cff6fdd8c6f1e3b4e066fda44ba6eea41a26c1d3 Mon Sep 17 00:00:00 2001 From: Michael Raitza Date: Tue, 2 Oct 2018 16:16:24 +0200 Subject: [PATCH] nix-scripts: Update scripts and add documentation --- resources/3rdparty/nix-scripts/README | 20 +++++++++++++++++++ resources/3rdparty/nix-scripts/default.nix | 11 ++++++++++ .../nix-scripts/storm-checker/default.nix | 14 +++++++------ 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 resources/3rdparty/nix-scripts/README diff --git a/resources/3rdparty/nix-scripts/README b/resources/3rdparty/nix-scripts/README new file mode 100644 index 000000000..c4211378e --- /dev/null +++ b/resources/3rdparty/nix-scripts/README @@ -0,0 +1,20 @@ +This directory contains a nixpkgs overlay that defines the necessary build +scripts to build storm and its dependencies. + +To use it, do one of the following: + 1. Link ./default.nix to ~/.config/nixpkgs/overlays/ + 2. Add its full path to the environment variable NIX_PATH, i.e.: + NIX_PATH=${NIX_PATH}:nixpkgs-overlays=$PWD/default.nix + +See also https://nixos.org/nixpkgs/manual/#chap-overlays for further +information. + +To build storm from the current branch call: + nix-build '' -A stormChecker + +The attribute stormChecker builds storm with minimal options, stormCheckerFull +activates all bells and whistles. See ./default.nix to change build options like +LTO support, Z3 and others. + +See ./storm/default.nix on how to specify a specific Git commit to build storm +from. diff --git a/resources/3rdparty/nix-scripts/default.nix b/resources/3rdparty/nix-scripts/default.nix index 9d4aae3cb..2067b839a 100644 --- a/resources/3rdparty/nix-scripts/default.nix +++ b/resources/3rdparty/nix-scripts/default.nix @@ -1,3 +1,13 @@ +# This file defines a nixpkgs overlay. To use it, do one of the following: +# 1. Link this file to ~/.config/nixpkgs/overlays/ +# 2. Add the full path to the environment variable NIX_PATH, i.e.: +# NIX_PATH=${NIX_PATH}:nixpkgs-overlays=$PWD/default.nix +# See also https://nixos.org/nixpkgs/manual/#chap-overlays +# +# To build storm from the current branch call either of: +# nix-build '' -A stormChecker +# nix-build '' -A stormCheckerFull + self: super: with self; with self.lib; @@ -6,6 +16,7 @@ let _self = { z3 = callPackage ./z3 { }; stormChecker = callPackage ./storm-checker { ltoSupport = false; tbbSupport = false; mathsatSupport = false; z3Support = false; }; + stormCheckerFull = callPackage ./storm-checker { ltoSupport = true; tbbSupport = true; mathsatSupport = true; z3Support = true; }; carl = callPackage ./carl { }; googletest = callPackage ./googletest { }; l3pp = callPackage ./l3pp { }; diff --git a/resources/3rdparty/nix-scripts/storm-checker/default.nix b/resources/3rdparty/nix-scripts/storm-checker/default.nix index 306b3e1d7..a83f53cde 100644 --- a/resources/3rdparty/nix-scripts/storm-checker/default.nix +++ b/resources/3rdparty/nix-scripts/storm-checker/default.nix @@ -20,12 +20,14 @@ set(l3pp_INCLUDE "${l3pp}/include/") in stdenv.mkDerivation { name = "storm-git"; - src = fetchFromGitHub { - owner = "moves-rwth"; - repo = "storm"; - rev = "8332abab58f0c672561f5bbebd585a159852d8cc"; - sha256 = "02ixywhfkxr8xlcizqbysb1yinsjzl6rc0cjlsg8dz8w2r3m6qix"; - }; + src = ../../../../.; + # Exchange with expression below to build a specific github revision: + # src = fetchFromGitHub { + # owner = "moves-rwth"; + # repo = "storm"; + # rev = "8332abab58f0c672561f5bbebd585a159852d8cc"; + # sha256 = "02ixywhfkxr8xlcizqbysb1yinsjzl6rc0cjlsg8dz8w2r3m6qix"; + # }; buildInputs = [ boost carl cln doxygen gmp ginac glpk hwloc l3pp xercesc ] ++ optional tbbSupport tbb