;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021, 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages rpm) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix build-system cmake) #:use-module (guix build-system meson) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages docbook) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages man) #:use-module (gnu packages package-management) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) #:use-module (gnu packages python) #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages xml)) (define-public drpm (package (name "drpm") (version "0.5.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/rpm-software-management/drpm") (commit version))
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu installer newt parameters)
  #:use-module (gnu installer proxy)
  #:use-module (gnu installer steps)
  #:use-module (gnu installer newt page)
  #:use-module (guix build syscalls)
  #:use-module (guix i18n)
  #:use-module (ice-9 match)
  #:export (run-parameters-page))

(define (run-proxy-page)
  (define proxy
    (run-input-page (G_ "Please enter the HTTP proxy URL. If you enter an \
empty string, proxy usage will be disabled.")
                    (G_ "HTTP proxy configuration")
                    #:allow-empty-input? #t))
  (if (string=? proxy "")
      (clear-http-proxy)
      (set-http-proxy proxy)))

(define (run-parameters-page keyboard-layout-selection)
  "Run a parameters page allowing to change the keyboard layout"
  (let* ((items
          (list
           (cons (G_ "Change keyboard layout") keyboard-layout-selection)
           (cons (G_ "Configure HTTP proxy") run-proxy-page)
           (cons (G_ "Reboot") reboot)))
         (result
          (run-listbox-selection-page
           #:info-text (G_ "Please choose one of the following parameters or \
press ‘Back’ to go back to the installation process.")
           #:title (G_ "Installation parameters")
           #:listbox-items items
           #:listbox-item->text car
           #:sort-listbox-items? #f
           #:listbox-height 6
           #:button-text (G_ "Back"))))
    (match result
      ((_ . proc)
       (proc))
      (_ #f))))
gtk-doc/stable help2man pkg-config python)) ;for 'site-packages' call (inputs (list gtk+ python-pygobject)) (propagated-inputs ;; glib and gobject are listed as 'Requires' in modulemd-2.0.pc. (list glib ;; yaml and rpm are listed as 'Requires.private' in modulemd-2.0.pc. libyaml rpm)) (home-page "https://github.com/fedora-modularity/libmodulemd") (synopsis "C library for manipulating module metadata files") (description "The libmodulemd API provides a number of convenience tools for interacting with repodata (that is, streams of YAML that contains information on multiple streams, default data and translations).") (license license:expat))) (define-public createrepo-c (package (name "createrepo-c") (version "0.20.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/rpm-software-management/createrepo_c") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 "07d89s6kknf79phzan3d2vy1rq64ih49qk2w51hsmfn73qins9wy")))) (build-system cmake-build-system) (arguments (list #:imported-modules `(,@%cmake-build-system-modules (guix build python-build-system)) #:modules '((guix build cmake-build-system) ((guix build python-build-system) #:prefix python:) (guix build utils)) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'fix-python-site-prefix (lambda* (#:key inputs outputs #:allow-other-keys) (substitute* "src/python/CMakeLists.txt" (("EXECUTE_PROCESS.*OUTPUT_VARIABLE PYTHON_INSTALL_DIR.*") (format #f "set (PYTHON_INSTALL_DIR ~a)~%" (python:site-packages inputs outputs)))))) (add-after 'unpack 'fix-bash-completion-prefix (lambda _ (substitute* "CMakeLists.txt" (("execute_process.*OUTPUT_VARIABLE BASHCOMP_DIR.*") (format #f "set (BASHCOMP_DIR ~a\ /share/bash-completion/completions)~%" #$output)))))))) (native-inputs (list bash-completion pkg-config python)) (inputs (list bzip2 curl drpm libmodulemd libxml2 openssl sqlite zchunk)) (home-page "https://rpm-software-management.github.io/createrepo_c/") (synopsis "C implementation of the createrepo tool") (description "This package provides the @command{createrepo} command, which can be used to create RPM repositories.") (license license:gpl2+)))