diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-21 06:05:12 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-21 06:05:12 +0100 |
commit | f107be784e6d5da5f90735765a68fdff96acfbb4 (patch) | |
tree | 145573a598009fb6adbd5ef7fbce0a850681f5f0 /infra/libkookie/nixpkgs/pkgs/development/tools/trellis | |
parent | 2e04b35e5ac3a9123cafffbc84494fa4d389cca0 (diff) | |
parent | e9158eca70ae59e73fae23be5d13d3fa0cfc78b4 (diff) |
Add 'infra/libkookie/nixpkgs/' from commit 'e9158eca70ae59e73fae23be5d13d3fa0cfc78b4'
git-subtree-dir: infra/libkookie/nixpkgs
git-subtree-mainline: 2e04b35e5ac3a9123cafffbc84494fa4d389cca0
git-subtree-split: e9158eca70ae59e73fae23be5d13d3fa0cfc78b4
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/tools/trellis')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/tools/trellis/default.nix | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/tools/trellis/default.nix b/infra/libkookie/nixpkgs/pkgs/development/tools/trellis/default.nix new file mode 100644 index 000000000000..c9884a8eacd8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/tools/trellis/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchFromGitHub +, python3, boost +, cmake +}: + +stdenv.mkDerivation rec { + pname = "trellis"; + version = "2020.11.25"; + + # git describe --tags + realVersion = with stdenv.lib; with builtins; + "1.0-476-g${substring 0 7 (elemAt srcs 0).rev}"; + + srcs = [ + (fetchFromGitHub { + owner = "SymbiFlow"; + repo = "prjtrellis"; + rev = "a441cd9d0390648e96bf27096626eb2c904096de"; + sha256 = "1rsck44n4mf9v3vfac51ksrhcs84s7q297nq1kjkzzvmsx09gd9k"; + name = "trellis"; + }) + + (fetchFromGitHub { + owner = "SymbiFlow"; + repo = "prjtrellis-db"; + rev = "2cf058e7a3ba36134d21e34823e9b2ecaaceac2c"; + sha256 = "1hjaw5jkwiaiznm2z0smy88m2cdz63cd51z4nibajfih7ikvkj6g"; + 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" + ]; + enableParallelBuilding = true; + + preConfigure = with builtins; '' + 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; + maintainers = with maintainers; [ q3k thoughtpolice emily ]; + platforms = stdenv.lib.platforms.all; + }; +} |