forked from M-Labs/nix-scripts
gluelogic: build Fastino gateware
This commit is contained in:
parent
e2c1948931
commit
d6691c2e68
@ -1,11 +1,11 @@
|
|||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> {} }:
|
||||||
let
|
let
|
||||||
migen = (pkgs.callPackage ../artiq-fast/pkgs/python-deps.nix {}).migen;
|
artiqpkgs = import ../artiq-fast/pkgs/python-deps.nix { inherit (pkgs) stdenv fetchFromGitHub python3Packages; };
|
||||||
ise = import ./ise.nix { inherit pkgs; };
|
ise = import ./ise.nix { inherit pkgs; };
|
||||||
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
||||||
name = "urukul-cpld-${version}";
|
name = "urukul-cpld-${version}";
|
||||||
inherit src;
|
inherit src;
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [migen]))] ++ (builtins.attrValues ise);
|
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
||||||
phases = ["buildPhase" "installPhase"];
|
phases = ["buildPhase" "installPhase"];
|
||||||
buildPhase = "python $src/urukul_impl.py";
|
buildPhase = "python $src/urukul_impl.py";
|
||||||
installPhase =
|
installPhase =
|
||||||
@ -18,7 +18,7 @@ let
|
|||||||
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
||||||
name = "mirny-cpld-${version}";
|
name = "mirny-cpld-${version}";
|
||||||
inherit src;
|
inherit src;
|
||||||
buildInputs = [(pkgs.python3.withPackages(ps: [migen]))] ++ (builtins.attrValues ise);
|
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
||||||
phases = ["buildPhase" "installPhase"];
|
phases = ["buildPhase" "installPhase"];
|
||||||
buildPhase = "python $src/mirny_impl.py";
|
buildPhase = "python $src/mirny_impl.py";
|
||||||
installPhase =
|
installPhase =
|
||||||
@ -56,4 +56,17 @@ in
|
|||||||
sha256 = "0fyz0g1h1s54zdivkfqhgyhpq7gjkl9kxkcfy3104p2f889l1vgw";
|
sha256 = "0fyz0g1h1s54zdivkfqhgyhpq7gjkl9kxkcfy3104p2f889l1vgw";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
fastino-fpga = pkgs.stdenv.mkDerivation {
|
||||||
|
name = "fastino-fpga";
|
||||||
|
src = <fastinoSrc>;
|
||||||
|
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen artiqpkgs.misoc]))] ++ [pkgs.yosys pkgs.nextpnr pkgs.icestorm];
|
||||||
|
phases = ["buildPhase" "installPhase"];
|
||||||
|
buildPhase = "python $src/fastino_phy.py";
|
||||||
|
installPhase =
|
||||||
|
''
|
||||||
|
mkdir -p $out $out/nix-support
|
||||||
|
cp build/fastino.bin $out
|
||||||
|
echo file binary-dist $out/fastino.bin >> $out/nix-support/hydra-build-products
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,8 @@
|
|||||||
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.03", "emailresponsible": false },
|
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs-channels nixos-20.03", "emailresponsible": false },
|
||||||
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false },
|
||||||
"urukulSrc": { "type": "git", "value": "git://github.com/quartiq/urukul", "emailresponsible": false },
|
"urukulSrc": { "type": "git", "value": "git://github.com/quartiq/urukul", "emailresponsible": false },
|
||||||
"mirnySrc": { "type": "git", "value": "git://github.com/quartiq/mirny", "emailresponsible": false }
|
"mirnySrc": { "type": "git", "value": "git://github.com/quartiq/mirny", "emailresponsible": false },
|
||||||
|
"fastinoSrc": { "type": "git", "value": "git://github.com/quartiq/fastino", "emailresponsible": false }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zynq": {
|
"zynq": {
|
||||||
|
Loading…
Reference in New Issue
Block a user