all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 34929@debbugs.gnu.org
Subject: [bug#34929] [PATCH 10/12] gnu: Add loadkeys-static.
Date: Thu, 21 Mar 2019 00:04:33 +0100	[thread overview]
Message-ID: <20190320230435.25458-10-ludo@gnu.org> (raw)
In-Reply-To: <20190320230435.25458-1-ludo@gnu.org>

* gnu/packages/linux.scm (loadkeys-static): New variable.
---
 gnu/packages/linux.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index e9d8ea45c1..de1a9ba24e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1995,6 +1995,43 @@ for systems using the Linux kernel.  This includes commands such as
 'loadkeys', 'setfont', 'kbdinfo', and 'chvt'.")
     (license license:gpl2+)))
 
+(define-public loadkeys-static
+  (package
+    (inherit kbd)
+    (name "loadkeys-static")
+    (arguments
+     (substitute-keyword-arguments (package-arguments kbd)
+       ((#:configure-flags flags ''())
+        `(append '("LDFLAGS=-static" "--disable-shared" "--disable-nls"
+                   "--disable-vlock"              ;so we don't need libpam
+                   "--disable-libkeymap")
+                 ,flags))
+       ((#:make-flags flags ''())
+        `(cons "LDFLAGS=-all-static" ,flags))
+       ((#:phases phases '%standard-phases)
+        `(modify-phases ,phases
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 ;; The binary keeps references to gzip, among other things,
+                 ;; which we don't need in the initrd, so strip references.
+                 (remove-store-references "src/loadkeys")
+
+                 (install-file "src/loadkeys"
+                               (string-append out "/bin"))
+                 #t)))
+           (delete 'post-install)))
+       ((#:strip-flags _ '())
+        ''("--strip-all"))
+       ((#:allowed-references _ '())
+        '())))
+
+    (synopsis "Statically-linked @command{loadkeys} program")
+
+    ;; This package is meant to be used internally in the initrd so don't
+    ;; expose it.
+    (properties '((hidden? . #t)))))
+
 (define-public inotify-tools
   (package
     (name "inotify-tools")
-- 
2.21.0

  parent reply	other threads:[~2019-03-20 23:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 22:32 [bug#34929] [PATCH 00/12] Provide uniform keyboard layout configuration Ludovic Courtès
2019-03-20 23:04 ` [bug#34929] [PATCH 01/12] bootloader: Remove unused 'additional-configuration' field Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 02/12] bootloader: Reindent record type definition Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 03/12] Add (gnu system keyboard) Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 04/12] bootloader: Add a 'keyboard-layout' field Ludovic Courtès
2019-03-24  9:31     ` Julien Lepiller
2019-03-24 21:18       ` Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 05/12] services: xorg: Remove unused #:guile parameter Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 06/12] services: xorg: Define and <xorg-configuration> record type Ludovic Courtès
2019-03-24  9:46     ` Julien Lepiller
2019-03-24 21:18       ` Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 07/12] services: sddm, slim, gdm: Take an <xorg-configuration> record Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 08/12] services: xorg: Add a 'keyboard-layout' field in <xorg-configuration> Ludovic Courtès
2019-03-24  9:50     ` Julien Lepiller
2019-03-20 23:04   ` [bug#34929] [PATCH 09/12] vm: 'virtualized-operating-system' inherits from the user's bootloader config Ludovic Courtès
2019-03-20 23:04   ` Ludovic Courtès [this message]
2019-03-20 23:04   ` [bug#34929] [PATCH 11/12] system: Initialize console keyboard layout in the initrd Ludovic Courtès
2019-03-20 23:04   ` [bug#34929] [PATCH 12/12] doc: Document keyboard layout Ludovic Courtès
2019-03-24 10:03 ` [bug#34929] [PATCH 00/12] Provide uniform keyboard layout configuration Julien Lepiller
2019-03-24 22:14   ` bug#34929: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190320230435.25458-10-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=34929@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.