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
platformio: 3.4.1 -> 3.5.0 #33367
platformio: 3.4.1 -> 3.5.0 #33367
Conversation
@@ -16,7 +16,7 @@ buildPythonPackage rec { | |||
''; | |||
|
|||
checkInputs = [ nose chai simplejson ]; | |||
propagatedBuildInputs = [ dateutil backports_functools_lru_cache ]; | |||
propagatedBuildInputs = [ dateutil backports_functools_lru_cache_121 ]; |
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.
I would rather patch the line install_requires.append('backports.functools_lru_cache==1.2.1')
from setup.py
to read install_requires.append('backports.functools_lru_cache>=1.2.1')
.
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.
I've patched the setup.py
in 340cadd.
pkgs/top-level/python-packages.nix
Outdated
@@ -1007,6 +1007,8 @@ in { | |||
|
|||
backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { }; | |||
|
|||
backports_functools_lru_cache_121 = callPackage ../development/python-modules/backports_functools_lru_cache_121 { }; |
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.
Even if arrow
really does require a very specific version of lru_cache
this version should not be exposed in python-packages.nix
.
Ideally arrow
should be patched to not require a very explicit version but if it really does this override should be moved to the arrow
directory.
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.
Additional versions of packages are not permitted in python-packages.nix
at all as they cause collisions, so also not inside expressions. Applications that are defined outside python-packages.nix
can override the package set to insert whatever version they need.
pkgs/top-level/python-packages.nix
Outdated
@@ -1007,6 +1007,8 @@ in { | |||
|
|||
backports_functools_lru_cache = callPackage ../development/python-modules/backports_functools_lru_cache { }; | |||
|
|||
backports_functools_lru_cache_121 = callPackage ../development/python-modules/backports_functools_lru_cache_121 { }; |
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.
Additional versions of packages are not permitted in python-packages.nix
at all as they cause collisions, so also not inside expressions. Applications that are defined outside python-packages.nix
can override the package set to insert whatever version they need.
4d8e4eb
to
9c7eee2
Compare
made changes requested by @FRidh and @adisbladis and verified it still worked on my box. I also added pio alias as it has been bugging me its not there |
9c7eee2
to
d4109bd
Compare
@@ -30,5 +32,9 @@ buildFHSUserEnv { | |||
platforms = with platforms; linux; | |||
}; | |||
|
|||
extraInstallCommands = '' | |||
ln -s $out/bin/platformio $out/bin/pio | |||
''a |
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.
typo
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.
fixed
@@ -23,6 +23,13 @@ buildPythonPackage rec { | |||
|
|||
patches = [ ./fix-searchpath.patch ]; | |||
|
|||
postInstall = '' |
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.
Why is this needed? wrapPythonPrograms
already sets PATH
and injects PYTHONPATH
.
Note also that the postFixup
(or fixupPhase
in general) is preferred for wrappers.
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.
you are right its no longer needed with the other fixes in place. earlier i was not seeing the lru getting linked in properly.
f3d2507
to
147abaa
Compare
What are the packages in the chrootenv for? They all seem to be dependencies of platformio already. Did you get an import error if you did not add say the backports package? |
147abaa
to
27b5dbb
Compare
Earlier i thought I did. I just tested it with them removed and it runs fine as well. I pushed updated code just now @FRidh |
I think you may as well write |
@FRidh i am happy to make that change but im not sure how. i looked at some of the packages that make use of it but not sure i completely grok whats going on. |
@mogorman it creates a tree of symbolic links including the listed packages and Python dependencies. |
right @FRidh , im just not sure how to correctly to use it in the expression and have the resulting fhsuserenv work. i tried saying let pythonUserEnv = python.withPackages(ps: with ps; [ platformio ]) and then including that instead of the python deps and it failed to run |
That's a pity, I thought that could work. How did it fail? With what error? |
In any case, that's an improvement that can be made separate from this PR. |
Motivation for this change
i wanted to use an esp32 so i needed to update platformio. it needs a specific version of lru_cache because arrow 0.12.0 needs a specific version it seems. also the wrapper function had to be changed as it was not linking to the lru package correctly.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)