-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dad0e5
commit ff4bf2a
Showing
7 changed files
with
284 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
lib, | ||
python3, | ||
fetchPypi, | ||
fetchFromGitHub, | ||
libusb1, | ||
}: | ||
|
||
let | ||
python = python3.override { | ||
self = python; | ||
packageOverrides = _: super: { | ||
amaranth_0_4_1 = super.amaranth.overridePythonAttrs rec { | ||
version = "0.4.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "amaranth-lang"; | ||
repo = "amaranth"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-VMgycvxkphdpWIib7aZwh588En145RgYlG2Zfi6nnDo="; | ||
}; | ||
}; | ||
}; | ||
}; | ||
in | ||
|
||
python.pkgs.buildPythonApplication rec { | ||
pname = "cynthion"; | ||
version = "0.1.7"; | ||
pyproject = true; | ||
disabled = python.pkgs.pythonOlder "3.8"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-kBf3L4+2bBfdQ/6aoQcg0RG5Yt9dkS8MRCahmppBWko="; | ||
}; | ||
|
||
nativeBuildInputs = with python.pkgs; [ | ||
setuptools | ||
setuptools-git-versioning | ||
]; | ||
|
||
propagatedBuildInputs = with python.pkgs; [ | ||
future | ||
python.pkgs.libusb1 | ||
prompt-toolkit | ||
pyfwup | ||
pyserial | ||
pyusb | ||
tabulate | ||
tomli | ||
tqdm | ||
pygreat | ||
apollo-fpga | ||
amaranth_0_4_1 | ||
luna-usb | ||
luna-soc | ||
]; | ||
|
||
buildInputs = [ libusb1 ]; | ||
|
||
meta = { | ||
description = "Python package and utilities for the Great Scott Gadgets Cynthion USB Test Instrument"; | ||
homepage = "https://github.com/greatscottgadgets/cynthion"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
platforms = lib.platforms.linux ++ lib.platforms.darwin; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
lib, | ||
fetchPypi, | ||
buildPythonPackage, | ||
pythonOlder, | ||
setuptools, | ||
setuptools-git-versioning, | ||
pyusb, | ||
pyvcd, | ||
prompt-toolkit, | ||
pyxdg, | ||
deprecation, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "apollo-fpga"; | ||
version = "1.1.0"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchPypi { | ||
inherit version; | ||
pname = "apollo_fpga"; | ||
hash = "sha256-dLccmQ/2ZhQqL17JkpAhtuO5jZ3oUuIVcuYdQR0zwhQ="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
setuptools-git-versioning | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
pyusb | ||
pyvcd | ||
prompt-toolkit | ||
pyxdg | ||
deprecation | ||
]; | ||
|
||
meta = { | ||
description = "microcontroller-based FPGA / JTAG programmer"; | ||
homepage = "https://github.com/greatscottgadgets/apollo"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
lib, | ||
fetchPypi, | ||
buildPythonPackage, | ||
pythonOlder, | ||
setuptools, | ||
setuptools-git-versioning, | ||
luna-usb, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "luna-soc"; | ||
version = "0.2.0"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchPypi { | ||
inherit version; | ||
pname = "luna_soc"; | ||
hash = "sha256-Ohz/dkUuV/yoEphB7/YohuCp5GMQ//0NF1BPySg3IeU="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
setuptools-git-versioning | ||
]; | ||
|
||
propagatedBuildInputs = [ luna-usb ]; | ||
|
||
meta = { | ||
description = "Amaranth HDL libary for building USB-capable SoC designs."; | ||
homepage = "https://github.com/greatscottgadgets/luna-soc"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
lib, | ||
fetchPypi, | ||
fetchFromGitHub, | ||
buildPythonPackage, | ||
pythonOlder, | ||
setuptools, | ||
setuptools-git-versioning, | ||
libusb1, | ||
pyserial, | ||
pyusb, | ||
pyvcd, | ||
amaranth, | ||
usb-protocol, | ||
}: | ||
|
||
let | ||
amaranth_0_4_1 = amaranth.overridePythonAttrs rec { | ||
version = "0.4.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "amaranth-lang"; | ||
repo = "amaranth"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-VMgycvxkphdpWIib7aZwh588En145RgYlG2Zfi6nnDo="; | ||
}; | ||
}; | ||
in | ||
|
||
buildPythonPackage rec { | ||
pname = "luna-usb"; | ||
version = "0.1.1"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchPypi { | ||
inherit version; | ||
pname = "luna_usb"; | ||
hash = "sha256-CCOsrtDI1Ax/2MW4cw0HEUaeCg0aMQpQl88TYgfjsdI="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
setuptools-git-versioning | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
libusb1 | ||
pyserial | ||
pyusb | ||
pyvcd | ||
amaranth_0_4_1 | ||
usb-protocol | ||
]; | ||
|
||
meta = { | ||
description = "Amaranth HDL framework for monitoring, hacking, and developing USB devices"; | ||
homepage = "https://github.com/greatscottgadgets/luna"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,45 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
isPy3k, | ||
fetchFromGitHub, | ||
fetchPypi, | ||
setuptools, | ||
setuptools-git-versioning, | ||
pythonOlder, | ||
pythonRelaxDepsHook, | ||
future, | ||
pyusb, | ||
}: | ||
|
||
buildPythonPackage { | ||
buildPythonPackage rec { | ||
pname = "pygreat"; | ||
version = "2019.5.1.dev0"; | ||
format = "setuptools"; | ||
version = "2024.0.2"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "greatscottgadgets"; | ||
repo = "libgreat"; | ||
rev = "14c00b7c8f036f4d467e4b1a324ffa3566b126fa"; | ||
sha256 = "1h0z83k1k4z8j36z936h61l8j3cjr3wsxr86k91v5c5h93g9dkqh"; | ||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-VGZyvGLPyA6tOVh7boz4j/6o/iQ9mRvULOleFypGHGY="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
pythonRelaxDepsHook | ||
setuptools | ||
setuptools-git-versioning | ||
]; | ||
|
||
pythonRemoveDeps = [ | ||
"backports.functools-lru-cache" | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
future | ||
pyusb | ||
]; | ||
|
||
disabled = !isPy3k; | ||
|
||
preBuild = '' | ||
cd host | ||
substituteInPlace setup.py --replace "'backports.functools_lru_cache'" "" | ||
substituteInPlace pygreat/comms.py --replace "from backports.functools_lru_cache import lru_cache as memoize_with_lru_cache" "from functools import lru_cache as memoize_with_lru_cache" | ||
echo "$version" > ../VERSION | ||
''; | ||
|
||
meta = with lib; { | ||
meta = { | ||
description = "Python library for talking with libGreat devices"; | ||
homepage = "https://greatscottgadgets.com/greatfet/"; | ||
license = with licenses; [ bsd3 ]; | ||
license = with lib.licenses; [ bsd3 ]; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
lib, | ||
fetchPypi, | ||
buildPythonPackage, | ||
pythonOlder, | ||
setuptools, | ||
setuptools-git-versioning, | ||
construct, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "usb-protocol"; | ||
version = "0.9.1"; | ||
pyproject = true; | ||
disabled = pythonOlder "3.8"; | ||
|
||
src = fetchPypi { | ||
inherit version; | ||
pname = "usb_protocol"; | ||
hash = "sha256-5v9M+WJ5v7XQEH3ZxuTz3gN2LQ9hNvQsSwJH4H3S/iQ="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
setuptools | ||
setuptools-git-versioning | ||
]; | ||
|
||
propagatedBuildInputs = [ construct ]; | ||
|
||
meta = { | ||
description = "Python library providing utilities, data structures, constants, parsers, and tools for working with the USB protocol."; | ||
homepage = "https://github.com/greatscottgadgets/python-usb-protocol"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ carlossless ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters