aboutsummaryrefslogtreecommitdiff
(use-modules (gnu packages commencement)
             (guix gexp))

(define hello-gexp
  (with-imported-modules '((guix build utils))
    #~(begin
	(use-modules (guix build utils))

	(set-path-environment-variable "PATH"
				       '("bin")
				       (list #$gcc-toolchain))
	(set-path-environment-variable "C_INCLUDE_PATH"
				       '("include")
				       (list #$gcc-toolchain))
	(set-path-environment-variable "LIBRARY_PATH"
				       '("lib")
				       (list #$gcc-toolchain))
	(invoke "gcc" #$(local-file "hello.c")
		"-o" #$output))))

(computed-file "hello" hello-gexp)