libcomps: init at 0.1.20
This commit is contained in:
parent
4119ae605a
commit
1d845b40d4
65
pkgs/tools/package-management/libcomps/default.nix
Normal file
65
pkgs/tools/package-management/libcomps/default.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{ lib
|
||||
, check
|
||||
, cmake
|
||||
, doxygen
|
||||
, expat
|
||||
, fetchFromGitHub
|
||||
, libxml2
|
||||
, python
|
||||
, sphinx
|
||||
, stdenv
|
||||
, zlib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libcomps";
|
||||
version = "0.1.20";
|
||||
|
||||
outputs = [ "out" "dev" "py" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rpm-software-management";
|
||||
repo = "libcomps";
|
||||
rev = version;
|
||||
hash = "sha256-IX4du1+G7lwWrGnllydnBDap2aqK5pzos1Mdyu4MzOU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-python-install-dir.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace libcomps/src/python/src/CMakeLists.txt \
|
||||
--replace "@PYTHON_INSTALL_DIR@" "$out/${python.sitePackages}"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
check
|
||||
cmake
|
||||
doxygen
|
||||
python
|
||||
sphinx
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
expat
|
||||
libxml2
|
||||
zlib
|
||||
];
|
||||
|
||||
dontUseCmakeBuildDir = true;
|
||||
cmakeDir = "libcomps";
|
||||
|
||||
postFixup = ''
|
||||
ls $out/lib
|
||||
moveToOutput "lib/${python.libPrefix}" "$py"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Comps XML file manipulation library";
|
||||
homepage = "https://github.com/rpm-software-management/libcomps";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ katexochen ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt
|
||||
index d22b84e..57bd1c2 100644
|
||||
--- a/libcomps/src/python/src/CMakeLists.txt
|
||||
+++ b/libcomps/src/python/src/CMakeLists.txt
|
||||
@@ -85,7 +85,7 @@ IF (SKBUILD)
|
||||
INSTALL(FILES libcomps/__init__.py DESTINATION libcomps/src/python/src/libcomps)
|
||||
INSTALL(TARGETS pycomps LIBRARY DESTINATION libcomps/src/python/src/libcomps)
|
||||
ELSE ()
|
||||
- EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
|
||||
+ SET(PYTHON_INSTALL_DIR "@PYTHON_INSTALL_DIR@")
|
||||
|
||||
INSTALL(FILES ${pycomps_SRCDIR}/libcomps/__init__.py DESTINATION ${PYTHON_INSTALL_DIR}/libcomps)
|
||||
#INSTALL(FILES ${pycomps_SRCDIR}/tests/__test.py DESTINATION
|
@ -22570,6 +22570,8 @@ with pkgs;
|
||||
|
||||
libcollectdclient = callPackage ../development/libraries/libcollectdclient { };
|
||||
|
||||
libcomps = callPackage ../tools/package-management/libcomps { python = python3; };
|
||||
|
||||
libcpr = callPackage ../development/libraries/libcpr { };
|
||||
|
||||
libcredis = callPackage ../development/libraries/libcredis { };
|
||||
|
@ -6137,6 +6137,13 @@ self: super: with self; {
|
||||
|
||||
libcloud = callPackage ../development/python-modules/libcloud { };
|
||||
|
||||
libcomps = lib.pipe pkgs.libcomps [
|
||||
toPythonModule
|
||||
(p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; }))
|
||||
(p: p.override { inherit python; })
|
||||
(p: p.py)
|
||||
];
|
||||
|
||||
libcst = callPackage ../development/python-modules/libcst { };
|
||||
|
||||
libdnf = lib.pipe pkgs.libdnf [
|
||||
|
Loading…
Reference in New Issue
Block a user