Merge pull request #322278 from pbsds/bump-amaranth-1718462452
python311Packages.amaranth: 0.4.5 -> 0.5.0
This commit is contained in:
commit
c1c800bb01
@ -4,6 +4,7 @@
|
|||||||
pythonOlder,
|
pythonOlder,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
pdm-backend,
|
pdm-backend,
|
||||||
|
jschon,
|
||||||
pyvcd,
|
pyvcd,
|
||||||
jinja2,
|
jinja2,
|
||||||
importlib-resources,
|
importlib-resources,
|
||||||
@ -20,14 +21,14 @@
|
|||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "amaranth";
|
pname = "amaranth";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
version = "0.4.5";
|
version = "0.5.0";
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "amaranth-lang";
|
owner = "amaranth-lang";
|
||||||
repo = "amaranth";
|
repo = "amaranth";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-g9dn6gUTdFHz9GMWHERsRLWHoI3E7vjuQDK0usbZO7g=";
|
hash = "sha256-+EV2NgYSuCbYTQKeBUN+/D0attfrJ3cso7U6RjLEIbg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -37,6 +38,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
dependencies =
|
dependencies =
|
||||||
[
|
[
|
||||||
|
jschon
|
||||||
jinja2
|
jinja2
|
||||||
pyvcd
|
pyvcd
|
||||||
]
|
]
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
sdcc,
|
sdcc,
|
||||||
libusb1,
|
libusb1,
|
||||||
|
setuptools-scm,
|
||||||
crcmod,
|
crcmod,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -20,7 +21,10 @@ buildPythonPackage rec {
|
|||||||
hash = "sha256-PtWxjT+97+EeNMN36zOT1+ost/w3lRRkaON3Cl3dpp4=";
|
hash = "sha256-PtWxjT+97+EeNMN36zOT1+ost/w3lRRkaON3Cl3dpp4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ sdcc ];
|
nativeBuildInputs = [
|
||||||
|
setuptools-scm
|
||||||
|
sdcc
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
libusb1
|
libusb1
|
||||||
|
75
pkgs/development/python-modules/jschon/default.nix
Normal file
75
pkgs/development/python-modules/jschon/default.nix
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, setuptools
|
||||||
|
, wheel
|
||||||
|
, rfc3986
|
||||||
|
, pytestCheckHook
|
||||||
|
, hypothesis
|
||||||
|
, requests
|
||||||
|
, pytest-httpserver
|
||||||
|
, pytest-xdist
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "jschon";
|
||||||
|
version = "0.11.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "marksparkza";
|
||||||
|
repo = "jschon";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-uOvEIEUEILsoLuV5U9AJCQAlT4iHQhsnSt65gfCiW0k=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
rfc3986
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"jschon"
|
||||||
|
"jschon.catalog"
|
||||||
|
"jschon.vocabulary"
|
||||||
|
"jschon.exc"
|
||||||
|
"jschon.exceptions"
|
||||||
|
"jschon.formats"
|
||||||
|
"jschon.json"
|
||||||
|
"jschon.jsonpatch"
|
||||||
|
"jschon.jsonpointer"
|
||||||
|
"jschon.jsonschema"
|
||||||
|
"jschon.output"
|
||||||
|
"jschon.uri"
|
||||||
|
"jschon.utils"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
hypothesis
|
||||||
|
requests
|
||||||
|
pytest-httpserver
|
||||||
|
#pytest-benchmark # not needed for distribution
|
||||||
|
pytest-xdist # not used upstream, but massive speedup
|
||||||
|
];
|
||||||
|
|
||||||
|
disabledTestPaths = [
|
||||||
|
"tests/test_benchmarks.py"
|
||||||
|
];
|
||||||
|
|
||||||
|
# used in checks
|
||||||
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "An object-oriented JSON Schema implementation for Python";
|
||||||
|
homepage = "https://github.com/marksparkza/jschon";
|
||||||
|
changelog = "https://github.com/marksparkza/jschon/blob/${src.rev}/CHANGELOG.rst";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ pbsds ];
|
||||||
|
};
|
||||||
|
}
|
@ -5,40 +5,49 @@
|
|||||||
, yosys
|
, yosys
|
||||||
, icestorm
|
, icestorm
|
||||||
, nextpnr
|
, nextpnr
|
||||||
|
, unstableGitUpdater
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "glasgow";
|
pname = "glasgow";
|
||||||
version = "unstable-2023-09-20";
|
version = "0-unstable-2024-06-27";
|
||||||
# python -m setuptools_scm
|
# from `pdm show`
|
||||||
realVersion = "0.1.dev1798+g${lib.substring 0 7 src.rev}";
|
realVersion = let
|
||||||
|
tag = builtins.elemAt (lib.splitString "-" version) 0;
|
||||||
|
rev = lib.substring 0 7 src.rev;
|
||||||
|
in "${tag}.1.dev2085+g${rev}";
|
||||||
|
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "GlasgowEmbedded";
|
owner = "GlasgowEmbedded";
|
||||||
repo = "glasgow";
|
repo = "glasgow";
|
||||||
rev = "e9a9801d5be3dcba0ee188dd8a6e9115e337795d";
|
rev = "a599e3caa64c2e445358894fd050e16917f2ee42";
|
||||||
sha256 = "sha256-ztB3I/jrDSm1gKB1e5igivUVloq+YYhkshDlWg75NMA=";
|
sha256 = "sha256-5qg0/j1MgwHMOjySBY5cKuQqlqltV5cXcR/Ap6J9vys=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
python3.pkgs.setuptools-scm
|
python3.pkgs.pdm-backend
|
||||||
sdcc
|
sdcc
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
aiohttp
|
typing-extensions
|
||||||
amaranth
|
amaranth
|
||||||
appdirs
|
packaging
|
||||||
bitarray
|
platformdirs
|
||||||
crc
|
|
||||||
fx2
|
fx2
|
||||||
libusb1
|
libusb1
|
||||||
packaging
|
|
||||||
pyvcd
|
pyvcd
|
||||||
setuptools
|
aiohttp
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ yosys icestorm nextpnr ];
|
nativeCheckInputs = [
|
||||||
|
python3.pkgs.unittestCheckHook
|
||||||
|
yosys
|
||||||
|
icestorm
|
||||||
|
nextpnr
|
||||||
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -46,7 +55,7 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
make -C firmware LIBFX2=${python3.pkgs.fx2}/share/libfx2
|
make -C firmware LIBFX2=${python3.pkgs.fx2}/share/libfx2
|
||||||
cp firmware/glasgow.ihex software/glasgow
|
cp firmware/glasgow.ihex software/glasgow
|
||||||
cd software
|
cd software
|
||||||
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
|
export PDM_BUILD_SCM_VERSION="${realVersion}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# installCheck tries to build_ext again
|
# installCheck tries to build_ext again
|
||||||
@ -54,16 +63,16 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/etc/udev/rules.d
|
mkdir -p $out/etc/udev/rules.d
|
||||||
cp $src/config/99-glasgow.rules $out/etc/udev/rules.d
|
cp $src/config/*.rules $out/etc/udev/rules.d
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
preCheck = ''
|
||||||
|
export PYTHONWARNINGS="ignore::DeprecationWarning"
|
||||||
# tests attempt to cache bitstreams
|
# tests attempt to cache bitstreams
|
||||||
# for linux:
|
# for linux:
|
||||||
export XDG_CACHE_HOME=$TMPDIR
|
export XDG_CACHE_HOME=$TMPDIR
|
||||||
# for darwin:
|
# for darwin:
|
||||||
export HOME=$TMPDIR
|
export HOME=$TMPDIR
|
||||||
${python3.interpreter} -W ignore::DeprecationWarning test.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeWrapperArgs = [
|
makeWrapperArgs = [
|
||||||
@ -72,6 +81,10 @@ python3.pkgs.buildPythonApplication rec {
|
|||||||
"--set" "NEXTPNR_ICE40" "${nextpnr}/bin/nextpnr-ice40"
|
"--set" "NEXTPNR_ICE40" "${nextpnr}/bin/nextpnr-ice40"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.updateScript = unstableGitUpdater {
|
||||||
|
hardcodeZeroVersion = true;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Software for Glasgow, a digital interface multitool";
|
description = "Software for Glasgow, a digital interface multitool";
|
||||||
homepage = "https://github.com/GlasgowEmbedded/Glasgow";
|
homepage = "https://github.com/GlasgowEmbedded/Glasgow";
|
||||||
|
@ -6210,6 +6210,8 @@ self: super: with self; {
|
|||||||
|
|
||||||
jschema-to-python = callPackage ../development/python-modules/jschema-to-python { };
|
jschema-to-python = callPackage ../development/python-modules/jschema-to-python { };
|
||||||
|
|
||||||
|
jschon = callPackage ../development/python-modules/jschon { };
|
||||||
|
|
||||||
jsmin = callPackage ../development/python-modules/jsmin { };
|
jsmin = callPackage ../development/python-modules/jsmin { };
|
||||||
|
|
||||||
json5 = callPackage ../development/python-modules/json5 { };
|
json5 = callPackage ../development/python-modules/json5 { };
|
||||||
|
Loading…
Reference in New Issue
Block a user