From 9c5fc83d9d5a162fb3d4662c3e66cd77918159da Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Wed, 9 Jan 2019 18:40:42 +0100 Subject: [PATCH 1/7] gnu: Add linux-libre-fill-version linux-libre-fill-version adds a patch version to the version if it is missing. * gnu/packages/linux.scm (linux-libre-fill-version): New function --- gnu/packages/linux.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d8f37e705..aa18fba10 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -32,6 +32,7 @@ ;;; Copyright © 2018 Manuel Graf ;;; Copyright © 2018 Pierre Langlois ;;; Copyright © 2018 Vasile Dumitrascu +;;; Copyright © 2019 Tim Gesthuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -124,7 +125,8 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-2) #:use-module (srfi srfi-26) - #:use-module (ice-9 match)) + #:use-module (ice-9 match) + #:use-module (ice-9 regex)) (define-public (system->linux-architecture arch) "Return the Linux architecture name for ARCH, a Guix system name such as @@ -278,6 +280,14 @@ for ARCH and optionally VARIANT, or #f if there is no such configuration." options) "\n")) +(define-public (linux-libre-fill-version version) + "If the patch number of the linux-libre version is 0 it is left out. Add the +patch number to the version if it is missing." + (if (string-match "^[0-9]+\\.[0-9]+$" + version) + (string-append version ".0") + version)) + (define* (make-linux-libre version hash supported-systems #:key ;; A function that takes an arch and a variant. -- 2.20.1