-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix: refactor flake.nix for readability and easier testing
Refactoring some let binging into nix packages make it easier for testing. For example, we can now test the CBMC dependencies by running, `nix build .#cbmc`, and check the built dependencies in `results/bin/` The `litani` derivation is therefore needed to be adjusted so that the python runtime dependencies can be found. Signed-off-by: Thing-han, Lim <[email protected]>
- Loading branch information
1 parent
998e425
commit 9072d07
Showing
3 changed files
with
109 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ cbmc | ||
{ buildEnv | ||
, cbmc | ||
, fetchFromGitHub | ||
, callPackage | ||
, bitwuzla | ||
, ninja | ||
, cadical | ||
}: | ||
builtins.attrValues { | ||
cbmc = cbmc.overrideAttrs (old: rec { | ||
version = "6.3.1"; # remember to adjust this in ../flake.nix too | ||
src = fetchFromGitHub { | ||
owner = "diffblue"; | ||
repo = old.pname; | ||
rev = "${old.pname}-${version}"; | ||
hash = "sha256-y3avPsVxtxSV+WB8TBbvnaNZ4WZltGRTcD+GPwTlp2E="; | ||
}; | ||
patches = [ | ||
./0001-Do-not-download-sources-in-cmake.patch | ||
]; | ||
}); | ||
litani = callPackage ./litani.nix { }; # 1.29.0 | ||
cbmc-viewer = callPackage ./cbmc-viewer.nix { }; # 3.9 | ||
|
||
z3 = callPackage ./z3.nix { | ||
version = "4.13.3"; | ||
sha256 = "sha256-odwalnF00SI+sJGHdIIv4KapFcfVVKiQ22HFhXYtSvA="; | ||
}; | ||
buildEnv { | ||
name = "pqcp-cbmc"; | ||
paths = | ||
builtins.attrValues { | ||
cbmc = cbmc.overrideAttrs (old: rec { | ||
version = "6.3.1"; # remember to adjust this in ../flake.nix too | ||
src = fetchFromGitHub { | ||
owner = "diffblue"; | ||
repo = old.pname; | ||
rev = "${old.pname}-${version}"; | ||
hash = "sha256-y3avPsVxtxSV+WB8TBbvnaNZ4WZltGRTcD+GPwTlp2E="; | ||
}; | ||
patches = [ | ||
./0001-Do-not-download-sources-in-cmake.patch | ||
]; | ||
}); | ||
litani = callPackage ./litani.nix { }; # 1.29.0 | ||
cbmc-viewer = callPackage ./cbmc-viewer.nix { }; # 3.9 | ||
|
||
z3 = callPackage ./z3.nix { | ||
version = "4.13.3"; | ||
sha256 = "sha256-odwalnF00SI+sJGHdIIv4KapFcfVVKiQ22HFhXYtSvA="; | ||
}; | ||
|
||
inherit | ||
bitwuzla# 0.6.0 | ||
ninja; # 1.11.1 | ||
inherit | ||
cadical#1.9.5 | ||
bitwuzla# 0.6.0 | ||
ninja; # 1.11.1 | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters