-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
ipbus-uhal: init at 2.8.16 #357608
base: master
Are you sure you want to change the base?
ipbus-uhal: init at 2.8.16 #357608
Conversation
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.
Welcome to nixpkgs!
Please modify your pr title and commit message to comply with the repository requirements
Please add this package in pkgs/top-level/all-packages.nix
b4b7c15
to
fbed328
Compare
Hi, |
8812c99
to
e11cbca
Compare
Hi, I have squashed the commits and added it to |
@@ -0,0 +1,47 @@ | |||
#! @bash@/bin/sh |
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'm really quite unsure of what the purpose of this script is.
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.
Its probably because I don't understand nix very well.
But the idea is, package user should be able to invoke uhal from python and use it to communicate with FPGA hardware connected via. the Ethernet port. That is what adding to PYTHONPATH
part does. Another use case is for software developers to be able to access the uhal API to write their custom C/C++ applications.
These are the main ideas this script is trying to provide when the user wants a nix shell
with uhal.
If there is a better way to do it, I'd be happy to change. Thanks.
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.
In Nix shells, if you want to have a Python install with certain modules configured, you'd use the withPackages
function on python3
: python3.withPackages (ps: with ps; [ iphus-uhal ])
or something similar.
As for installing other tools, you should add them to propagatedBuildInputs
.
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.
All other unresolved comments still remain an issue
936dcf8
to
2605ba1
Compare
1dde288
to
cdd4eb1
Compare
Hi, does this look ok to merge now? Thanks. |
I don't think my concerns regarding the install prefix & the superfluous bash script have been resolved yet |
cdd4eb1
to
f6e2751
Compare
cf7d31d
to
1661c0f
Compare
1661c0f
to
e585a3f
Compare
I am unable to reproduce your error locally(builds fine on my machine), not sure why. How can I investigate this further? |
The package builds for me. Some suggestions: diff --git a/pkgs/by-name/ip/ipbus-uhal/package.nix b/pkgs/by-name/ip/ipbus-uhal/package.nix
index 8fc83623ebf6..57e920610b75 100644
--- a/pkgs/by-name/ip/ipbus-uhal/package.nix
+++ b/pkgs/by-name/ip/ipbus-uhal/package.nix
@@ -34,23 +34,22 @@ stdenv.mkDerivation (finalAttrs: {
python3.pkgs.distutils
python3.pkgs.pybind11
];
- configurePhase = ''
- patchShebangs uhal/config/install.sh
- patchShebangs uhal/tests/setup.sh
- patchShebangs scripts/doxygen/api_uhal.sh
- patchShebangs config/progress.sh
- patchShebangs config/Makefile.macros
+ postPatch = ''
+ patchShebangs --build uhal/config/install.sh
+ patchShebangs --build uhal/tests/setup.sh
+ patchShebangs --build scripts/doxygen/api_uhal.sh
+ patchShebangs --build config/progress.sh
+ patchShebangs --build config/Makefile.macros
'';
enableParallelBuilding = true;
- makeFlags = [ "Set=uhal" ];
-
- installPhase = ''
- mkdir -p $out/bin
- mkdir -p $out/include
- make Set=uhal install prefix=$out/bin includedir=$out/include
- '';
+ makeFlags = [
+ "Set=uhal"
+ "CXX=${stdenv.cc.targetPrefix}c++"
+ "prefix=$out/bin"
+ "includedir=$out/include"
+ ];
meta = {
description = "Software which pairs with ipbus-firmware"; |
31a4b4a
to
b4b22cc
Compare
Hi, |
66f1c25
to
2f4639c
Compare
@FliegendeWurst how does this look now? I have incorporated your changes, but had to revert some because it broke the installation. Thanks for the review and suggestions. |
boost186 and the |
26691dd
to
2dc271b
Compare
OK, those changes have been made now and has been rebased. |
Thank you. Please also reorder the commits so the maintainers modification comes first, and clean up the other commit message a bit 😉 |
2dc271b
to
7a44831
Compare
Co-authored-by: aucub <[email protected]> ipbus-uhal: init at 2.8.16 : removed old git source; not using "with lib" anymore; empty maintainers added Co-authored-by: Leah Amelia Chen <[email protected]> Co-authored-by: Leah Amelia Chen <[email protected]> ipbus-uhal: init at 2.8.16 - remove pkgs.distutils and enableParallelBuilding ipbus-uhal: init at 2.8.16 - re-add python3.pkgs.distutil after local build failure, fixed after adding adding suggestions by FliegendeWurst undoing some changes to allow installation; installation did'nt work with previous commit fixing merge conflict Co-authored-by: Arne Keller <[email protected]> fix multiple strings pre and postInstall hooks added removing python stuff. remove python stuff using new shorthand patching in pacakge.nix instead changes to fix error when testing removing unecessary patch usign new tag format for fetchFromGitHub sticking to boost1.86; ipbus-uhal ioservice dependence Fixing Formatting using nixpkgs
7a44831
to
1d049a4
Compare
Ok done now. Made a mistake when rebasing but this has been fixed in the newest push. |
Alright it looks okay now. |
IPBus uhal and firmware provide a mechanism to read/write into FPGA firmware in a reliable fashion. It is used in many current particle-physics experiments at CERN like ATLAS and CMS.
shell-env.sh allows development using the uhal API and provides python bindings for reading and writing into firmware.
https://ipbus.web.cern.ch/
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.