@@ -0,0 +1,49 @@
1+{ stdenv, fetchFromGitHub, python3, cmake, boost }:
2+
3+let
4+ trellisdb = fetchFromGitHub {
5+ owner = "SymbiFlow";
6+ repo = "prjtrellis-db";
7+ rev = "06b429ddb7fd8ec1e3f2b35de2e94b4853cf2835";
8+ sha256 = "07bsgw5x3gq0jcn9j4g7q9xvibvz6j2arjnvgyrxnrg30ri9q173";
9+ };
10+in
11+stdenv.mkDerivation rec {
12+ name = "trellis-${version}";
13+ version = "2018.08.01";
14+
15+ buildInputs = [
16+ (boost.override { python = python3; enablePython = true; })
17+ ];
18+
19+ nativeBuildInputs = [
20+ cmake python3
21+ ];
22+
23+ src = fetchFromGitHub {
24+ owner = "SymbiFlow";
25+ repo = "prjtrellis";
26+ rev = "fff9532fe59bf9e38b44f029ce4a06c607a9ee78";
27+ sha256 = "0ycw9fjf6428sf5x8x5szn8fha79610nf7nn8kmibgmz9868yv30";
28+ };
29+
30+ preConfigure = ''
31+ source environment.sh
32+ cp -RT "${trellisdb}" database
33+ cd libtrellis
34+ '';
35+
36+ meta = {
37+ description = "Documentation and tools for Lattice ECP5 FPGAs";
38+ longDescription = ''
39+ Project Trellis documents the Lattice ECP5 architecture
40+ to enable development of open-source tools. Its goal is
41+ to provide sufficient information to develop a free and
42+ open Verilog to bitstream toolchain for these devices.
43+ '';
44+ homepage = https://github.com/SymbiFlow/prjtrellis;
45+ license = stdenv.lib.licenses.isc;
46+ maintainers = with stdenv.lib.maintainers; [ q3k ];
47+ platforms = stdenv.lib.platforms.linux;
48+ };
49+}