The source code and dockerfile for the GSW2024 AI Lab.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

46 lines
1.2 KiB

2 months ago
  1. { stdenv, fetchurl, file
  2. , gmp
  3. , reentrantBuild ? true
  4. }:
  5. let
  6. version = "5.5.1";
  7. name = "mathsat-${version}";
  8. genUrl = reentrant: "http://mathsat.fbk.eu/download.php?file=${name}-linux-x86_64${reentrant}.tar.gz";
  9. srcAttrs = if reentrantBuild then {
  10. url = genUrl "-reentrant";
  11. sha256 = "10ng53nvxyyvml3gbzl87vj3c75fgb14zdlakwasz7zczn7hm978";
  12. } else {
  13. url = genUrl "";
  14. sha256 = "0jnbiaq27hzdzavkr3sdh2ym0bc3ykamacj8k08pvyf7vil2hkdz";
  15. };
  16. in stdenv.mkDerivation rec {
  17. inherit name version;
  18. src = fetchurl srcAttrs;
  19. nativeBuildInputs = [ gmp ];
  20. libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc stdenv.glibc gmp ];
  21. phases = "unpackPhase installPhase fixupPhase";
  22. installPhase = ''
  23. mkdir -p $out/{bin,lib,include}
  24. patchelf --set-rpath "$libPath" lib/libmathsat.so
  25. cp bin/* $out/bin
  26. cp lib/* $out/lib
  27. cp -r include/* $out/include
  28. '';
  29. meta = with stdenv.lib; {
  30. description = "Satisfiability modulo theories (SMT) solver";
  31. homepage = http://mathsat.fbk.eu;
  32. license = {
  33. fullName = "Unfree, redistributable for non-commercial applications";
  34. free = false;
  35. };
  36. maintainer = [ maintainers.spacefrogg ];
  37. platforms = platforms.linux;
  38. };
  39. }