about summary refs log tree commit diff
path: root/pkgs/by-name/ar/arjun-cnf/package.nix
blob: 48e18272fda583bdca821e048fdad0ed43632eb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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";
  };
})