nix-scripts/artiq-fast/pkgs/python-deps.nix

298 lines
8.9 KiB
Nix
Raw Permalink Normal View History

2021-03-10 05:48:37 +08:00
{ lib, fetchgit, fetchFromGitHub, python3Packages, misoc-new }:
2019-02-19 21:18:38 +08:00
rec {
# User dependencies
2019-11-07 19:34:36 +08:00
sipyco = python3Packages.buildPythonPackage rec {
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 ];
};
asyncserial = python3Packages.buildPythonPackage rec {
pname = "asyncserial";
2020-06-09 16:08:14 +08:00
version = "0.1";
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-19 21:18:38 +08:00
pythonparser = python3Packages.buildPythonPackage rec {
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-19 21:18:38 +08:00
propagatedBuildInputs = with python3Packages; [ regex ];
};
2019-02-19 21:18:38 +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
'';
};
2019-02-19 21:18:38 +08:00
# Development/firmware dependencies
2020-10-15 16:12:51 +08:00
artiq-netboot = python3Packages.buildPythonPackage rec {
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 {
pname = "misoc";
2021-11-10 09:55:57 +08:00
version = if misoc-new then "unstable-2021-10-10" else "unstable-2021-02-15";
2020-08-01 10:31:07 +08:00
src = if misoc-new
then (fetchFromGitHub {
owner = "m-labs";
repo = "misoc";
2021-11-10 14:58:48 +08:00
rev = "f5203e406520874e15ab5d070058ef642fc57fd9";
sha256 = "sha256-/2XTejqj0Bo81HaTrlTSWwInnWwsuqnq+CURXbpIrkA=";
2020-08-01 10:31:07 +08:00
fetchSubmodules = true;
})
else (fetchFromGitHub {
owner = "m-labs";
repo = "misoc";
rev = "d84551418042cea0891ea743442e20684b51e77a";
sha256 = "1id5qjr9dl4r3vi6jdn7dfpnr2wb08nrm3nfscn18clbbdxybyjn";
2020-08-01 10:31:07 +08:00
fetchSubmodules = true;
});
# TODO: fix misoc bitrot and re-enable tests
doCheck = false;
propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ];
2021-03-10 05:48:37 +08:00
meta = with lib; {
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
migen = python3Packages.buildPythonPackage rec {
pname = "migen";
2021-12-16 21:22:54 +08:00
version = "unstable-2021-12-16";
2019-07-03 23:04:31 +08:00
src = fetchFromGitHub {
owner = "m-labs";
repo = "migen";
2021-12-16 21:22:54 +08:00
rev = "ac703010eaa06ac9b6e32f97c6fa98b15de22b31";
sha256 = "sha256-qpVj/yJf4hDDc99XXpVPH4EbLC8aCmEtACn5qNc3DGI=";
2019-07-03 23:04:31 +08:00
};
2019-11-01 10:06:01 +08:00
propagatedBuildInputs = with python3Packages; [ colorama ];
2021-03-10 05:48:37 +08:00
meta = with lib; {
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
microscope = python3Packages.buildPythonPackage rec {
pname = "microscope";
version = "unstable-2019-05-17";
src = fetchFromGitHub {
owner = "m-labs";
repo = "microscope";
rev = "bcbc5346c71ad8f7a1a0b7771a9d126b18fdf558";
sha256 = "1hslm2nn2z1bl84ya4fsab3pvcdmbziwn7zkai0cm3bv525fjxxd";
};
propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack migen ];
2021-03-10 05:48:37 +08:00
meta = with lib; {
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
jesd204b = python3Packages.buildPythonPackage rec {
pname = "jesd204b";
version = "unstable-2021-05-05";
src = fetchFromGitHub {
owner = "m-labs";
repo = "jesd204b";
rev = "bf1cd9014c8b7a9db67609f653634daaf3bcd39b";
sha256 = "035csm6as4p75cjz7kd6gnras14856i2jzi9g1gd800g284hw9n3";
};
propagatedBuildInputs = with python3Packages; [ migen misoc ];
2021-03-10 05:48:37 +08:00
meta = with lib; {
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
};
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; {
description = "Super-fast and clean conversions to numbers";
homepage = "https://github.com/SethMMorton/fastnumbers";
license = licenses.mit;
platforms = platforms.unix;
};
};
ramda = python3Packages.buildPythonPackage {
pname = "ramda";
version = "unstable-2019-02-01";
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:41:51 +08:00
checkInputs = [ python3Packages.pytest python3Packages.pytest-flake8 ];
checkPhase = "pytest";
preBuild = ''
export PBR_VERSION=0.0.1
'';
2021-03-10 05:48:37 +08:00
meta = with lib; {
description = "Ramda, ported to Python";
homepage = "https://github.com/peteut/ramda.py";
license = licenses.mit;
platforms = platforms.unix;
};
};
migen-axi = python3Packages.buildPythonPackage {
pname = "migen-axi";
version = "unstable-2021-09-15";
src = fetchFromGitHub {
owner = "peteut";
repo = "migen-axi";
rev = "9763505ee96acd7572280a2d1233721342dc7c3f";
sha256 = "15c7g05n183rka66fl1glzp6h7xjlpy1p6k8biry24dangsmxmvg";
};
2020-04-10 15:47:39 +08:00
nativeBuildInputs = [ python3Packages.pbr ];
propagatedBuildInputs = [ python3Packages.click python3Packages.numpy python3Packages.toolz python3Packages.jinja2 ramda migen misoc ];
postPatch = ''
2020-04-10 15:47:39 +08:00
substituteInPlace requirements.txt \
2021-10-21 21:13:33 +08:00
--replace "jinja2==2.11.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"
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"
'';
2021-06-02 08:09:54 +08:00
checkInputs = [ python3Packages.pytest python3Packages.pytest-timeout python3Packages.pytest-flake8 ];
checkPhase = "pytest";
preBuild = ''
export PBR_VERSION=0.0.1
'';
2021-03-10 05:48:37 +08:00
meta = with lib; {
description = "AXI support for Migen/MiSoC";
homepage = "https://github.com/peteut/migen-axi";
license = licenses.mit;
platforms = platforms.unix;
};
};
# 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; {
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;
};
};
}