1
0
forked from M-Labs/urukul-pld

flake: add ice40 build

This commit is contained in:
2025-08-21 09:42:19 +08:00
parent 6fde32a18c
commit 572388d2e8

View File

@@ -63,8 +63,8 @@
packages.x86_64-linux = {
inherit migen;
urukul-cpld = pkgs.stdenv.mkDerivation {
name = "urukul-cpld";
urukul-xc2c = pkgs.stdenv.mkDerivation {
name = "urukul-xc2c";
src = self;
buildInputs = [ (pkgs.python3.withPackages (ps: [ migen ])) ] ++ (builtins.attrValues ise);
buildPhase = "python xc2c/urukul_impl.py";
@@ -74,6 +74,30 @@
echo file binary-dist $out/urukul.jed >> $out/nix-support/hydra-build-products
'';
};
urukul-ice40 = pkgs.stdenv.mkDerivation {
name = "urukul-ice40";
src = self;
buildInputs = [
(pkgs.python3.withPackages (ps: [ migen ]))
]
++ (with pkgs; [
yosys
nextpnr
icestorm
]);
buildPhase = ''
python ice40/urukul.py
python ice40/urukul.py --suservo
'';
installPhase = ''
mkdir -p $out $out/nix-support
cp build/urukul.bin $out
cp build/suservo.bin $out
echo file binary-dist $out/urukul.bin >> $out/nix-support/hydra-build-products
echo file binary-dist $out/suservo.bin >> $out/nix-support/hydra-build-products
'';
};
};
formatter.x86_64-linux = pkgs.nixfmt-tree;