-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add kikit #31
Merged
Merged
add kikit #31
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,27 @@ | ||
{ | ||
python3, | ||
lib, | ||
fetchPypi, | ||
}: let | ||
inherit (python3.pkgs) buildPythonPackage; | ||
in | ||
buildPythonPackage rec { | ||
pname = "euclid3"; | ||
version = "0.01"; | ||
format = "setuptools"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-JbgnpXrb/Zo/qGJeQ6vD6Qf2HeYiND5+U4SC75tG/Qs="; | ||
}; | ||
|
||
pythonImportsCheck = [ | ||
"euclid3" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "2D and 3D vector, matrix, quaternion and geometry module."; | ||
homepage = "http://code.google.com/p/pyeuclid/"; | ||
license = licenses.lgpl21Plus; | ||
}; | ||
} |
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,40 @@ | ||
{ | ||
python3, | ||
fetchPypi, | ||
lib, | ||
}: let | ||
inherit (python3.pkgs) buildPythonPackage; | ||
|
||
properCaseName = "pcbnewTransition"; | ||
in | ||
buildPythonPackage rec { | ||
pname = properCaseName; | ||
version = "0.3.4"; | ||
format = "setuptools"; | ||
|
||
disabled = python3.pythonOlder "3.7"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-3CJUG1kd63Lg0r9HpJRIvttHS5s2EuZRoxeXrqsJ/kQ="; | ||
}; | ||
|
||
propagatedBuildInputs = with python3.pkgs; [ | ||
kicad | ||
]; | ||
|
||
nativeBuildInputs = with python3.pkgs; [ | ||
versioneer | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
properCaseName | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Library that allows you to support both, KiCAD 5 and KiCAD 6 in your plugins"; | ||
homepage = "https://github.com/yaqwsx/pcbnewTransition"; | ||
changelog = "https://github.com/yaqwsx/pcbnewTransition/releases/tag/v${version}"; | ||
license = licenses.mit; | ||
}; | ||
} |
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,37 @@ | ||
{ | ||
python3, | ||
fetchPypi, | ||
lib, | ||
pymeta3, | ||
}: | ||
python3.pkgs.buildPythonPackage rec { | ||
pname = "pybars3"; | ||
version = "0.9.7"; | ||
format = "setuptools"; | ||
|
||
src = fetchPypi { | ||
inherit pname version; | ||
hash = "sha256-ashH6QXlO5xbk2rxEskQR14nv3Z/efRSjBb5rx7A4lI="; | ||
}; | ||
|
||
propagatedBuildInputs = with python3.pkgs; [ | ||
pymeta3 | ||
]; | ||
|
||
checkPhase = '' | ||
runHook preCheck | ||
${python3.interpreter} tests.py | ||
runHook postCheck | ||
''; | ||
|
||
pythonImportsCheck = [ | ||
"pybars" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Handlebars.js template support for Python 3 and 2"; | ||
homepage = "https://github.com/wbond/pybars3"; | ||
changelog = "https://github.com/wbond/pybars3/releases/tag/${version}"; | ||
license = licenses.lgpl3Only; | ||
}; | ||
} |
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,32 @@ | ||
{ | ||
python3, | ||
fetchPypi, | ||
lib, | ||
}: let | ||
inherit (python3.pkgs) buildPythonPackage; | ||
properCaseName = "PyMeta3"; | ||
in | ||
buildPythonPackage rec { | ||
pname = lib.toLower properCaseName; | ||
version = "0.5.1"; | ||
format = "setuptools"; | ||
|
||
src = fetchPypi { | ||
inherit version; | ||
pname = properCaseName; | ||
hash = "sha256-GL2jJtmpu/WHv8DuC8loZJZNeLBnKIvPVdTZhoHQW8s="; | ||
}; | ||
|
||
doCheck = false; # Tests do not support Python3 | ||
|
||
pythonImportsCheck = [ | ||
"pymeta" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Pattern-matching language based on OMeta for Python 3 and 2"; | ||
homepage = "https://github.com/wbond/pymeta3"; | ||
changelog = "https://github.com/wbond/pymeta3/releases/tag/${version}"; | ||
license = licenses.mit; | ||
}; | ||
} |
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,90 @@ | ||
{ | ||
lib, | ||
pcbnew-transition, | ||
pybars3, | ||
python3, | ||
fetchFromGitHub, | ||
bats, | ||
callPackage, | ||
}: let | ||
properCaseName = "KiKit"; | ||
|
||
solidpython = callPackage ./solidpython {}; | ||
|
||
# https://github.com/yaqwsx/KiKit/issues/574 | ||
shapelyPkgsRoot = fetchFromGitHub { | ||
owner = "NixOS"; | ||
repo = "nixpkgs"; | ||
rev = "8d8e62e74f511160a599471549a98bc9e4f4818d"; | ||
sha256 = "sha256-2vm6IAnaCo5KAA5/rWSb6dzJsS/raEqR93xbM2/jgng="; | ||
}; | ||
|
||
shapelyFile = "${shapelyPkgsRoot}/pkgs/development/python-modules/shapely"; | ||
|
||
shapely = | ||
python3.pkgs.callPackage | ||
shapelyFile | ||
{}; | ||
in | ||
python3.pkgs.buildPythonPackage rec { | ||
pname = lib.toLower properCaseName; | ||
version = "1.3.0"; | ||
format = "setuptools"; | ||
|
||
disabled = python3.pythonOlder "3.7"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "yaqwsx"; | ||
repo = properCaseName; | ||
rev = "v${version}"; | ||
hash = "sha256-kDTPk/R3eZtm4DjoUV4tSQzjGQ9k8MKQedX4oUXYzeo="; | ||
}; | ||
|
||
propagatedBuildInputs = with python3.pkgs; | ||
[ | ||
kicad | ||
numpy | ||
click | ||
markdown2 | ||
commentjson | ||
# https://github.com/yaqwsx/KiKit/issues/575 | ||
wxPython_4_2 | ||
] | ||
++ [ | ||
pcbnew-transition | ||
shapely | ||
pybars3 | ||
# https://github.com/yaqwsx/KiKit/issues/576 | ||
solidpython | ||
]; | ||
|
||
nativeBuildInputs = with python3.pkgs; [ | ||
versioneer | ||
]; | ||
|
||
nativeCheckInputs = with python3.pkgs; | ||
[ | ||
pytest | ||
] | ||
++ [ | ||
bats | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
pname | ||
]; | ||
|
||
checkPhase = '' | ||
runHook preCheck | ||
export PATH=$PATH:$out/bin | ||
make test | ||
runHook postCheck | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Automation for KiCAD boards"; | ||
homepage = "https://github.com/yaqwsx/KiKit/"; | ||
changelog = "https://github.com/yaqwsx/KiKit/releases/tag/v${version}"; | ||
license = licenses.mit; | ||
}; | ||
} |
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,90 @@ | ||
# SolidPython is an unmaintained library with old dependencies. | ||
{ | ||
python3, | ||
fetchFromGitHub, | ||
fetchFromGitLab, | ||
fetchpatch, | ||
lib, | ||
euclid3, | ||
}: let | ||
inherit (python3.pkgs) buildPythonPackage; | ||
|
||
# https://github.com/SolidCode/SolidPython/issues/207 | ||
prettytablePkgsRoot = fetchFromGitHub { | ||
owner = "NixOS"; | ||
repo = "nixpkgs"; | ||
rev = "6dda65e8da23cc123060e3f24723471a15b3f0cd"; | ||
sha256 = "sha256-1zdXZIs5C81slD+nLeIk5j+O/aAujejbiW4g07JHU5s="; | ||
}; | ||
|
||
prettytableFile = "${prettytablePkgsRoot}/pkgs/development/python-modules/prettytable"; | ||
|
||
prettytable = | ||
python3.pkgs.callPackage | ||
prettytableFile | ||
{ | ||
# stdenv seems to have moved since then. Shim something that'll make this | ||
# old version of prettytable happy. | ||
stdenv = { | ||
inherit lib; | ||
}; | ||
}; | ||
|
||
pypng = python3.pkgs.pypng.overrideAttrs (old: rec { | ||
version = "0.0.19"; | ||
src = fetchFromGitLab { | ||
owner = "drj11"; | ||
repo = "pypng"; | ||
rev = "refs/tags/${old.pname}-${version}"; | ||
hash = "sha256-XVsXgvLVFfxrRXDwdZO7oi7LPozN2XiYeXCK9NTx4Qs="; | ||
}; | ||
patches = [ | ||
(fetchpatch { | ||
url = "https://gitlab.com/drj11/pypng/-/commit/fe9c973c5e92f24746dfa1be8796c14a2befec4f.diff"; | ||
hash = "sha256-OYO8TE4MRHhRmgLjetk4TajFT7INQ9WdjCRjDsGc+pg="; | ||
}) | ||
]; | ||
|
||
disabledTests = [ | ||
"test_test_dir" | ||
]; | ||
}); | ||
in | ||
buildPythonPackage rec { | ||
pname = "solidpython"; | ||
version = "1.1.3"; | ||
format = "pyproject"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "SolidCode"; | ||
repo = "SolidPython"; | ||
rev = "d962740d600c5dfd69458c4559fc416b9beab575"; | ||
hash = "sha256-3fJta2a5c8hV9FPwKn5pj01aBtsCGSRCz3vvxR/5n0Q="; | ||
}; | ||
|
||
propagatedBuildInputs = with python3.pkgs; | ||
[ | ||
ply | ||
setuptools | ||
] | ||
++ [ | ||
prettytable | ||
euclid3 | ||
pypng | ||
]; | ||
|
||
buildInputs = with python3.pkgs; [ | ||
poetry-core | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
"solid" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Python interface to the OpenSCAD declarative geometry language"; | ||
homepage = "https://github.com/SolidCode/SolidPython"; | ||
changelog = "https://github.com/SolidCode/SolidPython/releases/tag/v${version}"; | ||
license = licenses.lgpl21Plus; | ||
}; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mightyiam please add this pattern to the repo documentation the top-level
README
, including an note that upstreaming to Nixpkgs is encouraged.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added by #42