packages: package-management: Add current-system-guix procedure

main
Luis Guilherme Coelho 2024-09-22 16:22:42 -03:00
parent 8091b190aa
commit 047ef31382
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 16 additions and 0 deletions

View File

@ -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))))))