-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
f6e2751
to
96a3140
Compare
Hi, thanks for the feedback. I have changed the prefix to nix standards and removed the script. Hope this is ok for merge now. |
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.
Mostly there
96a3140
to
9d373a5
Compare
2f1a313
to
cf7d31d
Compare
Hopefully this looks good for now. |
I got the following error and cannot build.
|
I recommend setting |
cf7d31d
to
1661c0f
Compare
ipbus-uhal: init at 2.8.16 : formatting fix after CI failure ipbus-uhal: init at 2.8.16 : Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix; PR suggesiton Co-authored-by: aucub <[email protected]> ipbus-uhal: init at 2.8.16 : Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix; PR suggesiton 2 Co-authored-by: aucub <[email protected]> ipbus-uhal: init at 2.8.16 : Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix; PR suggesiton 3 Co-authored-by: aucub <[email protected]> ipbus-uhal: init at 2.8.16 : Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix; PR suggesiton 4 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 ipbus-uhal: init at 2.8.16 : added ipbus-uhal to all-packages.nix as suggested in PR ipbus-uhal: init at 2.8.16 : adding name to maintainers list ipbus-uhal: init at 2.8.16 : adding maintainer name to maintainers list ipbus-uhal: init at 2.8.16 : fixing maintainer name in uhal.nix ipbus-uhal: init at 2.8.16 : fixing order of maintainer list; moving one place up Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix Co-authored-by: Leah Amelia Chen <[email protected]> Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix Co-authored-by: Leah Amelia Chen <[email protected]> Update pkgs/development/embedded/fpga/ipbus-uhal/uhal.nix Co-authored-by: Leah Amelia Chen <[email protected]> ipbus-uhal: init at 2.8.16 ipbus-uhal: init at 2.8.16 revert ipbus-uhal: init at 2.8.16 ipbus-uhal: init at 2.8.16 ipbus-uhal: init at 2.8.16 ipbus-uhal: init at 2.8.16 Co-authored-by: Leah Amelia Chen <[email protected]> ipbus-uhal: init at 2.8.16 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
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"; |
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.