49 lines
774 B
Nix
49 lines
774 B
Nix
![]() |
{
|
||
|
pkgs ? (import ./pkgs.nix { }),
|
||
|
}:
|
||
|
|
||
|
pkgs.callPackage (
|
||
|
{
|
||
|
stdenv,
|
||
|
bluespec,
|
||
|
nextpnr,
|
||
|
openfpgaloader,
|
||
|
trellis,
|
||
|
which,
|
||
|
yosys,
|
||
|
}:
|
||
|
stdenv.mkDerivation {
|
||
|
pname = "bluespec-joh-template";
|
||
|
version = "0.1.0";
|
||
|
src = ./.;
|
||
|
|
||
|
# Versions can be checked with
|
||
|
# `nix eval --json ".#bluespec-joh-template.nativeBuildInputs" | nix-shell -p jq --run jq`
|
||
|
nativeBuildInputs = [
|
||
|
bluespec
|
||
|
nextpnr
|
||
|
openfpgaloader
|
||
|
trellis
|
||
|
which
|
||
|
yosys
|
||
|
];
|
||
|
|
||
|
makeFlags = [
|
||
|
"-C"
|
||
|
"ulx3s_fpga"
|
||
|
"mkTop.bit"
|
||
|
];
|
||
|
|
||
|
installPhase = ''
|
||
|
runHook preInstall
|
||
|
|
||
|
mkdir -p $out
|
||
|
cp ./ulx3s_fpga/mkTop.bit $out/
|
||
|
|
||
|
runHook postInstall
|
||
|
'';
|
||
|
|
||
|
passthru = { inherit pkgs; };
|
||
|
}
|
||
|
) { }
|