mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
pythonPackages.libarchive-c: refactor move to python-modules
This commit is contained in:
parent
0594a95c96
commit
5027902691
36
pkgs/development/python-modules/libarchive-c/default.nix
Normal file
36
pkgs/development/python-modules/libarchive-c/default.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytest
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "libarchive-c";
|
||||
version = "2.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "011bfsmqpcwd6920kckllh7zhw2y4rrasgmddb7wjzn2hg1xpsjn";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest pkgs.glibcLocales ];
|
||||
|
||||
LC_ALL="en_US.UTF-8";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace libarchive/ffi.py --replace \
|
||||
"find_library('archive')" "'${pkgs.libarchive.lib}/lib/libarchive.so'"
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
py.test tests -k 'not test_check_archiveentry_with_unicode_entries_and_name_zip and not test_check_archiveentry_using_python_testtar'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/Changaco/python-libarchive-c;
|
||||
description = "Python interface to libarchive";
|
||||
license = licenses.cc0;
|
||||
};
|
||||
|
||||
}
|
@ -4240,27 +4240,7 @@ in {
|
||||
|
||||
python-libarchive = callPackage ../development/python-modules/python-libarchive { };
|
||||
|
||||
libarchive-c = buildPythonPackage rec {
|
||||
name = "libarchive-c-${version}";
|
||||
version = "2.7";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "mirror://pypi/l/libarchive-c/${name}.tar.gz";
|
||||
sha256 = "011bfsmqpcwd6920kckllh7zhw2y4rrasgmddb7wjzn2hg1xpsjn";
|
||||
};
|
||||
|
||||
LC_ALL="en_US.UTF-8";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace libarchive/ffi.py --replace \
|
||||
"find_library('archive')" "'${pkgs.libarchive.lib}/lib/libarchive.so'"
|
||||
'';
|
||||
checkPhase = ''
|
||||
py.test tests -k 'not test_check_archiveentry_with_unicode_entries_and_name_zip and not test_check_archiveentry_using_python_testtar'
|
||||
'';
|
||||
|
||||
buildInputs = with self; [ pytest pkgs.glibcLocales ];
|
||||
};
|
||||
libarchive-c = callPackage ../development/python-modules/libarchive-c { };
|
||||
|
||||
libasyncns = callPackage ../development/python-modules/libasyncns {
|
||||
inherit (pkgs) libasyncns pkgconfig;
|
||||
|
Loading…
Reference in New Issue
Block a user