forked from M-Labs/nix-scripts
add back missing dependencies
This commit is contained in:
parent
71c1b297b3
commit
af2287b22f
@ -1,12 +1,12 @@
|
||||
{ pkgs ? import <nixpkgs> {} }:
|
||||
let
|
||||
artiqpkgs = import ../artiq-fast/pkgs/python-deps.nix { inherit (pkgs) lib fetchgit fetchFromGitHub python3Packages; misoc-new = true; };
|
||||
ise = import ./ise.nix { inherit pkgs; };
|
||||
vivado = import ../artiq-fast/vivado.nix { inherit pkgs; };
|
||||
vivado = import ./vivado.nix { inherit pkgs; };
|
||||
fpgatools = import ./fpgatools.nix { inherit pkgs; };
|
||||
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
||||
pname = "urukul-cpld";
|
||||
inherit src version;
|
||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
||||
buildInputs = [(pkgs.python3.withPackages(ps: [fpgatools.migen]))] ++ (builtins.attrValues fpgatools.ise);
|
||||
phases = ["buildPhase" "installPhase"];
|
||||
buildPhase = "python $src/urukul_impl.py";
|
||||
installPhase =
|
||||
@ -19,7 +19,7 @@ let
|
||||
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
|
||||
pname = "mirny-cpld";
|
||||
inherit src version;
|
||||
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
|
||||
buildInputs = [(pkgs.python3.withPackages(ps: [fpgatools.migen]))] ++ (builtins.attrValues fpgatools.ise);
|
||||
phases = ["buildPhase" "installPhase"];
|
||||
buildPhase = "python $src/mirny_impl.py";
|
||||
installPhase =
|
||||
@ -69,7 +69,7 @@ in
|
||||
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];
|
||||
buildInputs = [(pkgs.python3.withPackages(ps: [fpgatools.migen fpgatools.misoc]))] ++ [pkgs.yosys pkgs.nextpnr pkgs.icestorm];
|
||||
phases = ["buildPhase" "installPhase"];
|
||||
buildPhase = "python $src/fastino_phy.py";
|
||||
installPhase =
|
||||
@ -88,7 +88,7 @@ in
|
||||
""
|
||||
'';
|
||||
|
||||
buildInputs = [ (pkgs.python3.withPackages(ps: [ artiqpkgs.migen artiqpkgs.misoc ])) ] ++ [ vivado ];
|
||||
buildInputs = [ (pkgs.python3.withPackages(ps: [ fpgatools.migen fpgatools.misoc ])) ] ++ [ fpgatools.vivado ];
|
||||
buildPhase = "python phaser.py";
|
||||
installPhase =
|
||||
''
|
||||
|
84
gluelogic/fpgatools.nix
Normal file
84
gluelogic/fpgatools.nix
Normal file
@ -0,0 +1,84 @@
|
||||
{ pkgs, isePath ? "/opt/Xilinx/14.7/ISE_DS", vivadoPath ? "/opt/Xilinx/Vivado/2021.2" }:
|
||||
rec {
|
||||
ise = let
|
||||
makeXilinxEnv = name: pkgs.buildFHSUserEnv {
|
||||
inherit name;
|
||||
targetPkgs = pkgs: (
|
||||
with pkgs; [
|
||||
ncurses5
|
||||
zlib
|
||||
libuuid
|
||||
xorg.libSM
|
||||
xorg.libICE
|
||||
xorg.libXrender
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXtst
|
||||
xorg.libXi
|
||||
]
|
||||
);
|
||||
profile =
|
||||
''
|
||||
source ${isePath}/common/.settings64.sh ${isePath}/common
|
||||
source ${isePath}/ISE/.settings64.sh ${isePath}/ISE
|
||||
'';
|
||||
runScript = name;
|
||||
};
|
||||
in
|
||||
pkgs.lib.attrsets.genAttrs ["xst" "ngdbuild" "cpldfit" "taengine" "hprep6"] makeXilinxEnv;
|
||||
vivado = pkgs.buildFHSUserEnv {
|
||||
name = "vivado";
|
||||
targetPkgs = pkgs: (
|
||||
with pkgs; [
|
||||
ncurses5
|
||||
zlib
|
||||
libuuid
|
||||
xorg.libSM
|
||||
xorg.libICE
|
||||
xorg.libXrender
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXtst
|
||||
xorg.libXi
|
||||
] ++ ( if pkgs ? libxcrypt-legacy then [ pkgs.libxcrypt-legacy ] else [])
|
||||
);
|
||||
profile = "source ${vivadoPath}/settings64.sh";
|
||||
runScript = "vivado";
|
||||
};
|
||||
migen = pkgs.python3Packages.buildPythonPackage {
|
||||
pname = "migen";
|
||||
version = "unstable-2021-12-16";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "m-labs";
|
||||
repo = "migen";
|
||||
rev = "ac703010eaa06ac9b6e32f97c6fa98b15de22b31";
|
||||
sha256 = "sha256-qpVj/yJf4hDDc99XXpVPH4EbLC8aCmEtACn5qNc3DGI=";
|
||||
};
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [ colorama ];
|
||||
};
|
||||
asyncserial = pkgs.python3Packages.buildPythonPackage {
|
||||
pname = "asyncserial";
|
||||
version = "0.1";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "m-labs";
|
||||
repo = "asyncserial";
|
||||
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
||||
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
||||
};
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [ pyserial ];
|
||||
};
|
||||
misoc = pkgs.python3Packages.buildPythonPackage {
|
||||
pname = "misoc";
|
||||
version = "unstable-2021-10-10";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "m-labs";
|
||||
repo = "misoc";
|
||||
rev = "f5203e406520874e15ab5d070058ef642fc57fd9";
|
||||
sha256 = "sha256-/2XTejqj0Bo81HaTrlTSWwInnWwsuqnq+CURXbpIrkA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
# TODO: fix misoc bitrot and re-enable tests
|
||||
doCheck = false;
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
|
||||
};
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Install ISE in /opt and add to /etc/nixos/configuration.nix:
|
||||
# nix.sandboxPaths = ["/opt"];
|
||||
|
||||
{ pkgs, isePath ? "/opt/Xilinx/14.7/ISE_DS" }:
|
||||
|
||||
let
|
||||
makeXilinxEnv = name: pkgs.buildFHSUserEnv {
|
||||
inherit name;
|
||||
targetPkgs = pkgs: (
|
||||
with pkgs; [
|
||||
ncurses5
|
||||
zlib
|
||||
libuuid
|
||||
xorg.libSM
|
||||
xorg.libICE
|
||||
xorg.libXrender
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
xorg.libXtst
|
||||
xorg.libXi
|
||||
]
|
||||
);
|
||||
profile =
|
||||
''
|
||||
source ${isePath}/common/.settings64.sh ${isePath}/common
|
||||
source ${isePath}/ISE/.settings64.sh ${isePath}/ISE
|
||||
'';
|
||||
runScript = name;
|
||||
};
|
||||
in
|
||||
pkgs.lib.attrsets.genAttrs ["xst" "ngdbuild" "cpldfit" "taengine" "hprep6"] makeXilinxEnv
|
Loading…
Reference in New Issue
Block a user