From 047ef313827892b95ca6fce50ffe3de4c68e3595 Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Sun, 22 Sep 2024 16:22:42 -0300 Subject: [PATCH] packages: package-management: Add current-system-guix procedure --- radix/packages/package-management.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 radix/packages/package-management.scm diff --git a/radix/packages/package-management.scm b/radix/packages/package-management.scm new file mode 100644 index 0000000..c7ec85c --- /dev/null +++ b/radix/packages/package-management.scm @@ -0,0 +1,16 @@ +(define-module (radix packages package-management) + #:use-module (gnu packages package-management) + #:use-module (guix build-system trivial) + #:use-module (guix gexp) + #:use-module (guix packages)) + +(define-public (current-system-guix) + (let* ((current-system-guix + (readlink "/run/current-system/profile/bin/guix")) + (current-guix-profile + (dirname (dirname current-system-guix)))) + (package/inherit guix + (build-system trivial-build-system) + (arguments (list #:builder + #~(symlink #$current-guix-profile + #$output))))))