1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-03 06:19:10 +03:00
nixpkgs/pkgs/development/python-modules/libarchive-c/default.nix

48 lines
907 B
Nix
Raw Normal View History

{ lib
, stdenv
, buildPythonPackage
, pythonAtLeast
, fetchFromGitHub
2018-11-04 11:35:04 +01:00
, libarchive
, glibcLocales
2018-11-04 11:35:04 +01:00
, mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "libarchive-c";
version = "3.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "Changaco";
repo = "python-${pname}";
rev = version;
sha256 = "1z4lqy9zlzymshzrcldsc9ipys2l7grqg4yff6ndl6dgbfb0g4jb";
};
LC_ALL="en_US.UTF-8";
postPatch = ''
substituteInPlace libarchive/ffi.py --replace \
2018-11-04 11:35:04 +01:00
"find_library('archive')" "'${libarchive.lib}/lib/libarchive${stdenv.hostPlatform.extensions.sharedLibrary}'"
'';
pythonImportsCheck = [
"libarchive"
];
checkInputs = [
glibcLocales
mock
pytestCheckHook
];
meta = with lib; {
homepage = "https://github.com/Changaco/python-libarchive-c";
description = "Python interface to libarchive";
license = licenses.cc0;
};
}