2021-09-02 14:14:06 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, python3, boost, cmake }:
|
2020-03-25 11:45:57 +00:00
|
|
|
|
2021-09-02 14:14:06 +00:00
|
|
|
let
|
|
|
|
rev = "03e0070f263fbe31c247de61d259544722786210";
|
2019-09-27 14:06:56 +00:00
|
|
|
# git describe --tags
|
2021-09-02 14:14:06 +00:00
|
|
|
realVersion = "1.0-532-g${builtins.substring 0 7 rev}";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "trellis";
|
|
|
|
version = "2021-09-01";
|
2018-08-02 08:18:47 +00:00
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub {
|
2021-01-26 14:02:17 +00:00
|
|
|
owner = "YosysHQ";
|
2019-01-08 22:56:16 +00:00
|
|
|
repo = "prjtrellis";
|
2021-09-02 14:14:06 +00:00
|
|
|
inherit rev;
|
|
|
|
sha256 = "joQMsjVj8d3M3IaqOkfVQ1I5qPDM8HHJiye+Ak8f3dg=";
|
2019-01-08 22:56:16 +00:00
|
|
|
name = "trellis";
|
|
|
|
})
|
2020-03-25 11:45:57 +00:00
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
(fetchFromGitHub {
|
2021-01-26 14:02:17 +00:00
|
|
|
owner = "YosysHQ";
|
2019-01-08 22:56:16 +00:00
|
|
|
repo = "prjtrellis-db";
|
2021-09-02 14:14:06 +00:00
|
|
|
rev = "fdf4bf275a7402654bc643db537173e2fbc86103";
|
|
|
|
sha256 = "eDq2wU2pnfK9bOkEVZ07NQPv02Dc6iB+p5GTtVBiyQA=";
|
2019-10-13 16:28:14 +00:00
|
|
|
name = "trellis-database";
|
2019-01-08 22:56:16 +00:00
|
|
|
})
|
2018-08-02 08:18:47 +00:00
|
|
|
];
|
2019-01-08 22:56:16 +00:00
|
|
|
sourceRoot = "trellis";
|
2018-08-02 08:18:47 +00:00
|
|
|
|
2020-12-02 12:52:53 +00:00
|
|
|
buildInputs = [ boost ];
|
2019-01-08 22:56:16 +00:00
|
|
|
nativeBuildInputs = [ cmake python3 ];
|
2020-02-08 15:32:03 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCURRENT_GIT_VERSION=${realVersion}"
|
|
|
|
];
|
2018-08-02 08:18:47 +00:00
|
|
|
|
2021-09-02 14:14:06 +00:00
|
|
|
preConfigure = ''
|
|
|
|
rmdir database && ln -sfv ${builtins.elemAt srcs 1} ./database
|
2018-08-02 08:18:47 +00:00
|
|
|
|
|
|
|
cd libtrellis
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-08 22:56:16 +00:00
|
|
|
description = "Documentation and bitstream tools for Lattice ECP5 FPGAs";
|
2018-08-02 08:18:47 +00:00
|
|
|
longDescription = ''
|
|
|
|
Project Trellis documents the Lattice ECP5 architecture
|
|
|
|
to enable development of open-source tools. Its goal is
|
|
|
|
to provide sufficient information to develop a free and
|
|
|
|
open Verilog to bitstream toolchain for these devices.
|
|
|
|
'';
|
2021-09-02 14:14:06 +00:00
|
|
|
homepage = "https://github.com/YosysHQ/prjtrellis";
|
|
|
|
license = licenses.isc;
|
2019-08-20 05:02:29 +00:00
|
|
|
maintainers = with maintainers; [ q3k thoughtpolice emily ];
|
2021-09-02 14:14:06 +00:00
|
|
|
platforms = platforms.all;
|
2018-08-02 08:18:47 +00:00
|
|
|
};
|
|
|
|
}
|