2019-01-08 22:56:16 +00:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, python3, boost
|
|
|
|
, cmake
|
|
|
|
}:
|
2018-08-02 09:18:47 +01:00
|
|
|
|
|
|
|
let
|
2019-01-08 22:56:16 +00:00
|
|
|
boostWithPython3 = boost.override { python = python3; enablePython = true; };
|
2018-08-02 09:18:47 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-14 00:39:13 +01:00
|
|
|
pname = "trellis";
|
2019-08-31 15:04:42 +01:00
|
|
|
version = "2019.09.01";
|
|
|
|
realVersion = with stdenv.lib; with builtins;
|
|
|
|
"1.0-53-g${substring 0 7 (elemAt srcs 0).rev}";
|
2018-08-02 09:18:47 +01:00
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
srcs = [
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "symbiflow";
|
|
|
|
repo = "prjtrellis";
|
2019-08-31 15:04:42 +01:00
|
|
|
rev = "98871e0e2959bc8cb4de3c7ebe2b9eddc4efe00c";
|
|
|
|
sha256 = "1yq7ih2xvhfvdpijmbqjq6jcngl6710kiv66hkww5ih8j5dzsq5l";
|
2019-01-08 22:56:16 +00:00
|
|
|
name = "trellis";
|
|
|
|
})
|
|
|
|
(fetchFromGitHub {
|
|
|
|
owner = "symbiflow";
|
|
|
|
repo = "prjtrellis-db";
|
2019-08-14 00:39:13 +01:00
|
|
|
rev = "b4d626b6402c131e9a035470ffe4cf33ccbe7986";
|
|
|
|
sha256 = "0k26lq6c049ja8hhqcljwjb1y5k4gcici23l2n86gyp83jr03ilx";
|
2019-01-08 22:56:16 +00:00
|
|
|
name = "database";
|
|
|
|
})
|
2018-08-02 09:18:47 +01:00
|
|
|
];
|
2019-01-08 22:56:16 +00:00
|
|
|
sourceRoot = "trellis";
|
2018-08-02 09:18:47 +01:00
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
buildInputs = [ boostWithPython3 ];
|
|
|
|
nativeBuildInputs = [ cmake python3 ];
|
2018-08-02 09:18:47 +01:00
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
preConfigure = with builtins; ''
|
2019-08-31 15:04:42 +01:00
|
|
|
substituteInPlace libtrellis/CMakeLists.txt \
|
|
|
|
--replace "git describe --tags" "echo ${realVersion}"
|
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
rmdir database && ln -sfv ${elemAt srcs 1} ./database
|
2018-08-02 09:18:47 +01:00
|
|
|
|
|
|
|
source environment.sh
|
|
|
|
cd libtrellis
|
|
|
|
'';
|
|
|
|
|
2019-01-08 22:56:16 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Documentation and bitstream tools for Lattice ECP5 FPGAs";
|
2018-08-02 09:18:47 +01: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.
|
|
|
|
'';
|
2019-01-08 22:56:16 +00:00
|
|
|
homepage = https://github.com/symbiflow/prjtrellis;
|
|
|
|
license = stdenv.lib.licenses.isc;
|
2019-08-20 06:02:29 +01:00
|
|
|
maintainers = with maintainers; [ q3k thoughtpolice emily ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
2018-08-02 09:18:47 +01:00
|
|
|
};
|
|
|
|
}
|