From 61c681cbe0b29b31587e71a905f34f0f12757a13 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Sun, 31 Jan 2021 11:06:46 +0100 Subject: [PATCH 2/2] DRAFT: add hook example TODO: should be located elsewere. --- hook.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 hook.scm diff --git a/hook.scm b/hook.scm new file mode 100644 index 0000000000..7b81c8d761 --- /dev/null +++ b/hook.scm @@ -0,0 +1,27 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; 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 . +(use-modules (guix scripts publish)) + +(list + (narinfo-hook + (lambda (pathinfo . rest) + `(("LuckyNumber" . ,(random 1000)) + ("Stuff" . ,(object->string pathinfo))))) + (narinfo-hook + (lambda (pathinfo . rest) + `(("Cool" . "Beans"))))) -- 2.30.0