diff --git a/pkgs/by-name/op/opensmt/package.nix b/pkgs/by-name/op/opensmt/package.nix index ab9b532d06ac..bbe5d46f37c8 100644 --- a/pkgs/by-name/op/opensmt/package.nix +++ b/pkgs/by-name/op/opensmt/package.nix @@ -10,46 +10,49 @@ enableReadline ? false, readline, gtest, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "opensmt"; - version = "2.7.0"; + version = "2.9.2"; src = fetchFromGitHub { owner = "usi-verification-and-security"; repo = "opensmt"; - rev = "v${version}"; - sha256 = "sha256-zhNNnwc41B4sNq50kPub29EYhqV+FoDKRD/CLHnVyZw="; + tag = "v${finalAttrs.version}"; + hash = "sha256-xKpYABMn2bsXRg2PMjiMhsx6+FbAsxitLRnmqa1kmu0="; }; + strictDeps = true; + nativeBuildInputs = [ cmake bison flex ]; + buildInputs = [ libedit gmpxx + gtest ] ++ lib.optional enableReadline readline; preConfigure = '' - substituteInPlace test/CMakeLists.txt \ - --replace 'FetchContent_Populate' '#FetchContent_Populate' + substituteInPlace test/CMakeLists.txt --replace-fail \ + 'FetchContent_MakeAvailable' '#FetchContent_MakeAvailable' ''; - cmakeFlags = [ - "-Dgoogletest_SOURCE_DIR=${gtest.src}" - "-Dgoogletest_BINARY_DIR=./gtest-build" - ]; - meta = with lib; { - broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); + passthru.updateScript = nix-update-script { }; + + meta = { + broken = with stdenv.hostPlatform; (isLinux && isAarch64); description = "Satisfiability modulo theory (SMT) solver"; mainProgram = "opensmt"; - maintainers = [ maintainers.raskin ]; - platforms = platforms.linux; - license = if enableReadline then licenses.gpl2Plus else licenses.mit; + maintainers = [ lib.maintainers.raskin ]; + platforms = lib.platforms.linux; + license = if enableReadline then lib.licenses.gpl2Plus else lib.licenses.mit; homepage = "https://github.com/usi-verification-and-security/opensmt"; }; -} +})