tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
silice: init at unstable-2022-08-05
Astro
3 years ago
44572506
3be5a4dd
+89
2 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
silice
default.nix
top-level
all-packages.nix
+87
pkgs/development/compilers/silice/default.nix
reviewed
···
1
1
+
{ stdenv, fetchFromGitHub, lib
2
2
+
, cmake, pkg-config, openjdk
3
3
+
, libuuid, python3
4
4
+
, silice, yosys, nextpnr, verilator
5
5
+
, dfu-util, icestorm, trellis
6
6
+
}:
7
7
+
8
8
+
stdenv.mkDerivation rec {
9
9
+
pname = "silice";
10
10
+
version = "unstable-2022-08-05";
11
11
+
12
12
+
src = fetchFromGitHub {
13
13
+
owner = "sylefeb";
14
14
+
repo = pname;
15
15
+
rev = "e26662ac757151e5dd8c60c45291b44906b1299f";
16
16
+
sha256 = "sha256-Q1JdgDlEErutZh0OfxYy5C4aVijFKlf6Hm5Iv+1jsj4=";
17
17
+
fetchSubmodules = true;
18
18
+
};
19
19
+
20
20
+
nativeBuildInputs = [
21
21
+
cmake
22
22
+
pkg-config
23
23
+
openjdk
24
24
+
];
25
25
+
buildInputs = [
26
26
+
libuuid
27
27
+
];
28
28
+
propagatedBuildInputs = [
29
29
+
(python3.withPackages (p: with p; [ edalize ]))
30
30
+
];
31
31
+
32
32
+
postPatch = ''
33
33
+
patchShebangs antlr/antlr.sh
34
34
+
# use nixpkgs version
35
35
+
rm -r python/pybind11
36
36
+
'';
37
37
+
38
38
+
installPhase = ''
39
39
+
make install
40
40
+
mkdir -p $out
41
41
+
cp -ar ../{bin,frameworks,lib} $out/
42
42
+
'';
43
43
+
44
44
+
passthru.tests =
45
45
+
let
46
46
+
testProject = project: stdenv.mkDerivation {
47
47
+
name = "${silice.name}-test-${project}";
48
48
+
nativeBuildInputs = [
49
49
+
silice
50
50
+
yosys
51
51
+
nextpnr
52
52
+
verilator
53
53
+
dfu-util
54
54
+
icestorm
55
55
+
trellis
56
56
+
];
57
57
+
src = "${src}/projects";
58
58
+
sourceRoot = "projects/${project}";
59
59
+
buildPhase = ''
60
60
+
targets=$(cut -d " " -f 2 configs | tr -d '\r')
61
61
+
for target in $targets ; do
62
62
+
make $target ARGS="--no_program"
63
63
+
done
64
64
+
'';
65
65
+
installPhase = ''
66
66
+
mkdir $out
67
67
+
for target in $targets ; do
68
68
+
cp -r BUILD_$target $out/
69
69
+
done
70
70
+
'';
71
71
+
};
72
72
+
in {
73
73
+
# a selection of test projects that build with the FPGA tools in
74
74
+
# nixpkgs
75
75
+
audio_sdcard_streamer = testProject "audio_sdcard_streamer";
76
76
+
bram_interface = testProject "bram_interface";
77
77
+
blinky = testProject "blinky";
78
78
+
pipeline_sort = testProject "pipeline_sort";
79
79
+
};
80
80
+
81
81
+
meta = with lib; {
82
82
+
description = "Open source language that simplifies prototyping and writing algorithms on FPGA architectures";
83
83
+
homepage = "https://github.com/sylefeb/Silice";
84
84
+
license = licenses.bsd2;
85
85
+
maintainers = [ maintainers.astro ];
86
86
+
};
87
87
+
}
+2
pkgs/top-level/all-packages.nix
reviewed
···
10826
10826
lua = lua5_3;
10827
10827
};
10828
10828
10829
10829
+
silice = callPackage ../development/compilers/silice { };
10830
10830
+
10829
10831
silver-searcher = callPackage ../tools/text/silver-searcher { };
10830
10832
10831
10833
simpleproxy = callPackage ../tools/networking/simpleproxy { };