mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: Add heads-dev-cpio.
* gnu/packages/heads.scm (heads-dev-cpio): New variable.
This commit is contained in:
parent
8e7c98963f
commit
d82f227291
1 changed files with 34 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
||||||
(define-module (gnu packages heads)
|
(define-module (gnu packages heads)
|
||||||
#:use-module ((guix licenses) #:prefix license:)
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix build-system trivial)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
|
@ -161,3 +162,36 @@ done
|
||||||
(synopsis "Musl-cross gcc 5 toolchain")
|
(synopsis "Musl-cross gcc 5 toolchain")
|
||||||
(description "Musl-cross toolchain: binutils, gcc 5 and musl.")
|
(description "Musl-cross toolchain: binutils, gcc 5 and musl.")
|
||||||
(license license:isc))))
|
(license license:isc))))
|
||||||
|
|
||||||
|
;; This package provides a "dev.cpio" file usable as a base for booting Heads.
|
||||||
|
(define-public heads-dev-cpio
|
||||||
|
(package
|
||||||
|
(name "heads-dev-cpio")
|
||||||
|
(version "0.1")
|
||||||
|
(source #f)
|
||||||
|
(build-system trivial-build-system)
|
||||||
|
(arguments
|
||||||
|
`(#:modules ((guix build utils)
|
||||||
|
(guix cpio))
|
||||||
|
#:builder (begin
|
||||||
|
(use-modules (guix build utils)
|
||||||
|
(guix cpio)
|
||||||
|
(srfi srfi-26))
|
||||||
|
(mkdir-p "dev") ; input directory.
|
||||||
|
(let* ((out (assoc-ref %outputs "out"))
|
||||||
|
(libexec (string-append out "/libexec")))
|
||||||
|
(mkdir-p libexec)
|
||||||
|
(call-with-output-file (string-append libexec "/dev.cpio")
|
||||||
|
(lambda (port)
|
||||||
|
(write-cpio-archive '("dev" "dev/console") port
|
||||||
|
#:file->header
|
||||||
|
(lambda (name)
|
||||||
|
(if (string=? "dev/console" name)
|
||||||
|
(special-file->cpio-header* name 'char-special 5 1 #o600)
|
||||||
|
(file->cpio-header* name))))))
|
||||||
|
#t))))
|
||||||
|
(synopsis "@file{dev.cpio} for Heads")
|
||||||
|
(description "This package provides a @file{dev.cpio} file usable as a
|
||||||
|
base for heads' initrd.")
|
||||||
|
(home-page "http://osresearch.net/")
|
||||||
|
(license license:bsd-2)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue