1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/trellis/default.nix

60 lines
1.8 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub
, python3, boost
, cmake
}:
let
boostWithPython3 = boost.override { python = python3; enablePython = true; };
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}";
srcs = [
(fetchFromGitHub {
owner = "symbiflow";
repo = "prjtrellis";
2019-08-31 15:04:42 +01:00
rev = "98871e0e2959bc8cb4de3c7ebe2b9eddc4efe00c";
sha256 = "1yq7ih2xvhfvdpijmbqjq6jcngl6710kiv66hkww5ih8j5dzsq5l";
name = "trellis";
})
(fetchFromGitHub {
owner = "symbiflow";
repo = "prjtrellis-db";
2019-08-14 00:39:13 +01:00
rev = "b4d626b6402c131e9a035470ffe4cf33ccbe7986";
sha256 = "0k26lq6c049ja8hhqcljwjb1y5k4gcici23l2n86gyp83jr03ilx";
name = "database";
})
];
sourceRoot = "trellis";
buildInputs = [ boostWithPython3 ];
nativeBuildInputs = [ cmake python3 ];
preConfigure = with builtins; ''
2019-08-31 15:04:42 +01:00
substituteInPlace libtrellis/CMakeLists.txt \
--replace "git describe --tags" "echo ${realVersion}"
rmdir database && ln -sfv ${elemAt srcs 1} ./database
source environment.sh
cd libtrellis
'';
meta = with stdenv.lib; {
description = "Documentation and bitstream tools for Lattice ECP5 FPGAs";
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.
'';
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;
};
}