Loading pkgs/tools/package-management/libdnf/default.nix +24 −1 Original line number Diff line number Diff line Loading @@ -16,12 +16,18 @@ , rpm , zchunk , cppunit , python , swig , glib , sphinx }: stdenv.mkDerivation rec { pname = "libdnf"; version = "0.72.0"; outputs = [ "out" "dev" "py" ]; src = fetchFromGitHub { owner = "rpm-software-management"; repo = pname; Loading @@ -44,6 +50,9 @@ stdenv.mkDerivation rec { libyaml libmodulemd zchunk python swig sphinx ]; propagatedBuildInputs = [ Loading @@ -58,18 +67,32 @@ stdenv.mkDerivation rec { cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake cmake/modules/ ''; patches = [ ./fix-python-install-dir.patch ]; postPatch = '' # https://github.com/rpm-software-management/libdnf/issues/1518 substituteInPlace libdnf/libdnf.pc.in \ --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ substituteInPlace cmake/modules/FindPythonInstDir.cmake \ --replace "@PYTHON_INSTALL_DIR@" "$out/${python.sitePackages}" ''; cmakeFlags = [ "-DWITH_GTKDOC=OFF" "-DWITH_HTML=OFF" "-DWITH_BINDINGS=OFF" "-DPYTHON_DESIRED=${lib.head (lib.splitString ["."] python.version)}" ]; postInstall = '' rm -r $out/${python.sitePackages}/hawkey/test ''; postFixup = '' moveToOutput "lib/${python.libPrefix}" "$py" ''; meta = with lib; { description = "Package management library"; homepage = "https://github.com/rpm-software-management/libdnf"; Loading pkgs/tools/package-management/libdnf/fix-python-install-dir.patch 0 → 100644 +12 −0 Original line number Diff line number Diff line diff --git a/cmake/modules/FindPythonInstDir.cmake b/cmake/modules/FindPythonInstDir.cmake index ed098ded..2a2e1543 100644 --- a/cmake/modules/FindPythonInstDir.cmake +++ b/cmake/modules/FindPythonInstDir.cmake @@ -1,6 +1 @@ -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c " -from sys import stdout -from sysconfig import get_path -path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}) -stdout.write(path)" -OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +SET(PYTHON_INSTALL_DIR "@PYTHON_INSTALL_DIR@") pkgs/top-level/all-packages.nix +1 −1 Original line number Diff line number Diff line Loading @@ -22658,7 +22658,7 @@ with pkgs; libdnet = callPackage ../development/libraries/libdnet { }; libdnf = callPackage ../tools/package-management/libdnf { }; libdnf = callPackage ../tools/package-management/libdnf { python = python3; }; libdovi = callPackage ../development/libraries/libdovi { }; pkgs/top-level/python-packages.nix +7 −0 Original line number Diff line number Diff line Loading @@ -6139,6 +6139,13 @@ self: super: with self; { libcst = callPackage ../development/python-modules/libcst { }; libdnf = lib.pipe pkgs.libdnf [ toPythonModule (p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; })) (p: p.override { inherit python; }) (p: p.py) ]; libevdev = callPackage ../development/python-modules/libevdev { }; libfdt = toPythonModule (pkgs.dtc.override { Loading Loading
pkgs/tools/package-management/libdnf/default.nix +24 −1 Original line number Diff line number Diff line Loading @@ -16,12 +16,18 @@ , rpm , zchunk , cppunit , python , swig , glib , sphinx }: stdenv.mkDerivation rec { pname = "libdnf"; version = "0.72.0"; outputs = [ "out" "dev" "py" ]; src = fetchFromGitHub { owner = "rpm-software-management"; repo = pname; Loading @@ -44,6 +50,9 @@ stdenv.mkDerivation rec { libyaml libmodulemd zchunk python swig sphinx ]; propagatedBuildInputs = [ Loading @@ -58,18 +67,32 @@ stdenv.mkDerivation rec { cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake cmake/modules/ ''; patches = [ ./fix-python-install-dir.patch ]; postPatch = '' # https://github.com/rpm-software-management/libdnf/issues/1518 substituteInPlace libdnf/libdnf.pc.in \ --replace '$'{prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ substituteInPlace cmake/modules/FindPythonInstDir.cmake \ --replace "@PYTHON_INSTALL_DIR@" "$out/${python.sitePackages}" ''; cmakeFlags = [ "-DWITH_GTKDOC=OFF" "-DWITH_HTML=OFF" "-DWITH_BINDINGS=OFF" "-DPYTHON_DESIRED=${lib.head (lib.splitString ["."] python.version)}" ]; postInstall = '' rm -r $out/${python.sitePackages}/hawkey/test ''; postFixup = '' moveToOutput "lib/${python.libPrefix}" "$py" ''; meta = with lib; { description = "Package management library"; homepage = "https://github.com/rpm-software-management/libdnf"; Loading
pkgs/tools/package-management/libdnf/fix-python-install-dir.patch 0 → 100644 +12 −0 Original line number Diff line number Diff line diff --git a/cmake/modules/FindPythonInstDir.cmake b/cmake/modules/FindPythonInstDir.cmake index ed098ded..2a2e1543 100644 --- a/cmake/modules/FindPythonInstDir.cmake +++ b/cmake/modules/FindPythonInstDir.cmake @@ -1,6 +1 @@ -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c " -from sys import stdout -from sysconfig import get_path -path=get_path(name='platlib', vars={'platbase':'${CMAKE_INSTALL_PREFIX}'}) -stdout.write(path)" -OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +SET(PYTHON_INSTALL_DIR "@PYTHON_INSTALL_DIR@")
pkgs/top-level/all-packages.nix +1 −1 Original line number Diff line number Diff line Loading @@ -22658,7 +22658,7 @@ with pkgs; libdnet = callPackage ../development/libraries/libdnet { }; libdnf = callPackage ../tools/package-management/libdnf { }; libdnf = callPackage ../tools/package-management/libdnf { python = python3; }; libdovi = callPackage ../development/libraries/libdovi { };
pkgs/top-level/python-packages.nix +7 −0 Original line number Diff line number Diff line Loading @@ -6139,6 +6139,13 @@ self: super: with self; { libcst = callPackage ../development/python-modules/libcst { }; libdnf = lib.pipe pkgs.libdnf [ toPythonModule (p: p.overrideAttrs (super: { meta = super.meta // { outputsToInstall = [ "py" ]; }; })) (p: p.override { inherit python; }) (p: p.py) ]; libevdev = callPackage ../development/python-modules/libevdev { }; libfdt = toPythonModule (pkgs.dtc.override { Loading