2021-03-10 05:48:37 +08:00
|
|
|
{ lib, fetchgit, fetchFromGitHub, python3Packages, misoc-new }:
|
2019-02-14 15:29:42 +08:00
|
|
|
|
2019-02-19 21:18:38 +08:00
|
|
|
rec {
|
|
|
|
# User dependencies
|
2019-11-07 19:34:36 +08:00
|
|
|
sipyco = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "sipyco";
|
2021-01-27 13:09:08 +08:00
|
|
|
version = "1.2";
|
2019-11-07 19:34:36 +08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "sipyco";
|
2019-12-12 10:43:14 +08:00
|
|
|
rev = "v${version}";
|
2021-01-27 13:09:08 +08:00
|
|
|
sha256 = "02x2s66x9bbzj82d823vjg2i73w7iqwvkrjbbyrsav6ccj7f90sj";
|
2019-11-07 19:34:36 +08:00
|
|
|
};
|
|
|
|
propagatedBuildInputs = with python3Packages; [ numpy ];
|
|
|
|
};
|
|
|
|
|
2022-02-24 10:06:04 +08:00
|
|
|
artiq_tools = python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "artiq_tools";
|
|
|
|
version = "0.2";
|
|
|
|
src = /home/thomp/scratch/artiq_tools;
|
|
|
|
propagatedBuildInputs = with python3Packages; [ numpy typing ];
|
|
|
|
};
|
|
|
|
|
2019-02-14 15:29:42 +08:00
|
|
|
asyncserial = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "asyncserial";
|
2020-06-09 16:08:14 +08:00
|
|
|
version = "0.1";
|
2019-02-14 15:29:42 +08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "asyncserial";
|
|
|
|
rev = "d95bc1d6c791b0e9785935d2f62f628eb5cdf98d";
|
|
|
|
sha256 = "0yzkka9jk3612v8gx748x6ziwykq5lr7zmr9wzkcls0v2yilqx9k";
|
|
|
|
};
|
2019-02-19 21:18:38 +08:00
|
|
|
propagatedBuildInputs = with python3Packages; [ pyserial ];
|
|
|
|
};
|
2019-02-14 15:29:42 +08:00
|
|
|
|
2019-02-19 21:18:38 +08:00
|
|
|
pythonparser = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "pythonparser";
|
2021-08-12 13:20:41 +08:00
|
|
|
version = "1.4";
|
2019-02-19 21:18:38 +08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "pythonparser";
|
2021-08-12 13:20:41 +08:00
|
|
|
rev = "5413ee5c9f8760e95c6acd5d6e88dabb831ad201";
|
|
|
|
sha256 = "1b9p3pjnfaiaf2k0a3iq39aj2vymfxx139hqdqkd3q4awrwy1957";
|
2019-02-14 15:29:42 +08:00
|
|
|
};
|
2019-02-19 21:18:38 +08:00
|
|
|
propagatedBuildInputs = with python3Packages; [ regex ];
|
2019-02-14 15:29:42 +08:00
|
|
|
};
|
2019-02-19 21:18:38 +08:00
|
|
|
|
2020-12-12 21:58:04 +08:00
|
|
|
qasync = python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "qasync";
|
|
|
|
version = "0.10.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CabbageDevelopment";
|
|
|
|
repo = "qasync";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1zga8s6dr7gk6awmxkh4pf25gbg8n6dv1j4b0by7y0fhi949qakq";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ python3Packages.pyqt5 ];
|
|
|
|
|
|
|
|
checkInputs = [ python3Packages.pytest ];
|
|
|
|
checkPhase = ''
|
|
|
|
pytest -k 'test_qthreadexec.py' # the others cause the test execution to be aborted, I think because of asyncio
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-02-24 10:06:04 +08:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-02-19 21:18:38 +08:00
|
|
|
# Development/firmware dependencies
|
2020-10-15 16:12:51 +08:00
|
|
|
artiq-netboot = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "artiq-netboot";
|
|
|
|
version = "unstable-2020-10-15";
|
2020-10-15 16:12:51 +08:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.m-labs.hk/m-labs/artiq-netboot.git";
|
|
|
|
rev = "04f69eb07df73abe4b89fde2c24084f7664f2104";
|
|
|
|
sha256 = "0ql4fr8m8gpb2yql8aqsdqsssxb8zqd6l65kl1f6s9845zy7shs9";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-08-01 10:31:07 +08:00
|
|
|
misoc = python3Packages.buildPythonPackage {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "misoc";
|
2022-02-24 10:06:04 +08:00
|
|
|
version = if misoc-new then "unstable-2021-09-10" else "unstable-2021-02-15";
|
2020-12-15 09:30:21 +08:00
|
|
|
|
2020-08-01 10:31:07 +08:00
|
|
|
src = if misoc-new
|
|
|
|
then (fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "misoc";
|
2022-02-24 10:06:04 +08:00
|
|
|
rev = "c9572e777febf7abcfbebf624e0323d82600f267";
|
|
|
|
sha256 = "sha256-dal999XLFvS8Ol1hZnQjx7q/UfAXkzSMhAWcZKCDPx4=";
|
2020-08-01 10:31:07 +08:00
|
|
|
fetchSubmodules = true;
|
|
|
|
})
|
|
|
|
else (fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "misoc";
|
2021-07-27 11:07:08 +08:00
|
|
|
rev = "d84551418042cea0891ea743442e20684b51e77a";
|
|
|
|
sha256 = "1id5qjr9dl4r3vi6jdn7dfpnr2wb08nrm3nfscn18clbbdxybyjn";
|
2020-08-01 10:31:07 +08:00
|
|
|
fetchSubmodules = true;
|
|
|
|
});
|
2019-02-14 15:29:42 +08:00
|
|
|
|
|
|
|
# TODO: fix misoc bitrot and re-enable tests
|
|
|
|
doCheck = false;
|
2020-12-15 09:30:21 +08:00
|
|
|
|
2019-02-14 15:29:42 +08:00
|
|
|
propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-02-14 15:29:42 +08:00
|
|
|
description = "A high performance and small footprint system-on-chip based on Migen";
|
|
|
|
homepage = "https://m-labs.hk/migen";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
2019-02-19 21:18:38 +08:00
|
|
|
|
2019-02-14 15:29:42 +08:00
|
|
|
migen = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "migen";
|
2022-02-24 10:06:04 +08:00
|
|
|
version = "unstable-2021-08-10";
|
2019-02-14 15:29:42 +08:00
|
|
|
|
2019-07-03 23:04:31 +08:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "migen";
|
2022-02-24 10:06:04 +08:00
|
|
|
rev = "27dbf03edd75c32dc1706e2a1316950c3a8d452a";
|
|
|
|
sha256 = "0c7c7bbc05cb8xvxd612cxr7mvsxhaim0apfh7ax32wi9ykpl1ad";
|
2019-07-03 23:04:31 +08:00
|
|
|
};
|
2019-02-14 15:29:42 +08:00
|
|
|
|
2019-11-01 10:06:01 +08:00
|
|
|
propagatedBuildInputs = with python3Packages; [ colorama ];
|
2019-02-14 15:29:42 +08:00
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-02-14 15:29:42 +08:00
|
|
|
description = "A Python toolbox for building complex digital hardware";
|
|
|
|
homepage = "https://m-labs.hk/migen";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
2019-02-19 21:18:38 +08:00
|
|
|
|
2019-02-14 15:29:42 +08:00
|
|
|
microscope = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "microscope";
|
|
|
|
version = "unstable-2019-05-17";
|
2019-02-14 15:29:42 +08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "microscope";
|
2019-05-17 19:01:35 +08:00
|
|
|
rev = "bcbc5346c71ad8f7a1a0b7771a9d126b18fdf558";
|
|
|
|
sha256 = "1hslm2nn2z1bl84ya4fsab3pvcdmbziwn7zkai0cm3bv525fjxxd";
|
2019-02-14 15:29:42 +08:00
|
|
|
};
|
|
|
|
|
2019-05-17 19:01:35 +08:00
|
|
|
propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack migen ];
|
2019-02-14 15:29:42 +08:00
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-02-14 15:29:42 +08:00
|
|
|
description = "Finding the bacteria in rotting FPGA designs";
|
|
|
|
homepage = "https://m-labs.hk/migen";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
2019-02-19 21:18:38 +08:00
|
|
|
|
2019-02-14 15:29:42 +08:00
|
|
|
jesd204b = python3Packages.buildPythonPackage rec {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "jesd204b";
|
2021-05-06 06:57:22 +08:00
|
|
|
version = "unstable-2021-05-05";
|
2019-02-14 15:29:42 +08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "m-labs";
|
|
|
|
repo = "jesd204b";
|
2021-05-06 06:57:22 +08:00
|
|
|
rev = "bf1cd9014c8b7a9db67609f653634daaf3bcd39b";
|
|
|
|
sha256 = "035csm6as4p75cjz7kd6gnras14856i2jzi9g1gd800g284hw9n3";
|
2019-02-14 15:29:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [ migen misoc ];
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-02-14 15:29:42 +08:00
|
|
|
description = "JESD204B core for Migen/MiSoC";
|
|
|
|
homepage = "https://m-labs.hk/migen";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2019-02-21 22:32:43 +08:00
|
|
|
};
|
|
|
|
|
2019-08-23 17:01:39 +08:00
|
|
|
fastnumbers = python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "fastnumbers";
|
|
|
|
version = "2.2.1";
|
|
|
|
|
|
|
|
src = python3Packages.fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0j15i54p7nri6hkzn1wal9pxri4pgql01wgjccig6ar0v5jjbvsy";
|
|
|
|
};
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-08-23 17:01:39 +08:00
|
|
|
description = "Super-fast and clean conversions to numbers";
|
|
|
|
homepage = "https://github.com/SethMMorton/fastnumbers";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
ramda = python3Packages.buildPythonPackage {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "ramda";
|
|
|
|
version = "unstable-2019-02-01";
|
2019-08-23 17:01:39 +08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "peteut";
|
|
|
|
repo = "ramda.py";
|
|
|
|
rev = "bd58f8e69d0e9a713d9c1f286a1ac5e5603956b1";
|
|
|
|
sha256 = "0qzd5yp9lbaham8p1wiymdjapzbqsli7lvngv24c3z4ybd9jlq9g";
|
|
|
|
};
|
|
|
|
|
2019-08-23 17:41:51 +08:00
|
|
|
nativeBuildInputs = [ python3Packages.pbr ];
|
2020-04-10 15:47:39 +08:00
|
|
|
propagatedBuildInputs = [ python3Packages.future fastnumbers ];
|
2019-08-23 17:01:39 +08:00
|
|
|
|
2019-08-23 17:41:51 +08:00
|
|
|
checkInputs = [ python3Packages.pytest python3Packages.pytest-flake8 ];
|
|
|
|
checkPhase = "pytest";
|
|
|
|
|
2019-08-23 17:01:39 +08:00
|
|
|
preBuild = ''
|
|
|
|
export PBR_VERSION=0.0.1
|
|
|
|
'';
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-08-23 17:01:39 +08:00
|
|
|
description = "Ramda, ported to Python";
|
|
|
|
homepage = "https://github.com/peteut/ramda.py";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
migen-axi = python3Packages.buildPythonPackage {
|
2020-12-15 09:30:21 +08:00
|
|
|
pname = "migen-axi";
|
2022-02-24 10:06:04 +08:00
|
|
|
version = "unstable-2021-08-23";
|
2019-08-23 17:01:39 +08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "peteut";
|
|
|
|
repo = "migen-axi";
|
2022-02-24 10:06:04 +08:00
|
|
|
rev = "1f94ee0fc847dad118020bfc8c6a8f26ed9958bd";
|
|
|
|
sha256 = "0bk4g8k7cng8na01p7h6llrfpjkmxsamyi1kacvk3n110l2kl93g";
|
2019-08-23 17:01:39 +08:00
|
|
|
};
|
|
|
|
|
2020-04-10 15:47:39 +08:00
|
|
|
nativeBuildInputs = [ python3Packages.pbr ];
|
|
|
|
propagatedBuildInputs = [ python3Packages.click python3Packages.numpy python3Packages.toolz python3Packages.jinja2 ramda migen misoc ];
|
|
|
|
|
2019-08-23 18:08:20 +08:00
|
|
|
postPatch = ''
|
2020-04-10 15:47:39 +08:00
|
|
|
substituteInPlace requirements.txt \
|
2022-02-24 10:06:04 +08:00
|
|
|
--replace "jinja2==2.10.3" "jinja2"
|
2020-04-10 15:47:39 +08:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "future==0.18.2" "future"
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "ramda==0.5.5" "ramda"
|
2020-04-10 17:12:50 +08:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "colorama==0.4.3" "colorama"
|
2021-06-02 08:09:39 +08:00
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "toolz==0.10.0" "toolz"
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "pyserial==3.4" "pyserial"
|
2019-08-23 18:08:20 +08:00
|
|
|
'';
|
|
|
|
|
2019-08-23 17:01:39 +08:00
|
|
|
|
2021-06-02 08:09:54 +08:00
|
|
|
checkInputs = [ python3Packages.pytest python3Packages.pytest-timeout python3Packages.pytest-flake8 ];
|
2019-08-23 18:08:20 +08:00
|
|
|
checkPhase = "pytest";
|
|
|
|
|
2019-08-23 17:01:39 +08:00
|
|
|
preBuild = ''
|
|
|
|
export PBR_VERSION=0.0.1
|
|
|
|
'';
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-08-23 17:01:39 +08:00
|
|
|
description = "AXI support for Migen/MiSoC";
|
|
|
|
homepage = "https://github.com/peteut/migen-axi";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-02-22 12:54:10 +08:00
|
|
|
# not using the nixpkgs version because it is Python 2 and an "application"
|
|
|
|
lit = python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "lit";
|
|
|
|
version = "0.7.1";
|
|
|
|
|
|
|
|
src = python3Packages.fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "ecef2833aef7f411cb923dac109c7c9dcc7dbe7cafce0650c1e8d19c243d955f";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Non-standard test suite. Needs custom checkPhase.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-02-22 12:54:10 +08:00
|
|
|
description = "Portable tool for executing LLVM and Clang style test suites";
|
|
|
|
homepage = http://llvm.org/docs/CommandGuide/lit.html;
|
|
|
|
license = licenses.ncsa;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputcheck = python3Packages.buildPythonApplication rec {
|
2019-02-21 22:32:43 +08:00
|
|
|
pname = "outputcheck";
|
|
|
|
version = "0.4.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stp";
|
|
|
|
repo = "OutputCheck";
|
|
|
|
rev = "e0f533d3c5af2949349856c711bf4bca50022b48";
|
|
|
|
sha256 = "1y27vz6jq6sywas07kz3v01sqjd0sga9yv9w2cksqac3v7wmf2a0";
|
|
|
|
};
|
|
|
|
prePatch = "echo ${version} > RELEASE-VERSION";
|
|
|
|
|
2021-03-10 05:48:37 +08:00
|
|
|
meta = with lib; {
|
2019-02-21 22:32:43 +08:00
|
|
|
description = "A tool for checking tool output inspired by LLVM's FileCheck";
|
|
|
|
homepage = "https://github.com/stp/OutputCheck";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
2019-02-14 15:29:42 +08:00
|
|
|
};
|
|
|
|
}
|