aboutsummaryrefslogtreecommitdiff
path: root/gnu/image.scm
blob: a60d83b175ba9e2110d68b545376f5649e01fce9 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
;;; 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 image)
  #:use-module (guix records)
  #:export (partition
            partition?
            partition-device
            partition-size
            partition-offset
            partition-file-system
            partition-file-system-options
            partition-label
            partition-uuid
            partition-flags
            partition-initializer

            image
            image-name
            image-format
            image-target
            image-size
            image-operating-system
            image-partitions
            image-compression?
            image-volatile-root?
            image-substitutable?

            image-type
            image-type?
            image-type-name
            image-type-constructor

            os->image))


;;;
;;; Partition record.
;;;

(define-record-type* <partition> partition make-partition
  partition?
  (device               partition-device (default #f))
  (size                 partition-size)
  (offset               partition-offset (default 0))
  (file-system          partition-file-system (default "ext4"))
  (file-system-options  partition-file-system-options
                        (default '()))
  (label                partition-label (default #f))
  (uuid                 partition-uuid (default #f))
  (flags                partition-flags (default '()))
  (initializer          partition-initializer (default #f)))


;;;
;;; Image record.
;;;

(define-record-type* <image>
  image make-image
  image?
  (name               image-name ;symbol
                      (default #f))
  (format             image-format) ;symbol
  (target             image-target
                      (default #f))
  (size               image-size  ;size in bytes as integer
                      (default 'guess))
  (operating-system   image-operating-system  ;<operating-system>
                      (default #f))
  (partitions         image-partitions ;list of <partition>
                      (default '()))
  (compression?       image-compression? ;boolean
                      (default #t))
  (volatile-root?     image-volatile-root? ;boolean
                      (default #t))
  (substitutable?     image-substitutable? ;boolean
                      (default #t)))


;;;
;;; Image type.
;;;

(define-record-type* <image-type>
  image-type make-image-type
  image-type?
  (name           image-type-name) ;symbol
  (constructor    image-type-constructor)) ;<operating-system> -> <image>


;;;
;;; Image creation.
;;;

(define* (os->image os #:key type)
  (let ((constructor (image-type-constructor type)))
    (constructor os)))
ols....* gnu/packages/opencl.scm (python-pytools): New variable. Ludovic Courtès 2019-11-15gnu: hwloc: Update to 2.1.0....* gnu/packages/mpi.scm (hwloc-2.0): Rename to... (hwloc-2): ... this. Update to 2.1.0 (hwloc-2.0): Define as deprecated. * gnu/packages/opencl.scm (pocl)[inputs]: Adjust accordingly. Ludovic Courtès 2019-10-31gnu: pocl: Update to 1.4....* gnu/packages/opencl.scm (pocl): Update to 1.4. [inputs]: Change from LLVM to LLVM-8. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Ivan Gankevich 2019-02-26gnu: beignet: Limit supported architectures....* gnu/packages/opencl.scm (beignet)[supported-systems]: New field. Efraim Flashner 2018-12-13gnu: Fix misplaced commas (unquotes)....* gnu/packages/java.scm (ant-bootstrap), gnu/packages/kde.scm (kdenlive), gnu/packages/lxqt.scm (lxqt-panel, lxqt-runner), gnu/packages/mpd.scm (ncmpc), gnu/packages/opencl.scm (beignet), gnu/packages/pdf.scm (zathura-pdf-mupdf), gnu/packages/video.scm (streamlink), gnu/packages/web-browsers.scm (luakit), gnu/packages/web.scm (perl-libwww), gnu/packages/wm.scm (ghc-xmonad-contrib): Fix misplaced commas (unquotes). Mark H Weaver 2018-09-29gnu: pocl: Update to 1.2....* gnu/packages/opencl.scm (pocl): Update to 1.2. Signed-off-by: Leo Famulari <leo@famulari.name> fis trivial 2018-08-30gnu: Don't use unstable tarballs in (packages opencl)....* gnu/packages/opencl.scm (opencl-clhpp, clinfo, beignet, pocl) [source]: Use GIT-FETCH and GIT-FILE-NAME. (pocl)[arguments]: Remove ‘remove-headers’ phase. (make-opencl-headers)[source]: Use GIT-FILE-NAME. Tobias Geerinckx-Rice 2018-07-03gnu: Add pocl....* gnu/packages/opencl.scm (pocl): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Fis Trivial 2018-06-26gnu: Add beignet....* gnu/packages/opencl.scm (beignet): New variable. * gnu/packages/patches/beignet-correct-file-names.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Fis Trivial 2018-06-26gnu: Add clinfo....* gnu/packages/opencl.scm (clinfo): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Fis Trivial 2018-06-26gnu: Add ocl-icd....* gnu/packages/opencl.scm (ocl-icd): New variable. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Fis Trivial 2018-06-25gnu: Add opencl-clhpp....* gnu/packages/opencl.scm (opencl-clhpp): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Fis Trivial 2018-06-25gnu: Add opencl-headers....* gnu/packages/opencl.scm: New file. (make-opencl-headers): New function. (opencl-headers-2.2, opencl-headers-2.1, opencl-headers-2.0, opencl-headers-1.2, opencl-headers-1.1, opencl-headers-1.0, opencl-headers): New variables. * gnu/local.mk: Add the new file. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Fis Trivial