diff options
Diffstat (limited to 'pkgs/by-name/ar')
-rw-r--r-- | pkgs/by-name/ar/arjun-cnf/fix-red-clause.patch | 28 | ||||
-rw-r--r-- | pkgs/by-name/ar/arjun-cnf/package.nix | 48 | ||||
-rw-r--r-- | pkgs/by-name/ar/arjun/package.nix | 4 | ||||
-rw-r--r-- | pkgs/by-name/ar/arxiv-latex-cleaner/package.nix | 6 |
4 files changed, 81 insertions, 5 deletions
diff --git a/pkgs/by-name/ar/arjun-cnf/fix-red-clause.patch b/pkgs/by-name/ar/arjun-cnf/fix-red-clause.patch new file mode 100644 index 0000000000000..a7f4d6755431f --- /dev/null +++ b/pkgs/by-name/ar/arjun-cnf/fix-red-clause.patch @@ -0,0 +1,28 @@ +diff --git a/src/arjun.cpp b/src/arjun.cpp +index d6ad786..119a267 100644 +--- a/src/arjun.cpp ++++ b/src/arjun.cpp +@@ -98,6 +98,11 @@ DLL_PUBLIC bool Arjun::add_clause(const vector<CMSat::Lit>& lits) + return arjdata->common.solver->add_clause(lits); + } + ++DLL_PUBLIC bool Arjun::add_red_clause(const vector<CMSat::Lit>& lits) ++{ ++ return arjdata->common.solver->add_red_clause(lits); ++} ++ + DLL_PUBLIC bool Arjun::add_xor_clause(const vector<uint32_t>& vars, bool rhs) + { + assert(false && "Funnily enough this does NOT work. The XORs would generate a BVA variable, and that would then not be returned as part of the simplified CNF. We could calculate a smaller independent set, but that's all."); +diff --git a/src/arjun.h b/src/arjun.h +index a39070c..907472a 100644 +--- a/src/arjun.h ++++ b/src/arjun.h +@@ -61,6 +61,7 @@ namespace ArjunNS { + void new_var(); + bool add_xor_clause(const std::vector<uint32_t>& vars, bool rhs); + bool add_clause(const std::vector<CMSat::Lit>& lits); ++ bool add_red_clause(const std::vector<CMSat::Lit>& lits); + bool add_bnn_clause( + const std::vector<CMSat::Lit>& lits, + signed cutoff, diff --git a/pkgs/by-name/ar/arjun-cnf/package.nix b/pkgs/by-name/ar/arjun-cnf/package.nix new file mode 100644 index 0000000000000..48e18272fda58 --- /dev/null +++ b/pkgs/by-name/ar/arjun-cnf/package.nix @@ -0,0 +1,48 @@ +{ stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, cryptominisat +, boost +, louvain-community +, lib +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "arjun-cnf"; + version = "2.5.2"; + + src = fetchFromGitHub { + owner = "meelgroup"; + repo = "arjun"; + rev = finalAttrs.version; + hash = "sha256-5duc05s654HLjbf+dPgyMn6QUVvB0vLji3M4S2o/QYU="; + }; + + # Can be removed after next release + patches = [ + (fetchpatch { + url = "https://github.com/meelgroup/arjun/commit/34188760f1ab4b1b557c45ccaee8d2b9b6f0b901.patch"; + hash = "sha256-E/yk2ohHP2BAFg353r8EU01bZCqeEjvpJCrBsxPiOWM="; + }) + # Based on https://github.com/meelgroup/arjun/commit/99c4ed4ad820674632c5d9bbcc98c001f8cac98f + ./fix-red-clause.patch + ]; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + boost + cryptominisat + louvain-community + ]; + + meta = with lib; { + description = "CNF minimizer and minimal independent set calculator"; + homepage = "https://github.com/meelgroup/arjun"; + license = licenses.mit; + maintainers = with maintainers; [ t4ccer ]; + platforms = platforms.linux; + mainProgram = "arjun"; + }; +}) diff --git a/pkgs/by-name/ar/arjun/package.nix b/pkgs/by-name/ar/arjun/package.nix index bd98e1c1cb33b..685195c91d429 100644 --- a/pkgs/by-name/ar/arjun/package.nix +++ b/pkgs/by-name/ar/arjun/package.nix @@ -5,14 +5,14 @@ python3.pkgs.buildPythonApplication rec { pname = "arjun"; - version = "2.2.1"; + version = "2.2.2"; pyproject = true; src = fetchFromGitHub { owner = "s0md3v"; repo = "Arjun"; rev = "refs/tags/${version}"; - hash = "sha256-YxfUlD7aBwoYYsZE0zTZxoXg1TgU2yT1V+mglmsXtlo="; + hash = "sha256-odVUFs517RSp66MymniSeTKTntQtXomjC68Hhdsglf0="; }; nativeBuildInputs = with python3.pkgs; [ diff --git a/pkgs/by-name/ar/arxiv-latex-cleaner/package.nix b/pkgs/by-name/ar/arxiv-latex-cleaner/package.nix index c1f4a8a3d75b4..d2d75a2d284a9 100644 --- a/pkgs/by-name/ar/arxiv-latex-cleaner/package.nix +++ b/pkgs/by-name/ar/arxiv-latex-cleaner/package.nix @@ -5,13 +5,13 @@ }: python3Packages.buildPythonApplication rec { pname = "arxiv-latex-cleaner"; - version = "1.0.1"; + version = "1.0.3"; src = fetchFromGitHub { owner = "google-research"; repo = "arxiv-latex-cleaner"; - rev = "v${version}"; - hash = "sha256-1IWSDKEoAM4hBKAEEcPq7X89WYDprifDL2GTEJQtdcQ="; + rev = "refs/tags/v${version}"; + hash = "sha256-kM1eCzXipJ6GuYFA9Na2C0HtwHLotmE63nyUZ+9wkkk="; }; propagatedBuildInputs = with python3Packages; [ |