Unverified Commit b8708753 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

liberasurecode: 1.6.3 -> 1.6.4 (#338883)

parents a33b796c 9d60285f
Loading
Loading
Loading
Loading
+32 −17
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, doxygen
, installShellFiles
, zlib
{
  lib,
  stdenv,
  autoreconfHook,
  doxygen,
  fetchFromGitHub,
  installShellFiles,
  testers,
  zlib,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "liberasurecode";
  version = "1.6.3";
  version = "1.6.4";

  outputs = [ "out" "dev" "doc" ];
  outputs = [
    "out"
    "dev"
    "doc"
  ];

  src = fetchFromGitHub {
    owner = "openstack";
    repo = pname;
    rev = version;
    sha256 = "sha256-HCp+FQ9nq4twk6FtfKhzT80wXXJbvG+clrDO2/9ATpU=";
    repo = "liberasurecode";
    rev = "refs/tags/${finalAttrs.version}";
    hash = "sha256-KYXlRjUudWhFbhyv9V1fmqwBw3/vTBfusxafaNG+Q40=";
  };

  postPatch = ''
    substituteInPlace doc/doxygen.cfg.in \
      --replace "GENERATE_MAN           = NO" "GENERATE_MAN           = YES"
      --replace-fail "GENERATE_MAN           = NO" "GENERATE_MAN           = YES"

    substituteInPlace Makefile.am src/Makefile.am \
      --replace "-Werror" ""
      --replace-fail "-Werror" ""
  '';

  nativeBuildInputs = [ autoreconfHook doxygen installShellFiles ];
  nativeBuildInputs = [
    autoreconfHook
    doxygen
    installShellFiles
  ];

  buildInputs = [ zlib ];

@@ -47,10 +57,15 @@ stdenv.mkDerivation rec {

  checkTarget = "test";

  passthru.tests.pkg-config = testers.hasPkgConfigModules {
    package = finalAttrs.finalPackage;
  };

  meta = with lib; {
    description = "Erasure Code API library written in C with pluggable Erasure Code backends";
    homepage = "https://github.com/openstack/liberasurecode";
    license = licenses.bsd2;
    maintainers = teams.openstack.members;
    pkgConfigModules = [ "erasurecode-1" ];
  };
}
})
+20 −8
Original line number Diff line number Diff line
@@ -2,32 +2,41 @@
  lib,
  stdenv,
  buildPythonPackage,
  distutils,
  fetchFromGitHub,
  liberasurecode,
  pytestCheckHook,
  setuptools,
  six,
}:

buildPythonPackage rec {
  pname = "pyeclib";
  version = "unstable-2022-03-11";
  format = "setuptools";
  version = "1.6.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "openstack";
    repo = "pyeclib";
    rev = "b50040969a03f7566ffcb468336e875d21486113";
    hash = "sha256-nYYjocStC0q/MC6pum3J4hlXiu/R5xODwIE97Ho3iEY=";
    rev = "refs/tags/${version}";
    hash = "sha256-pa3majZ68+DQGtgGCpZVRshof+w9jvpxreo4dkckLXk=";
  };

  postPatch = ''
    # patch dlopen call
    substituteInPlace src/c/pyeclib_c/pyeclib_c.c \
      --replace "liberasurecode.so" "${liberasurecode}/lib/liberasurecode.so"
      --replace-fail "liberasurecode.so" "${liberasurecode}/lib/liberasurecode.so"

    # python's platform.platform() doesn't return "Darwin" (anymore?)
    substituteInPlace setup.py \
      --replace '"Darwin"' '"macOS"'
      --replace-fail '"Darwin"' '"macOS"'
  '';

  build-system = [
    distutils
    setuptools
  ];

  preBuild =
    let
      ldLibraryPathEnvName = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
@@ -37,9 +46,12 @@ buildPythonPackage rec {
      export ${ldLibraryPathEnvName}="${lib.makeLibraryPath [ liberasurecode ]}"
    '';

  buildInputs = [ liberasurecode ];
  dependencies = [ liberasurecode ];

  nativeCheckInputs = [ six ];
  nativeCheckInputs = [
    pytestCheckHook
    six
  ];

  pythonImportsCheck = [ "pyeclib" ];

+0 −2
Original line number Diff line number Diff line
@@ -19923,8 +19923,6 @@ with pkgs;
  libesmtp = callPackage ../development/libraries/libesmtp { };
  liberasurecode = callPackage ../applications/misc/liberasurecode { };
  example-robot-data = callPackage ../development/libraries/example-robot-data { };
  exiv2 = callPackage ../development/libraries/exiv2 { };