Joeal Subash 1d049a42f1 ipbus-uhal: init at 2.8.16
Co-authored-by: aucub <78630225+aucub@users.noreply.github.com>

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 <github@acc.pluie.me>

Co-authored-by: Leah Amelia Chen <github@acc.pluie.me>

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 <arne.keller@posteo.de>

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
2025-01-23 11:18:52 +00:00

75 lines
1.7 KiB
Nix

{
lib,
stdenv,
bash,
cacert,
boost186,
pugixml,
python3,
python3Packages,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ipbus-uhal";
version = "2.8.16";
src = fetchFromGitHub {
owner = "ipbus";
repo = "ipbus-software";
rev = "v${finalAttrs.version}";
hash = "sha256-R+a9VmONyWh3BEYoMjRcXKv+3HaNcKbJDnYH1hXHdPg=";
};
nativeBuildInputs = [
cacert
(python3.withPackages (ps: [
ps.distutils
ps.pybind11
]))
];
buildInputs = [
boost186
pugixml
python3.pkgs.distutils
python3.pkgs.pybind11
];
postPatch = ''
substituteInPlace config/Makefile.macros --replace-fail \
'SHELL := /bin/bash' ""
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"
"CXX=${stdenv.cc.targetPrefix}c++"
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,include}
make Set=uhal install prefix=$out/bin includedir=$out/include
runHook postInstall
'';
meta = {
description = "Software which pairs with ipbus-firmware";
longDescription = ''
Software that provide a reliable high-performance
control link for particle-physics or other electronics,
by implementing a simple A32/D32 control protocol
for reading and modifying memory-mapped resources
within FPGA-based hardware devices.
'';
platforms = lib.platforms.linux;
homepage = "https://ipbus.web.cern.ch/";
maintainers = [ lib.maintainers.bashsu ];
mainProgram = "ipbus-uhal";
};
})