diff --git a/third_party/nixpkgs/pkgs/applications/science/logic/abc/default.nix b/third_party/nixpkgs/pkgs/applications/science/logic/abc/default.nix index a71122c546..01a2855b51 100644 --- a/third_party/nixpkgs/pkgs/applications/science/logic/abc/default.nix +++ b/third_party/nixpkgs/pkgs/applications/science/logic/abc/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "abc-verifier"; - version = "unstable-2023-10-13"; + version = "unstable-2024-05-08"; src = fetchFromGitHub { owner = "yosyshq"; repo = "abc"; - rev = "896e5e7dedf9b9b1459fa019f1fa8aa8101fdf43"; - hash = "sha256-ou+E2lvDEOxXRXNygE/TyVi7quqk+CJHRI+HDI0xljE="; + rev = "237d81397fcc85dd3894bf1a449d2955cd3df02d"; + hash = "sha256-t3wdt/jGyF3Ysd0rzDYvPzECgOAL87/IJlHh3FGaF1k="; }; nativeBuildInputs = [ cmake ]; diff --git a/third_party/nixpkgs/pkgs/development/compilers/yosys/default.nix b/third_party/nixpkgs/pkgs/development/compilers/yosys/default.nix index 06ce12d642..b5b0024f4b 100644 --- a/third_party/nixpkgs/pkgs/development/compilers/yosys/default.nix +++ b/third_party/nixpkgs/pkgs/development/compilers/yosys/default.nix @@ -115,7 +115,7 @@ in stdenv.mkDerivation (finalAttrs: { patches = [ ./plugin-search-dirs.patch - ./fix-clang-build.patch # see https://github.com/YosysHQ/yosys/issues/2011 + #./fix-clang-build.patch # see https://github.com/YosysHQ/yosys/issues/2011 ]; postPatch = '' diff --git a/third_party/nixpkgs/pkgs/development/python-modules/amaranth/default.nix b/third_party/nixpkgs/pkgs/development/python-modules/amaranth/default.nix index 1a096f0160..8f55a6bf04 100644 --- a/third_party/nixpkgs/pkgs/development/python-modules/amaranth/default.nix +++ b/third_party/nixpkgs/pkgs/development/python-modules/amaranth/default.nix @@ -6,6 +6,7 @@ pdm-backend, pyvcd, jinja2, + jschon, importlib-resources, importlib-metadata, git, @@ -20,14 +21,14 @@ buildPythonPackage rec { pname = "amaranth"; format = "pyproject"; - version = "0.4.5"; + version = "0.5.0"; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "amaranth-lang"; repo = "amaranth"; rev = "refs/tags/v${version}"; - hash = "sha256-g9dn6gUTdFHz9GMWHERsRLWHoI3E7vjuQDK0usbZO7g="; + hash = "sha256-+EV2NgYSuCbYTQKeBUN+/D0attfrJ3cso7U6RjLEIbg="; }; nativeBuildInputs = [ @@ -39,6 +40,7 @@ buildPythonPackage rec { [ jinja2 pyvcd + jschon ] ++ lib.optional (pythonOlder "3.9") importlib-resources ++ lib.optional (pythonOlder "3.8") importlib-metadata; diff --git a/third_party/nixpkgs/pkgs/development/python-modules/fx2/default.nix b/third_party/nixpkgs/pkgs/development/python-modules/fx2/default.nix index 52711cead2..fd1cbaf3b8 100644 --- a/third_party/nixpkgs/pkgs/development/python-modules/fx2/default.nix +++ b/third_party/nixpkgs/pkgs/development/python-modules/fx2/default.nix @@ -1,9 +1,10 @@ { lib, buildPythonPackage, - python, fetchFromGitHub, sdcc, + setuptools, + setuptools-scm, libusb1, crcmod, }: @@ -11,7 +12,7 @@ buildPythonPackage rec { pname = "fx2"; version = "0.13"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "whitequark"; @@ -20,13 +21,18 @@ buildPythonPackage rec { hash = "sha256-PtWxjT+97+EeNMN36zOT1+ost/w3lRRkaON3Cl3dpp4="; }; - nativeBuildInputs = [ sdcc ]; + nativeBuildInputs = [ sdcc setuptools setuptools-scm ]; propagatedBuildInputs = [ libusb1 crcmod ]; + postPatch = '' + substituteInPlace software/pyproject.toml \ + --replace-fail 'setuptools~=67.0' 'setuptools' + ''; + preBuild = '' make -C firmware cd software diff --git a/third_party/nixpkgs/pkgs/development/python-modules/jschon/default.nix b/third_party/nixpkgs/pkgs/development/python-modules/jschon/default.nix new file mode 100644 index 0000000000..fcc8a90225 --- /dev/null +++ b/third_party/nixpkgs/pkgs/development/python-modules/jschon/default.nix @@ -0,0 +1,56 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + rfc3986, + setuptools, + + # for tests + pytestCheckHook, + tox, + coverage, + hypothesis, + pytest-benchmark, + pytest-httpserver, + requests, +}: + +buildPythonPackage rec { + pname = "jschon"; + pyproject = true; + version = "0.11.1"; + + src = fetchFromGitHub { + owner = "marksparkza"; + repo = "jschon"; + rev = "refs/tags/v${version}"; + hash = "sha256-uOvEIEUEILsoLuV5U9AJCQAlT4iHQhsnSt65gfCiW0k="; + fetchSubmodules = true; + }; + + dependencies = + [ + setuptools + rfc3986 + ]; + + nativeCheckInputs = [ + pytestCheckHook + tox + coverage + hypothesis + pytest-benchmark + pytest-httpserver + requests + ]; + + pythonImportsCheck = [ "jschon" ]; + + meta = with lib; { + description = "Object-oriented JSON Schema implementation for Python"; + homepage = "https://github.com/marksparkza/jschon"; + license = licenses.mit; + maintainers = with maintainers; []; + }; +} diff --git a/third_party/nixpkgs/pkgs/tools/misc/glasgow/default.nix b/third_party/nixpkgs/pkgs/tools/misc/glasgow/default.nix index 4821ad923e..d3dfe58b4c 100644 --- a/third_party/nixpkgs/pkgs/tools/misc/glasgow/default.nix +++ b/third_party/nixpkgs/pkgs/tools/misc/glasgow/default.nix @@ -9,19 +9,20 @@ python3.pkgs.buildPythonApplication rec { pname = "glasgow"; - version = "unstable-2023-09-20"; - # python -m setuptools_scm + version = "unstable-2024-06-28"; realVersion = "0.1.dev1798+g${lib.substring 0 7 src.rev}"; + pyproject = true; src = fetchFromGitHub { owner = "GlasgowEmbedded"; repo = "glasgow"; - rev = "e9a9801d5be3dcba0ee188dd8a6e9115e337795d"; - sha256 = "sha256-ztB3I/jrDSm1gKB1e5igivUVloq+YYhkshDlWg75NMA="; + rev = "a599e3caa64c2e445358894fd050e16917f2ee42"; + sha256 = "sha256-5qg0/j1MgwHMOjySBY5cKuQqlqltV5cXcR/Ap6J9vys="; }; nativeBuildInputs = [ - python3.pkgs.setuptools-scm + python3.pkgs.unittestCheckHook + python3.pkgs.pdm-backend sdcc ]; @@ -34,6 +35,7 @@ python3.pkgs.buildPythonApplication rec { fx2 libusb1 packaging + platformdirs pyvcd setuptools ]; @@ -46,7 +48,7 @@ python3.pkgs.buildPythonApplication rec { make -C firmware LIBFX2=${python3.pkgs.fx2}/share/libfx2 cp firmware/glasgow.ihex software/glasgow cd software - export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}" + export PDM_BUILD_SCM_VERSION="${realVersion}" ''; # installCheck tries to build_ext again @@ -54,16 +56,16 @@ python3.pkgs.buildPythonApplication rec { postInstall = '' mkdir -p $out/etc/udev/rules.d - cp $src/config/99-glasgow.rules $out/etc/udev/rules.d + cp $src/config/70-cypress.rules $out/etc/udev/rules.d + cp $src/config/70-glasgow.rules $out/etc/udev/rules.d ''; - checkPhase = '' + preCheck = '' # tests attempt to cache bitstreams # for linux: export XDG_CACHE_HOME=$TMPDIR # for darwin: export HOME=$TMPDIR - ${python3.interpreter} -W ignore::DeprecationWarning test.py ''; makeWrapperArgs = [ diff --git a/third_party/nixpkgs/pkgs/top-level/python-packages.nix b/third_party/nixpkgs/pkgs/top-level/python-packages.nix index 6b165d64e4..78192cbf35 100644 --- a/third_party/nixpkgs/pkgs/top-level/python-packages.nix +++ b/third_party/nixpkgs/pkgs/top-level/python-packages.nix @@ -6208,6 +6208,8 @@ self: super: with self; { jschema-to-python = callPackage ../development/python-modules/jschema-to-python { }; + jschon = callPackage ../development/python-modules/jschon { }; + jsmin = callPackage ../development/python-modules/jsmin { }; json5 = callPackage ../development/python-modules/json5 { };