Skip to content

Commit

Permalink
liberasurecode: 1.6.3 -> 1.6.4 (#338883)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Sep 2, 2024
2 parents a33b796 + 9d60285 commit b870875
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
{ 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 ];

Expand All @@ -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" ];
};
}
})
28 changes: 20 additions & 8 deletions pkgs/development/python-modules/pyeclib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -37,9 +46,12 @@ buildPythonPackage rec {
export ${ldLibraryPathEnvName}="${lib.makeLibraryPath [ liberasurecode ]}"
'';

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

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

pythonImportsCheck = [ "pyeclib" ];

Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit b870875

Please sign in to comment.