[PATCH] gnu: Add pacman.

  • Open
  • quality assurance status badge
Details
One participant
  • Justin Veilleux
Owner
unassigned
Submitted by
Justin Veilleux
Severity
normal
J
J
Justin Veilleux wrote on 24 Dec 2023 03:16
(address . guix-patches@gnu.org)
87o7eg73ag.fsf@cock.li
This is a patch to add arch linux's pacman package manager to guix. I
was experimenting with having pacman as a package manager for regular
FHS programs (on a guix system host), but there were too many dynamic
library problems.

In any case, the package manager itself works perfectly.

Cheers.
From 5d3be174c4e7fbd1db05f73147e1da2f17b6deb2 Mon Sep 17 00:00:00 2001
Message-ID: <5d3be174c4e7fbd1db05f73147e1da2f17b6deb2.1703383755.git.terramorpha@cock.li>
From: terramorpha <terramorpha@cock.li>
Date: Sat, 23 Dec 2023 21:07:55 -0500
Subject: [PATCH] gnu: Add pacman.

* gnu/packages/package-management.scm (pacman): New variable.

Change-Id: I2cedb84fc648ee5c4c07bee8bfb516861ffc1c22
---
gnu/packages/package-management.scm | 46 ++++++++++++++++++
.../patches/pacman-fix-meson-build.diff | 48 +++++++++++++++++++
2 files changed, 94 insertions(+)
create mode 100644 gnu/packages/patches/pacman-fix-meson-build.diff

Toggle diff (126 lines)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 97ea41df66..4d9b5f666f 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2022, 2023 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2023 jgart <jgart@dismail.de>
;;; Copyright © 2023 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2023 Justin Veilleux <terramorpha@cock.li>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66,6 +67,7 @@ (define-module (gnu packages package-management)
#:use-module (gnu packages dejagnu)
#:use-module (gnu packages dbm)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages file)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages flex)
@@ -2326,3 +2328,47 @@ (define-public modules
used on high-performance clusters to dynamically add and remove paths
to specific versions of applications.")
(license license:gpl2+)))
+
+(define-public pacman
+ (package
+ (name "pacman")
+ (version "6.0.2")
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://gitlab.archlinux.org/pacman/pacman.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0yxh6kljy19bc4wiphss3jq2nv7h3hw6vnrwbway5kbyqhbahx7p"))
+ (patches
+ (list
+ (search-patch "pacman-fix-meson-build.diff")))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:tests? #f))
+(inputs
+ (list
+ curl
+ libarchive
+ gpgme
+ openssl))
+ (native-inputs
+ (list
+ asciidoc
+ perl
+ python-3
+ gnu-gettext
+ coreutils
+ pkg-config))
+ (home-page "https://archlinux.org/pacman/")
+ (synopsis "Simple library-based package manager")
+ (description
+ "pacman is a utility which manages software packages in Linux. It uses
+simple compressed files as a package format, and maintains a text-based
+package database (more of a hierarchy), just in case some hand tweaking is
+necessary.")
+ (license license:gpl2)))
diff --git a/gnu/packages/patches/pacman-fix-meson-build.diff b/gnu/packages/patches/pacman-fix-meson-build.diff
new file mode 100644
index 0000000000..47ce74739e
--- /dev/null
+++ b/gnu/packages/patches/pacman-fix-meson-build.diff
@@ -0,0 +1,48 @@
+diff --git a/doc/meson.build b/doc/meson.build
+index 5a8eb3a4..74ccf53e 100644
+--- a/doc/meson.build
++++ b/doc/meson.build
+@@ -100,7 +100,7 @@ foreach page: manpages + sitepages
+ endforeach
+
+ run_target('html',
+- command : ['/bin/true'],
++ command : ['true'],
+ depends : html_targets)
+
+ custom_target(
+diff --git a/meson.build b/meson.build
+index 37523b01..6c568020 100644
+--- a/meson.build
++++ b/meson.build
+@@ -396,13 +396,13 @@ configure_file(
+ input : 'etc/makepkg.conf.in',
+ output : 'makepkg.conf',
+ configuration : substs,
+- install_dir : SYSCONFDIR)
++ install_dir : join_paths(PREFIX, 'etc'))
+
+ configure_file(
+ input : 'etc/pacman.conf.in',
+ output : 'pacman.conf',
+ configuration : substs,
+- install_dir : SYSCONFDIR)
++ install_dir : join_paths(PREFIX, 'etc'))
+
+ install_data(
+ 'proto/PKGBUILD-split.proto',
+@@ -411,14 +411,6 @@ install_data(
+ 'proto/proto.install',
+ install_dir : join_paths(DATAROOTDIR, 'pacman'))
+
+-foreach path : [
+- join_paths(LOCALSTATEDIR, 'lib/pacman/'),
+- join_paths(LOCALSTATEDIR, 'cache/pacman/pkg/'),
+- join_paths(DATAROOTDIR, 'makepkg-template/'),
+- join_paths(DATAROOTDIR, 'libalpm/hooks/'),
+- ]
+- meson.add_install_script('sh', '-c', 'mkdir -p "$DESTDIR/@0@"'.format(path))
+-endforeach
+
+ TEST_ENV = environment()
+ TEST_ENV.set('PMTEST_SCRIPTLIB_DIR', join_paths(meson.source_root(), 'scripts/library/'))

base-commit: a8196632647b343f8e03c8f12fbdc0cc84ff90f6
--
2.41.0
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 68001@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68001
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch