serdes-transceiver/default.nix

56 lines
1.3 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 ];
};
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
];
}