From ef287ed31632322367652f0501db16964784acec Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Mon, 30 Dec 2024 08:59:57 +0100 Subject: [PATCH] createrepo_c: 0.17.2 -> 1.2.0 --- .../fix-bash-completion-path.patch | 11 --------- .../fix-python-install-path.patch | 11 --------- pkgs/by-name/cr/createrepo_c/package.nix | 23 +++++-------------- 3 files changed, 6 insertions(+), 39 deletions(-) delete mode 100644 pkgs/by-name/cr/createrepo_c/fix-bash-completion-path.patch delete mode 100644 pkgs/by-name/cr/createrepo_c/fix-python-install-path.patch diff --git a/pkgs/by-name/cr/createrepo_c/fix-bash-completion-path.patch b/pkgs/by-name/cr/createrepo_c/fix-bash-completion-path.patch deleted file mode 100644 index 2539ec5d338d..000000000000 --- a/pkgs/by-name/cr/createrepo_c/fix-bash-completion-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -117,7 +117,7 @@ OPTION(ENABLE_BASHCOMP "Install Bash autocompletions?" ON) - IF (ENABLE_BASHCOMP) - pkg_check_modules(BASHCOMP bash-completion) - IF (BASHCOMP_FOUND) -- execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion OUTPUT_VARIABLE BASHCOMP_DIR OUTPUT_STRIP_TRAILING_WHITESPACE) -+ SET(BASHCOMP_DIR "@BASHCOMP_DIR@") - message("Bash completion directory: ${BASHCOMP_DIR}") - INSTALL(FILES createrepo_c.bash DESTINATION ${BASHCOMP_DIR} RENAME createrepo_c) - INSTALL(CODE " diff --git a/pkgs/by-name/cr/createrepo_c/fix-python-install-path.patch b/pkgs/by-name/cr/createrepo_c/fix-python-install-path.patch deleted file mode 100644 index b8739622e3c0..000000000000 --- a/pkgs/by-name/cr/createrepo_c/fix-python-install-path.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/python/CMakeLists.txt -+++ b/src/python/CMakeLists.txt -@@ -14,7 +14,7 @@ if (NOT SKBUILD) - FIND_PACKAGE(PythonLibs 3 REQUIRED) - endif (NOT SKBUILD) - --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+SET(PYTHON_INSTALL_DIR "@PYTHON_INSTALL_DIR@") - INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) - - MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") diff --git a/pkgs/by-name/cr/createrepo_c/package.nix b/pkgs/by-name/cr/createrepo_c/package.nix index 553c91b8fff3..0f96450cf6e0 100644 --- a/pkgs/by-name/cr/createrepo_c/package.nix +++ b/pkgs/by-name/cr/createrepo_c/package.nix @@ -5,7 +5,6 @@ cmake, pkg-config, bzip2, - expat, glib, curl, libxml2, @@ -15,7 +14,6 @@ sqlite, file, xz, - pcre, bash-completion, zstd, zchunk, @@ -24,38 +22,31 @@ stdenv.mkDerivation rec { pname = "createrepo_c"; - version = "0.17.2"; + version = "1.2.0"; src = fetchFromGitHub { owner = "rpm-software-management"; repo = "createrepo_c"; - rev = version; - sha256 = "sha256-rcrJjcWj+cTAE3k11Ynr7CQCOWD+rb60lcar0G2w06A="; + tag = version; + hash = "sha256-IWn1in1AMN4brekerj+zu1OjTl+PE7fthU5+gcBzVU0="; }; - patches = [ - # Use the output directory to install the bash completions. - ./fix-bash-completion-path.patch - # Use the output directory to install the python modules. - ./fix-python-install-path.patch - ]; - postPatch = '' substituteInPlace CMakeLists.txt \ - --replace '@BASHCOMP_DIR@' "$out/share/bash-completion/completions" + --replace-fail 'execute_process(COMMAND ''${PKG_CONFIG_EXECUTABLE} --variable=completionsdir bash-completion OUTPUT_VARIABLE BASHCOMP_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)' "SET(BASHCOMP_DIR \"$out/share/bash-completion/completions\")" substituteInPlace src/python/CMakeLists.txt \ - --replace "@PYTHON_INSTALL_DIR@" "$out/${python3.sitePackages}" + --replace-fail "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 \"$out/${python3.sitePackages}\")" ''; nativeBuildInputs = [ cmake pkg-config rpm + bash-completion ]; buildInputs = [ bzip2 - expat glib curl libxml2 @@ -64,8 +55,6 @@ stdenv.mkDerivation rec { sqlite file xz - pcre - bash-completion zstd zchunk libmodulemd