71 lines
1.7 KiB
Nix
71 lines
1.7 KiB
Nix
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
let
|
|
migen = pkgs.python3Packages.buildPythonPackage rec {
|
|
name = "migen";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "m-labs";
|
|
repo = "migen";
|
|
rev = "ccaee68e14d3636e1d8fb2e0864dd89b1b1f7384";
|
|
sha256 = "sha256-oYdeY0MbTReKbAwmSznnqw0wNawdInJoFJVWW3tesFA=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
propagatedBuildInputs = with pkgs.python3Packages; [ colorama ];
|
|
};
|
|
|
|
misoc = pkgs.python3Packages.buildPythonPackage rec {
|
|
name = "misoc";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "m-labs";
|
|
repo = "misoc";
|
|
rev = "0cf0ebb7d4f56cc6d44a3dea3e386efab9d82419";
|
|
sha256 = "sha256-TI0agjSSMJtH4mgAMpSO128zxcwSo/AjY1B6AW7zBQQ=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
propagatedBuildInputs = with pkgs.python3Packages; [ jinja2 numpy pyserial asyncserial ] ++ [ migen ];
|
|
};
|
|
|
|
vivadoDeps = pkgs: with pkgs; [
|
|
libxcrypt
|
|
ncurses5
|
|
zlib
|
|
libuuid
|
|
xorg.libSM
|
|
xorg.libICE
|
|
xorg.libXrender
|
|
xorg.libX11
|
|
xorg.libXext
|
|
xorg.libXtst
|
|
xorg.libXi
|
|
freetype
|
|
fontconfig
|
|
];
|
|
|
|
vivadoEnv = pkgs.buildFHSUserEnv {
|
|
name = "vivado-env";
|
|
targetPkgs = vivadoDeps;
|
|
};
|
|
|
|
vivado = pkgs.buildFHSUserEnv {
|
|
name = "vivado";
|
|
targetPkgs = vivadoDeps;
|
|
profile = "set -e; source /opt/Xilinx/Vivado/2022.2/settings64.sh";
|
|
runScript = "vivado";
|
|
};
|
|
|
|
in pkgs.mkShell {
|
|
name = "UART-Testing";
|
|
buildInputs = [
|
|
migen
|
|
misoc
|
|
pkgs.python3Packages.pyserial
|
|
vivado
|
|
vivadoEnv
|
|
pkgs.python3Packages.numpy
|
|
];
|
|
}
|