1 { stdenv, fetchFromGitHub, lib
2 , cmake, pkg-config, openjdk
5 , yosys, nextpnr, verilator
6 , dfu-util, icestorm, trellis
10 stdenv.mkDerivation (finalAttrs: {
12 version = "0-unstable-2024-07-15";
14 src = fetchFromGitHub {
17 rev = "80980cff659839fca63859be4565597053a82a3c";
18 hash = "sha256-G+ExPdkhMdC3m9TBwr+3Oj2K6np5MaUULgiXq0G0rLs=";
19 fetchSubmodules = true;
31 propagatedBuildInputs = [
32 (python3.withPackages (p: [
39 patchShebangs antlr/antlr.sh
49 cp -ar ../{bin,frameworks,lib} $out/
56 silice = finalAttrs.finalPackage;
57 testProject = project: stdenv.mkDerivation {
58 name = "${silice.name}-test-${project}";
68 src = "${silice.src}/projects";
69 sourceRoot = "projects/${project}";
72 for target in $(cat configs | tr -d '\r') ; do
73 [[ $target != Makefile* ]] || continue
74 make $target ARGS="--no_program"
77 if test "''${#targets[@]}" -eq 0; then
78 >&2 echo "ERROR: no target found!"
84 for target in "''${targets[@]}" ; do
85 [[ $target != Makefile* ]] || continue
90 # a selection of test projects that build with the FPGA tools in
92 audio_sdcard_streamer = testProject "audio_sdcard_streamer";
93 bram_interface = testProject "bram_interface";
94 blinky = testProject "blinky";
95 pipeline_sort = testProject "pipeline_sort";
98 passthru.updateScript = unstableGitUpdater { };
101 description = "Open source language that simplifies prototyping and writing algorithms on FPGA architectures";
102 homepage = "https://github.com/sylefeb/Silice";
103 license = lib.licenses.bsd2;
104 mainProgram = "silice";
105 maintainers = with lib.maintainers; [
109 platforms = lib.platforms.all;