--- kmod-hello-world.scm ;; guix build -f kmod-hello-world.scm (use-modules (guix build-system linux-module) (guix gexp) ((guix licenses) #:prefix license:) (guix packages)) (package (name "kmod-hello-world") (version "1.0.0") (source (local-file "hello" #:recursive? #t)) (build-system linux-module-build-system) (arguments (list #:tests? #f)) (synopsis "") (description "") (home-page "") (license license:gpl2+)) --- hello/Kbuild CFLAGS_MODULE := -Wall -Werror obj-m := hello_world.o --- hello/hello_world.c #include #include #include MODULE_LICENSE("GPL"); MODULE_AUTHOR("Me"); MODULE_DESCRIPTION("Hello world"); MODULE_VERSION("1.0.0"); static int __init hello_world_init(void) { printk(KERN_INFO "hello_world: init\n"); return 0; } static void __exit hello_world_exit(void) { printk(KERN_INFO "hello_world: exit\n"); } module_init(hello_world_init); module_exit(hello_world_exit);