summary refs log tree commit diff
path: root/pkgs/applications/science/logic/abc/default.nix
blob: 1685bb7aba33ce9039ef08c514643e116a0e3e88 (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
{ lib
, stdenv
, fetchFromGitHub
, readline
, cmake
}:

stdenv.mkDerivation (finalAttrs: {
  pname   = "abc-verifier";
  version = "unstable-2023-10-13";

  src = fetchFromGitHub {
    owner = "yosyshq";
    repo  = "abc";
    rev   = "896e5e7dedf9b9b1459fa019f1fa8aa8101fdf43";
    hash  = "sha256-ou+E2lvDEOxXRXNygE/TyVi7quqk+CJHRI+HDI0xljE=";
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ readline ];

  installPhase = ''
    runHook preInstall
    install -Dm755 'abc' "$out/bin/abc"
    runHook postInstall
  '';

  # needed by yosys
  passthru.rev = finalAttrs.src.rev;

  meta = with lib; {
    description = "A tool for squential logic synthesis and formal verification";
    homepage    = "https://people.eecs.berkeley.edu/~alanmi/abc";
    license     = licenses.mit;
    maintainers = with maintainers; [ thoughtpolice Luflosi ];
    mainProgram = "abc";
    platforms   = platforms.unix;
  };
})