serdes-transceiver/default.nix

56 lines
1.3 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";
rev = "7bc4eb1387b39159a74c1dbd1b820728e0bfbbaa";
sha256 = "039jk8y7f0vhr32svg3nd23i88c0bhws8ngxwk9bdznfxvhiy1h6";
fetchSubmodules = true;
};
propagatedBuildInputs = with pkgs.python3Packages; [ colorama ];
};
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
pkgs.python3Packages.pyserial
vivado
vivadoEnv
pkgs.python3Packages.numpy
];
}