aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2024 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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/>.

;; This manifest "ungrafts" all the currently grafted packages and returns
;; said packages and all their dependents.

(use-modules (guix diagnostics)
             (guix i18n)
             (guix packages)
             (guix profiles)
             (guix store)
             ((guix scripts build) #:select (dependents))
             ((gnu packages) #:select (all-packages))
             (srfi srfi-1))

(define (grafted-packages)
  (info (G_ "enumerating grafted packages...~%"))
  (let ((result (filter package-replacement (all-packages))))
    (info (G_ "found ~d grafted packages:~{ ~a~}~%")
          (length result) (map package-full-name result))
    result))

(define ungraft
  (package-mapping (lambda (p)
                     (or (package-replacement p) p))
                   #:deep? #t))

(manifest
 (with-store store
   (let ((grafted (grafted-packages)))
     (map (lambda (package)
            (manifest-entry
              (inherit (package->manifest-entry (ungraft package)))
              (name (string-append (package-name package) "-ungrafted"))))
          (dependents store grafted)))))
/td> 2024-10-28gnu: postgresql: Deprecate unsupported versions.Nicolas Graves Versions 10 and 11 are unsupported according to https://www.postgresql.org/support/versioning/ postgresql-10 also has a CVE. * doc/guix.texi: Change default value of postgresql-service-type's postgresql field. * gnu/packages/databases.scm (postresql-10, postgresql-11): Use define-deprecated/public to warn users. * gnu/services/databases.scm (postgresql-configuration): Change the default value of postgresql-configuration-postgresql. * gnu/tests/guix.scm (%guix-data-service-os): Change the default value of postgresql. Signed-off-by: Andreas Enge <andreas@enge.fr> Change-Id: Ie8744c8e1f246e9b45ff5e29d4e98214de3ca66a 2024-06-02Revert "services: home: Use pairs instead of lists."Andrew Tropin This reverts commit dbeef44f3c520816251bde74c1005915a637e1ef. Despite the more semantically correct data type, it doesn't follow the style of the most services and also breaks user-facing API. Change-Id: Ib4ef4e9cd2f53ac853a5b7c7c90e57c35c99a5ea 2024-06-02services: home: Use pairs instead of lists.Andrew Tropin * gnu/services/guix.scm: Use pairs instead of lists. * doc/guix.texi: Update accordingly. * gnu/tests/guix.scm: Update accordingly. Change-Id: I0b8d3fa5b214add89bdb84a11fa20d1b319435f0 2024-04-17services: Add the Guix Home service.Richard Sent This patch adds a Guix Home service, which allows for configuring/deploying an operating-system declaration with an associated home-environment. * gnu/services/guix.scm: Add guix-home-service and guix-home-shepherd-service * gnu/home/services/shepherd.scm: Don't attempt to launch user shepherd when the system shepherd runs guix-home-<user> * doc/guix.texi: Add documentation for guix-home-service * gnu/tests/guix.scm: Add a test to verify guix-home-service-type is able to activate a home environment Change-Id: Ifbcc0878d934aa4abe34bb2123b5081fb432aa8e Signed-off-by: Ludovic Courtès <ludo@gnu.org>