diff options
author | Pooya Moradi <pvonmoradi@gmail.com> | 2021-08-14 19:56:45 +0430 |
---|---|---|
committer | Pooya Moradi <pvonmoradi@gmail.com> | 2021-08-16 15:30:02 +0430 |
commit | f46e3cbf67b6e2c6514df178f6bdbc5718f002e7 (patch) | |
tree | 1f4d299e08474e32f1a473ffea2916f9717a1655 /pkgs/development/embedded | |
parent | 87c7e516bdc5601b17a2fad6c76a43d566251353 (diff) |
trellis: move the directory to pkgs/development/embedded/fpga/
Diffstat (limited to 'pkgs/development/embedded')
-rw-r--r-- | pkgs/development/embedded/fpga/trellis/default.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/embedded/fpga/trellis/default.nix b/pkgs/development/embedded/fpga/trellis/default.nix new file mode 100644 index 0000000000000..4d14b6a782002 --- /dev/null +++ b/pkgs/development/embedded/fpga/trellis/default.nix @@ -0,0 +1,61 @@ +{ lib, stdenv, fetchFromGitHub +, python3, boost +, cmake +}: + +stdenv.mkDerivation rec { + pname = "trellis"; + version = "2021.07.06"; + + # git describe --tags + realVersion = with lib; with builtins; + "1.0-482-g${substring 0 7 (elemAt srcs 0).rev}"; + + srcs = [ + (fetchFromGitHub { + owner = "YosysHQ"; + repo = "prjtrellis"; + rev = "dff1cbcb1bd30de7e96f8a059f2e19be1bb2e44d"; + sha256 = "1gbrka9gqn124shx448aivbgywyp30zyjwfazr7v49lhrl7d46lb"; + name = "trellis"; + }) + + (fetchFromGitHub { + owner = "YosysHQ"; + repo = "prjtrellis-db"; + rev = "0ee729d20eaf9f1e0f1d657bc6452e3ffe6a0d63"; + sha256 = "0069c98bb4wilxz21snwc39yy0rm7ffma179djyz57d99p0vcfkq"; + name = "trellis-database"; + }) + ]; + sourceRoot = "trellis"; + + buildInputs = [ boost ]; + nativeBuildInputs = [ cmake python3 ]; + cmakeFlags = [ + "-DCURRENT_GIT_VERSION=${realVersion}" + # TODO: should this be in stdenv instead? + "-DCMAKE_INSTALL_DATADIR=${placeholder "out"}/share" + ]; + + preConfigure = with builtins; '' + rmdir database && ln -sfv ${elemAt srcs 1} ./database + + source environment.sh + cd libtrellis + ''; + + meta = with 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 = lib.licenses.isc; + maintainers = with maintainers; [ q3k thoughtpolice emily ]; + platforms = lib.platforms.all; + }; +} |