3p/nixpkgs: glasgow update
This commit is contained in:
parent
98eb3e9ef5
commit
9590f08503
7 changed files with 86 additions and 18 deletions
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "abc-verifier";
|
pname = "abc-verifier";
|
||||||
version = "unstable-2023-10-13";
|
version = "unstable-2024-05-08";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "yosyshq";
|
owner = "yosyshq";
|
||||||
repo = "abc";
|
repo = "abc";
|
||||||
rev = "896e5e7dedf9b9b1459fa019f1fa8aa8101fdf43";
|
rev = "237d81397fcc85dd3894bf1a449d2955cd3df02d";
|
||||||
hash = "sha256-ou+E2lvDEOxXRXNygE/TyVi7quqk+CJHRI+HDI0xljE=";
|
hash = "sha256-t3wdt/jGyF3Ysd0rzDYvPzECgOAL87/IJlHh3FGaF1k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
|
@ -115,7 +115,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./plugin-search-dirs.patch
|
./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 = ''
|
postPatch = ''
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
pdm-backend,
|
pdm-backend,
|
||||||
pyvcd,
|
pyvcd,
|
||||||
jinja2,
|
jinja2,
|
||||||
|
jschon,
|
||||||
importlib-resources,
|
importlib-resources,
|
||||||
importlib-metadata,
|
importlib-metadata,
|
||||||
git,
|
git,
|
||||||
|
@ -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 = [
|
||||||
|
@ -39,6 +40,7 @@ buildPythonPackage rec {
|
||||||
[
|
[
|
||||||
jinja2
|
jinja2
|
||||||
pyvcd
|
pyvcd
|
||||||
|
jschon
|
||||||
]
|
]
|
||||||
++ lib.optional (pythonOlder "3.9") importlib-resources
|
++ lib.optional (pythonOlder "3.9") importlib-resources
|
||||||
++ lib.optional (pythonOlder "3.8") importlib-metadata;
|
++ lib.optional (pythonOlder "3.8") importlib-metadata;
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
python,
|
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
sdcc,
|
sdcc,
|
||||||
|
setuptools,
|
||||||
|
setuptools-scm,
|
||||||
libusb1,
|
libusb1,
|
||||||
crcmod,
|
crcmod,
|
||||||
}:
|
}:
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "fx2";
|
pname = "fx2";
|
||||||
version = "0.13";
|
version = "0.13";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "whitequark";
|
owner = "whitequark";
|
||||||
|
@ -20,13 +21,18 @@ buildPythonPackage rec {
|
||||||
hash = "sha256-PtWxjT+97+EeNMN36zOT1+ost/w3lRRkaON3Cl3dpp4=";
|
hash = "sha256-PtWxjT+97+EeNMN36zOT1+ost/w3lRRkaON3Cl3dpp4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ sdcc ];
|
nativeBuildInputs = [ sdcc setuptools setuptools-scm ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
libusb1
|
libusb1
|
||||||
crcmod
|
crcmod
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace software/pyproject.toml \
|
||||||
|
--replace-fail 'setuptools~=67.0' 'setuptools'
|
||||||
|
'';
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
make -C firmware
|
make -C firmware
|
||||||
cd software
|
cd software
|
||||||
|
|
56
third_party/nixpkgs/pkgs/development/python-modules/jschon/default.nix
vendored
Normal file
56
third_party/nixpkgs/pkgs/development/python-modules/jschon/default.nix
vendored
Normal file
|
@ -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; [];
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,19 +9,20 @@
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "glasgow";
|
pname = "glasgow";
|
||||||
version = "unstable-2023-09-20";
|
version = "unstable-2024-06-28";
|
||||||
# python -m setuptools_scm
|
|
||||||
realVersion = "0.1.dev1798+g${lib.substring 0 7 src.rev}";
|
realVersion = "0.1.dev1798+g${lib.substring 0 7 src.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.unittestCheckHook
|
||||||
|
python3.pkgs.pdm-backend
|
||||||
sdcc
|
sdcc
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -34,6 +35,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
fx2
|
fx2
|
||||||
libusb1
|
libusb1
|
||||||
packaging
|
packaging
|
||||||
|
platformdirs
|
||||||
pyvcd
|
pyvcd
|
||||||
setuptools
|
setuptools
|
||||||
];
|
];
|
||||||
|
@ -46,7 +48,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 +56,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/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
|
# 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 = [
|
||||||
|
|
|
@ -6208,6 +6208,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 a new issue