From edc8a602baa19c5743bb860af9ea9e6d11469057 Mon Sep 17 00:00:00 2001 From: Yiyu Zhou Date: Sat, 18 Oct 2025 21:45:02 -0700 Subject: [PATCH] opensmt: cleanup --- pkgs/by-name/op/opensmt/package.nix | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/op/opensmt/package.nix b/pkgs/by-name/op/opensmt/package.nix index 20c51dead267..bbe5d46f37c8 100644 --- a/pkgs/by-name/op/opensmt/package.nix +++ b/pkgs/by-name/op/opensmt/package.nix @@ -10,24 +10,28 @@ enableReadline ? false, readline, gtest, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "opensmt"; version = "2.9.2"; src = fetchFromGitHub { owner = "usi-verification-and-security"; repo = "opensmt"; - rev = "v${version}"; - sha256 = "sha256-xKpYABMn2bsXRg2PMjiMhsx6+FbAsxitLRnmqa1kmu0="; + tag = "v${finalAttrs.version}"; + hash = "sha256-xKpYABMn2bsXRg2PMjiMhsx6+FbAsxitLRnmqa1kmu0="; }; + strictDeps = true; + nativeBuildInputs = [ cmake bison flex ]; + buildInputs = [ libedit gmpxx @@ -36,17 +40,19 @@ stdenv.mkDerivation rec { ++ lib.optional enableReadline readline; preConfigure = '' - substituteInPlace test/CMakeLists.txt \ - --replace-fail 'FetchContent_MakeAvailable' '#FetchContent_MakeAvailable' + substituteInPlace test/CMakeLists.txt --replace-fail \ + 'FetchContent_MakeAvailable' '#FetchContent_MakeAvailable' ''; - 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"; }; -} +})