about summary refs log tree commit diff
path: root/pkgs/development/compilers/yosys/plugins/bluespec.nix
blob: 519da019c25136ed9b9465bd67ef8744700fe067 (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
{ stdenv, lib, fetchFromGitHub, pkg-config
, yosys, readline, zlib, bluespec
}:

stdenv.mkDerivation {
  pname = "yosys-bluespec";
  version = "2021.09.08";

  src = fetchFromGitHub {
    owner  = "thoughtpolice";
    repo   = "yosys-bluespec";
    rev    = "f6f4127a4e96e18080fd5362b6769fa3e24c76b1";
    sha256 = "sha256-3cNFP/k4JsgLyUQHWU10Htl2Rh0staAcA3R4piD6hDE=";
  };

  buildInputs = [ yosys readline zlib bluespec ];
  nativeBuildInputs = [ pkg-config ];

  doCheck = true;
  makeFlags = [
    "PREFIX=$(out)/share/yosys/plugins"
    "STATIC_BSC_PATH=${bluespec}/bin/bsc"
    "STATIC_BSC_LIBDIR=${bluespec}/lib"
  ];

  meta = with lib; {
    description = "Bluespec plugin for Yosys";
    license     = licenses.isc;
    platforms   = platforms.all;
    maintainers = with maintainers; [ thoughtpolice ];
  };
}