Unverified Commit b1206c1f authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

ipbus-uhal: init at 2.8.16 (#357608)

parents 54c4c62d 1d049a42
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2602,6 +2602,12 @@
    name = "Wanderson Ferreira";
    keys = [ { fingerprint = "A3E1 C409 B705 50B3 BF41  492B 5684 0A61 4DBE 37AE"; } ];
  };
  bashsu = {
    name = "Joeal Subash";
    email = "joeal.subash@cern.ch";
    github = "joealsubash";
    githubId = 98759349;
  };
  bastaynav = {
    name = "Ivan Bastrakov";
    email = "bastaynav@proton.me";
+74 −0
Original line number Diff line number Diff line
{
  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";
  };
})