Skip to content
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

liberasurecode: 1.6.3 -> 1.6.4 #338883

Merged
merged 5 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -19925,8 +19925,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