Compare commits

...

6 Commits

Author SHA1 Message Date
Ada 8c1cf27d9b vivado.nix: use correct version 2022-04-05 17:11:32 -06:00
Ada e671bf3faf correct metaarray spelling 2022-03-23 20:28:58 -06:00
Ada e7a1686166 shell dev: add more libraries 2022-03-03 19:25:04 -07:00
Ada 2d2a16adc3 add artiq comtools and repo routines 2022-03-01 12:35:24 -07:00
Ada 9b34f19bdf shell dev: remove old code 2022-02-23 19:40:32 -07:00
Ada 23612c7418 add our custom packages to artiq environment, to correct commit 2022-02-23 19:18:19 -07:00
5 changed files with 124 additions and 4 deletions

View File

@ -21,7 +21,7 @@ let
}) {} boards; }) {} boards;
mainPackages = rec { mainPackages = rec {
inherit (pythonDeps) sipyco asyncserial pythonparser artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync; inherit (pythonDeps) sipyco artiq_tools asyncserial pythonparser artiq-netboot misoc migen microscope jesd204b migen-axi lit outputcheck qasync pyqtgraph;
binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; }; binutils-or1k = callPackage ./pkgs/binutils.nix { platform = "or1k"; target = "or1k-linux"; };
binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; }; binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; };
llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {}; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {};
@ -74,6 +74,14 @@ let
inherit (pythonDeps.qasync) version src; inherit (pythonDeps.qasync) version src;
}; };
}; };
conda-pyqtgraph = import ./conda/build.nix { inherit pkgs; } {
pname = "conda-pyqtgraph";
inherit (pythonDeps.pyqtgraph) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "pyqtgraph";
inherit (pythonDeps.pyqtgraph) version src;
};
};
conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix { conda-bscan-spi-bitstreams = import ./conda/bscan-spi-bitstreams.nix {
inherit pkgs; inherit pkgs;
bscan_spi_bitstreams = "${mainPackages.openocd}/share/bscan-spi-bitstreams"; bscan_spi_bitstreams = "${mainPackages.openocd}/share/bscan-spi-bitstreams";

View File

@ -10,8 +10,8 @@ python3Packages.buildPythonPackage rec {
nativeBuildInputs = [ qt5.wrapQtAppsHook ]; nativeBuildInputs = [ qt5.wrapQtAppsHook ];
propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ] propagatedBuildInputs = [ binutils-or1k llvm-or1k llvmlite-artiq ]
++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ]) ++ (lib.lists.optionals (lib.strings.versionAtLeast version "6.0") [ binutils-arm ])
++ (with pythonDeps; [ sipyco pythonparser ]) ++ (with pythonDeps; [ sipyco pythonparser pyqtgraph])
++ (with python3Packages; [ pygit2 numpy dateutil scipy prettytable pyserial python-Levenshtein h5py pyqt5 pyqtgraph ]) ++ (with python3Packages; [ pygit2 numpy dateutil scipy prettytable pyserial python-Levenshtein h5py pyqt5 ])
++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)]; ++ [(if (lib.strings.versionAtLeast version "6.0") then pythonDeps.qasync else python3Packages.quamash)];
dontWrapQtApps = true; dontWrapQtApps = true;

View File

@ -14,6 +14,13 @@ rec {
propagatedBuildInputs = with python3Packages; [ numpy ]; propagatedBuildInputs = with python3Packages; [ numpy ];
}; };
artiq_tools = python3Packages.buildPythonPackage rec {
pname = "artiq_tools";
version = "0.2";
src = /home/thomp/scratch/artiq_tools;
propagatedBuildInputs = with python3Packages; [ numpy typing ];
};
asyncserial = python3Packages.buildPythonPackage rec { asyncserial = python3Packages.buildPythonPackage rec {
pname = "asyncserial"; pname = "asyncserial";
version = "0.1"; version = "0.1";
@ -57,6 +64,20 @@ rec {
''; '';
}; };
pyqtgraph = python3Packages.buildPythonPackage rec {
pname = "pyqtgraph";
version = "0.12.3";
src = fetchFromGitHub {
rev = "123717df28ee91c0472ce939175c1b14bc1e4364";
owner = "jkthompsonlab";
repo = "pyqtgraph";
sha256 = "sha256-8RO2rl0/isS2/Ad5oAcuvaabg/wSoXGsL3PJdmGCfk4=";
};
propagatedBuildInputs = with python3Packages; [ numpy setuptools ];
doCheck = false;
};
# Development/firmware dependencies # Development/firmware dependencies
artiq-netboot = python3Packages.buildPythonPackage rec { artiq-netboot = python3Packages.buildPythonPackage rec {
pname = "artiq-netboot"; pname = "artiq-netboot";

View File

@ -1,12 +1,91 @@
{ pkgs ? import <nixpkgs> {}}: { pkgs ? import <nixpkgs> {}}:
with import <nixpkgs> {};
let let
artiqpkgs = import ./default.nix { inherit pkgs; }; artiqpkgs = import ./default.nix { inherit pkgs; };
vivado = import ./vivado.nix { inherit pkgs; }; vivado = import ./vivado.nix { inherit pkgs; };
sipyco = python3Packages.buildPythonPackage rec {
pname = "sipyco";
version = "0.1";
src = /home/thomp/scratch/sipyco;
propagatedBuildInputs = [ pkgs.python3Packages.statsmodels ];
doCheck = false;
};
MetaArray = python3Packages.buildPythonPackage rec {
pname = "MetaArray";
version = "2.0.2";
src = /home/thomp/scratch/metaarray;
propagatedBuildInputs = [ pkgs.python3Packages.numpy pkgs.python3Packages.h5py ];
};
artiq_comtools = python3Packages.buildPythonPackage rec {
pname = "artiq-comtools";
version = "0.1";
src = /home/thomp/scratch/artiq-comtools;
propagatedBuildInputs = [ sipyco pkgs.python3Packages.numpy pkgs.python3Packages.aiohttp ];
doCheck = false;
};
oitg = python3Packages.buildPythonPackage rec {
pname = "oitg";
version = "0.1";
src = /home/thomp/scratch/oitg;
propagatedBuildInputs = [ pkgs.python3Packages.statsmodels ];
doCheck = false;
};
python_library = python3Packages.buildPythonPackage rec {
pname = "python_library";
version = "0.1";
src = /home/thomp/scratch/python-library;
propagatedBuildInputs = [ pkgs.python3Packages.numpy pkgs.python3Packages.scipy pkgs.python3Packages.matplotlib ];
};
strontium_library = python3Packages.buildPythonPackage rec {
pname = "strontium_library";
version = "0.1";
src = /home/thomp/scratch/strontium-library;
propagatedBuildInputs = [ pkgs.python3Packages.numpy pkgs.python3Packages.scipy pkgs.python3Packages.matplotlib pkgs.python3Packages.influxdb];
};
artiq_tools = python3Packages.buildPythonPackage rec {
pname = "artiq_tools";
version = "0.2";
src = /home/thomp/scratch/artiq_tools;
propagatedBuildInputs = [ pkgs.python3Packages.numpy pkgs.python3Packages.typing artiqpkgs.artiq pkgs.python3Packages.pyzmq pkgs.python3Packages.matplotlib strontium_library MetaArray];
};
ndscan = python3Packages.buildPythonPackage rec {
pname = "ndscan";
version = "0.1";
src = /home/thomp/scratch/ndscan;
propagatedBuildInputs = [ artiqpkgs.artiq oitg];
doCheck = false;
};
analysis_library = python3Packages.buildPythonPackage rec {
pname = "analysis_library";
version = "0.1";
src = /home/thomp/scratch/analysis-library;
propagatedBuildInputs = [ pkgs.python3Packages.h5py pkgs.python3Packages.matplotlib pkgs.python3Packages.scipy pkgs.python3Packages.numpy python_library strontium_library pkgs.python3Packages.uncertainties];
doCheck = false;
};
repo_routines = python3Packages.buildPythonPackage rec {
pname = "repo_routines";
version = "0.1";
src = /home/thomp/scratch/repo_routines;
propagatedBuildInputs = [ ndscan pkgs.python3Packages.numpy artiqpkgs.artiq strontium_library];
doCheck = false;
};
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = [ buildInputs = [
vivado vivado
sipyco
MetaArray
artiq_comtools
artiq_tools
analysis_library
python_library
strontium_library
repo_routines
ndscan
pkgs.gnumake pkgs.gnumake
(pkgs.python3.withPackages(ps: (with ps; [ jinja2 jsonschema numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ]))) (pkgs.python3.withPackages(ps: (with ps; [ jinja2 jsonschema numpy paramiko ]) ++ (with artiqpkgs; [ migen microscope misoc jesd204b migen-axi artiq ])))
artiqpkgs.cargo artiqpkgs.cargo
@ -16,5 +95,17 @@ in
artiqpkgs.llvm-or1k artiqpkgs.llvm-or1k
artiqpkgs.openocd artiqpkgs.openocd
]; ];
shellHook = ''
export PYTHONPATH="/home/thomp/scratch/metaarray:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/artiq_tools:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/oitg:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/analysis-library:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/python-library:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/strontium-library:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/ndscan:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/sipyco:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/artiq-comtools:$PYTHONPATH"
export PYTHONPATH="/home/thomp/scratch/repo_routines:$PYTHONPATH"
'';
TARGET_AR="or1k-linux-ar"; TARGET_AR="or1k-linux-ar";
} }

View File

@ -1,7 +1,7 @@
# Install Vivado in /opt and add to /etc/nixos/configuration.nix: # Install Vivado in /opt and add to /etc/nixos/configuration.nix:
# nix.sandboxPaths = ["/opt"]; # nix.sandboxPaths = ["/opt"];
{ pkgs, vivadoPath ? "/opt/Xilinx/Vivado/2020.1" }: { pkgs, vivadoPath ? "/opt/Xilinx/Vivado/2021.1" }:
pkgs.buildFHSUserEnv { pkgs.buildFHSUserEnv {
name = "vivado"; name = "vivado";