Skip to content

opensmt: 20101017 -> 2.0.1 #102421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 14, 2021
Merged

opensmt: 20101017 -> 2.0.1 #102421

merged 3 commits into from
Jan 14, 2021

Conversation

freezeboy
Copy link
Contributor

Motivation for this change

Broken since 2014, googlecode site says it migrated to github but nothing is visible there

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@ofborg ofborg bot added 8.has: clean-up 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 2, 2020
@xy2i
Copy link

xy2i commented Nov 2, 2020

https://github.com/usi-verification-and-security/opensmt

@freezeboy
Copy link
Contributor Author

Ok so I will look to update the package instead

@freezeboy
Copy link
Contributor Author

Working on it, they migrated to cmake build (cool) but it tries to download an external project (googletest) :'(

Any idea how to properly handle this ?

@freezeboy freezeboy marked this pull request as draft November 2, 2020 12:51
@freezeboy freezeboy changed the title opensmt: remove (broken since 2014) opensmt: 20101017 -> 2.0.1 Nov 2, 2020
@ofborg ofborg bot requested a review from 7c6f434c November 2, 2020 13:02
@ofborg ofborg bot added 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Nov 2, 2020
@7c6f434c
Copy link
Member

7c6f434c commented Nov 2, 2020

Maybe predownload and feed it inside the build directory?

@freezeboy
Copy link
Contributor Author

I don't know where the folder is supposed to appear and to hook into cmake's FetchContent system

@SuperSandro2000
Copy link
Member

@freezeboy friendly ping

@freezeboy
Copy link
Contributor Author

I could not find where the folder is supposed to appear for cmake, any inputs are welcome

@r-burns
Copy link
Contributor

r-burns commented Dec 30, 2020

Bit of a hack but this seems to work for me.

diff --git a/pkgs/applications/science/logic/opensmt/default.nix b/pkgs/applications/science/logic/opensmt/default.nix
index 249d0722699..3641229f7c1 100644
--- a/pkgs/applications/science/logic/opensmt/default.nix
+++ b/pkgs/applications/science/logic/opensmt/default.nix
@@ -1,6 +1,7 @@
 { stdenv, lib, fetchFromGitHub
 , cmake, libedit, gmpxx, bison, flex
 , enableReadline ? false, readline
+, gtest
 }:
 
 stdenv.mkDerivation rec {
@@ -17,6 +18,15 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake bison flex ];
   buildInputs = [ libedit gmpxx ] ++ lib.optional enableReadline readline;
 
+  preConfigure = ''
+    substituteInPlace test/CMakeLists.txt \
+      --replace 'FetchContent_Populate' '#FetchContent_Populate'
+  '';
+  cmakeFlags = [
+    "-Dgoogletest_SOURCE_DIR=${gtest.src}"
+    "-Dgoogletest_BINARY_DIR=./gtest-build"
+  ];
+
   meta = with lib; {
     description = "A satisfiability modulo theory (SMT) solver";
     maintainers = [ maintainers.raskin ];

Edit: to be clear, I'm not using this package, so if you aren't either, I'm fine to let this get dropped

Verified

This commit was signed with the committer’s verified signature. The key has expired.
vdemeester Vincent Demeester
@freezeboy
Copy link
Contributor Author

In integrated your patch, thank you for it.

I don't know precisely if other people use it in nixpkgs, I have no strong feeling about it.
I let you decide if it is worth integrating this version now it works, or to remove it from nixpkgs

Copy link
Contributor

@r-burns r-burns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, since you've done all the work I'd say this is good to merge.

Result of nixpkgs-review pr 102421 run on x86_64-linux 1

1 package built:
  • opensmt

@7c6f434c 7c6f434c marked this pull request as ready for review January 14, 2021 14:20

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@7c6f434c 7c6f434c merged commit 805108e into NixOS:master Jan 14, 2021
@freezeboy freezeboy deleted the remove-opensmt branch January 15, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants