aboutsummaryrefslogtreecommitdiff
path: root/etc/time-travel-manifest.scm
blob: ab890dd903816e4b49d75ec13499599ad77af080 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 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 file returns a manifest containing entries to build past Guix
;;; releases from the current Guix, as per 'guix time-machine'.

(use-modules (srfi srfi-9) (ice-9 match)
             (guix channels) (guix gexp)
             ((guix store) #:select (%store-monad))
             ((guix monads) #:select (mparameterize return))
             ((guix git) #:select (%repository-cache-directory))
             ((guix build utils) #:select (mkdir-p)))

;; Representation of the latest channels.  This type exists just so we can
;; refer to such records in a gexp.
(define-record-type <guix-instance>
  (guix-instance channels)
  guix-instance?
  (channels guix-instance-channels))

(define-gexp-compiler (guix-instance-compiler (instance <guix-instance>)
                                              system target)
  (match instance
    (($ <guix-instance> channels)
     ;; When this manifest is evaluated by Cuirass, make sure it does not
     ;; fiddle with the cached checkout that Cuirass is also using since
     ;; concurrent accesses are unsafe.
     (mparameterize %store-monad ((%repository-cache-directory
                                   (string-append (%repository-cache-directory)
                                                  "/time-travel/" system)))
       (return (mkdir-p (%repository-cache-directory)))
       (latest-channel-derivation channels)))))

(define (guix-instance->manifest-entry instance)
  "Return a manifest entry for INSTANCE."
  (define (shorten commit)
    (string-take commit 7))

  (manifest-entry
    (name "guix")
    (version (string-join (map (compose shorten channel-commit)
                               (guix-instance-channels instance))
                          "-"))
    (item instance)))

(define (commit->guix-instance commit)
  "Return a Guix instance for COMMIT."
  (guix-instance (list (channel
                        (inherit %default-guix-channel)
                        (commit commit)))))

(define %release-commits
  ;; Release commits: the list of version/commit pairs.
  '(("1.3.0" . "a0178d34f582b50e9bdbb0403943129ae5b560ff")
    ("1.2.0" . "a099685659b4bfa6b3218f84953cbb7ff9e88063")
    ("1.1.0" . "d62c9b2671be55ae0305bebfda17b595f33797f2")
    ("1.0.1" . "d68de958b60426798ed62797ff7c96c327a672ac")
    ("1.0.0" . "6298c3ffd9654d3231a6f25390b056483e8f407c")
    ("0.16.0" . "4a0b87f0ec5b6c2dcf82b372dd20ca7ea6acdd9c")))

(manifest
 (map (match-lambda
        ((version . commit)
         (let ((entry (guix-instance->manifest-entry
                       (commit->guix-instance commit))))
           (manifest-entry
             (inherit entry)
             (version version)))))
      %release-commits))
/guix/commit/?id=2dd97bd8c5409c20611cc55c680f36a28048f38e'>gnu: go-github-com-refraction-networking-utls: Move to (gnu packages golang-c......Sharlatan Hellseher 2024-01-28gnu: go-github-com-marten-seemann-chacha20: Move to (gnu packages golang-cryp......Sharlatan Hellseher 2024-01-28gnu: go-github-com-aead-chacha20: Move to (gnu packages golang-crypto)....Sharlatan Hellseher 2024-01-28gnu: go-github-com-libp2p-go-libp2p-peer: Move to (gnu packages golang-crypto)....Sharlatan Hellseher 2024-01-28gnu: go-github-com-shadowsocks-go-shadowsocks2: Move to (gnu packages golang-......Sharlatan Hellseher 2024-01-28gnu: go-github-com-libp2p-go-libp2p-crypto: Move to (gnu packages golang-cryp......Sharlatan Hellseher 2024-01-28gnu: go-github-com-riobard-go-bloom: Move to (gnu packages golang-crypto)....Sharlatan Hellseher 2024-01-28gnu: go-github-com-multiformats-go-multihash: Move to (gnu packages golang-cr......Sharlatan Hellseher 2024-01-28gnu: go-github-com-pquerna-cachecontrol: Move to (gnu packages golang-web)....Sharlatan Hellseher 2024-01-28gnu: Add (gnu packages golang-crypto) module....Sharlatan Hellseher 2024-01-28gnu: python-pyamg: Regenerate bundled files....Sharlatan Hellseher 2024-01-28gnu: Add python-cppheaderparser....Sharlatan Hellseher 2024-01-28gnu: python-trimesh: Enable tests....Sharlatan Hellseher 2024-01-28gnu: python-trimesh: Update to 4.0.10....Sharlatan Hellseher 2024-01-28gnu: openorienteering-mapper: Remove input labels....Sharlatan Hellseher 2024-01-28gnu: python-haversine: Simplify package....Sharlatan Hellseher 2024-01-28gnu: python-pyshp: Simplify package....Sharlatan Hellseher 2024-01-28gnu: Add python-ogr2osm....Patrick Noll 2024-01-28gnu: python-osmnx: Reformat with guix style....Troy Figiel 2024-01-28gnu: python-osmnx: Update to 1.8.1....Troy Figiel 2024-01-28gnu: fish: Update to 3.7.0....Rostislav Svoboda 2024-01-28gnu: dynaconf: Update to 3.2.4....Giacomo Leidi 2024-01-28services: shepherd: Add respawn-limit and respawn-delay....Attila Lendvai 2024-01-28doc: Add index entries for “dot files” and “Stow”....Ludovic Courtès 2024-01-28home: Add home-dotfiles-service....Giacomo Leidi 2024-01-28home: services: Add missing import....Ludovic Courtès