serdes-transceiver/default.nix

71 lines
1.7 KiB
Nix
Raw Normal View History

2023-04-23 11:42:18 +08:00
{ pkgs ? import <nixpkgs> {} }:
let
migen = pkgs.python3Packages.buildPythonPackage rec {
name = "migen";
src = pkgs.fetchFromGitHub {
owner = "m-labs";
repo = "migen";
2023-04-26 08:03:47 +08:00
rev = "ccaee68e14d3636e1d8fb2e0864dd89b1b1f7384";
sha256 = "sha256-oYdeY0MbTReKbAwmSznnqw0wNawdInJoFJVWW3tesFA=";
2023-04-23 11:42:18 +08:00
fetchSubmodules = true;
};
propagatedBuildInputs = with pkgs.python3Packages; [ colorama ];
};
2023-05-07 11:13:03 +08:00
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 ];
};
2023-04-23 11:42:18 +08:00
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
2023-05-07 11:13:03 +08:00
misoc
2023-04-23 11:42:18 +08:00
pkgs.python3Packages.pyserial
vivado
vivadoEnv
pkgs.python3Packages.numpy
];
}