Configure repo as channel, because hell yeah
This commit is contained in:
parent
7641082c4f
commit
f63116baad
|
@ -0,0 +1,8 @@
|
||||||
|
(authorizations
|
||||||
|
(version 0)
|
||||||
|
(("1086 326D E207 068C 1C02 5129 A64F 4134 5C74 00AF"
|
||||||
|
(name "takev"))))
|
||||||
|
|
||||||
|
;;; Local Variables:
|
||||||
|
;;; mode: scheme
|
||||||
|
;;; End:
|
|
@ -0,0 +1,8 @@
|
||||||
|
(channel
|
||||||
|
(version 0)
|
||||||
|
(directory ".guix/modules"))
|
||||||
|
|
||||||
|
|
||||||
|
;;; Local Variables:
|
||||||
|
;;; mode: scheme
|
||||||
|
;;; End:
|
|
@ -0,0 +1,83 @@
|
||||||
|
(define-module (guix-cantrips-package)
|
||||||
|
#:use-module (guix)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:)
|
||||||
|
#:use-module (guix download)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages autotools)
|
||||||
|
#:use-module (gnu packages guile)
|
||||||
|
#:use-module (gnu packages guile-xyz)
|
||||||
|
#:use-module (gnu packages package-management)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
|
#:use-module (gnu packages texinfo))
|
||||||
|
|
||||||
|
(define vcs-file?
|
||||||
|
(or (git-predicate (current-source-directory))
|
||||||
|
(const #t)))
|
||||||
|
|
||||||
|
(define-public guix-cantrips
|
||||||
|
(package
|
||||||
|
(name "guix-cantrips")
|
||||||
|
(version "0.1-src")
|
||||||
|
(source (local-file "../.." "guix-cantrips" #:recursive? #t))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:make-flags
|
||||||
|
#~(list "GUILE_AUTO_COMPILE=0")
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(delete 'strip)
|
||||||
|
(add-before 'configure 'hall-build
|
||||||
|
(lambda _
|
||||||
|
(system* "hall" "build" "-x")))
|
||||||
|
(add-after 'hall-build 'autoreconf
|
||||||
|
(lambda _
|
||||||
|
(system* "autoreconf" "-vif")))
|
||||||
|
(add-after 'install 'hall-wrap-binaries
|
||||||
|
(lambda _
|
||||||
|
(use-modules (ice-9 ftw))
|
||||||
|
(define (compiled-dir out version)
|
||||||
|
(string-append out "/lib/guile/"
|
||||||
|
version
|
||||||
|
"/site-ccache"))
|
||||||
|
(define (uncompiled-dir out version)
|
||||||
|
(string-append out
|
||||||
|
"/share/guile/site"
|
||||||
|
(if (string-null? version) ""
|
||||||
|
"/")
|
||||||
|
version))
|
||||||
|
(define (dep-path env modules path)
|
||||||
|
(list env ":"
|
||||||
|
'prefix
|
||||||
|
(cons modules
|
||||||
|
(map (lambda (input)
|
||||||
|
(string-append input path))
|
||||||
|
(list #$guile-config
|
||||||
|
#$guile-lib
|
||||||
|
#$guile-simple-iterators)))))
|
||||||
|
(define bin (string-append #$output "/bin/"))
|
||||||
|
(define site (uncompiled-dir #$output ""))
|
||||||
|
(define version (caddr (scandir site)))
|
||||||
|
(wrap-program (string-append bin "guix-cantrips")
|
||||||
|
(dep-path
|
||||||
|
"GUILE_LOAD_PATH"
|
||||||
|
(uncompiled-dir #$output version)
|
||||||
|
(uncompiled-dir "" version))
|
||||||
|
(dep-path
|
||||||
|
"GUILE_LOAD_COMPILED_PATH"
|
||||||
|
(compiled-dir #$output version)
|
||||||
|
(compiled-dir "" version))))))))
|
||||||
|
(native-inputs (list autoconf automake pkg-config texinfo guile-hall))
|
||||||
|
(inputs (list guile-3.0))
|
||||||
|
(propagated-inputs (list guix
|
||||||
|
guile-config))
|
||||||
|
(synopsis "")
|
||||||
|
(description "")
|
||||||
|
(home-page "")
|
||||||
|
(license license:gpl3+)))
|
||||||
|
|
||||||
|
guix-cantrips
|
||||||
|
|
80
guix.scm
80
guix.scm
|
@ -1,80 +0,0 @@
|
||||||
(use-modules
|
|
||||||
(guix)
|
|
||||||
(guix git-download)
|
|
||||||
(guix packages)
|
|
||||||
((guix licenses) #:prefix license:)
|
|
||||||
(guix download)
|
|
||||||
(guix build-system gnu)
|
|
||||||
(gnu packages)
|
|
||||||
(gnu packages autotools)
|
|
||||||
(gnu packages guile)
|
|
||||||
(gnu packages guile-xyz)
|
|
||||||
(gnu packages package-management)
|
|
||||||
(gnu packages pkg-config)
|
|
||||||
(gnu packages texinfo))
|
|
||||||
|
|
||||||
(define vcs-file?
|
|
||||||
(or (git-predicate (current-source-directory))
|
|
||||||
(const #t)))
|
|
||||||
|
|
||||||
(package
|
|
||||||
(name "guix-cantrips")
|
|
||||||
(version "0.1-src")
|
|
||||||
(source (local-file (dirname (current-filename)) #:recursive? #t
|
|
||||||
#:select? vcs-file?))
|
|
||||||
(build-system gnu-build-system)
|
|
||||||
(arguments
|
|
||||||
(list
|
|
||||||
#:make-flags
|
|
||||||
#~(list "GUILE_AUTO_COMPILE=0")
|
|
||||||
#:phases
|
|
||||||
#~(modify-phases %standard-phases
|
|
||||||
(delete 'strip)
|
|
||||||
(add-before 'configure 'hall-build
|
|
||||||
(lambda _
|
|
||||||
(system* "hall" "build" "-x")))
|
|
||||||
(add-after 'hall-build 'autoreconf
|
|
||||||
(lambda _
|
|
||||||
(system* "autoreconf" "-vif")))
|
|
||||||
(add-after 'install 'hall-wrap-binaries
|
|
||||||
(lambda _
|
|
||||||
(use-modules (ice-9 ftw))
|
|
||||||
(define (compiled-dir out version)
|
|
||||||
(string-append out "/lib/guile/"
|
|
||||||
version
|
|
||||||
"/site-ccache"))
|
|
||||||
(define (uncompiled-dir out version)
|
|
||||||
(string-append out
|
|
||||||
"/share/guile/site"
|
|
||||||
(if (string-null? version) ""
|
|
||||||
"/")
|
|
||||||
version))
|
|
||||||
(define (dep-path env modules path)
|
|
||||||
(list env ":"
|
|
||||||
'prefix
|
|
||||||
(cons modules
|
|
||||||
(map (lambda (input)
|
|
||||||
(string-append input path))
|
|
||||||
(list #$guile-config
|
|
||||||
#$guile-lib
|
|
||||||
#$guile-simple-iterators)))))
|
|
||||||
(define bin (string-append #$output "/bin/"))
|
|
||||||
(define site (uncompiled-dir #$output ""))
|
|
||||||
(define version (caddr (scandir site)))
|
|
||||||
(wrap-program (string-append bin "guix-cantrips")
|
|
||||||
(dep-path
|
|
||||||
"GUILE_LOAD_PATH"
|
|
||||||
(uncompiled-dir #$output version)
|
|
||||||
(uncompiled-dir "" version))
|
|
||||||
(dep-path
|
|
||||||
"GUILE_LOAD_COMPILED_PATH"
|
|
||||||
(compiled-dir #$output version)
|
|
||||||
(compiled-dir "" version))))))))
|
|
||||||
(native-inputs (list autoconf automake pkg-config texinfo guile-hall))
|
|
||||||
(inputs (list guile-3.0))
|
|
||||||
(propagated-inputs (list guix))
|
|
||||||
(synopsis "")
|
|
||||||
(description "")
|
|
||||||
(home-page "")
|
|
||||||
(license license:gpl3+))
|
|
||||||
|
|
22
hall.scm
22
hall.scm
|
@ -5,12 +5,12 @@
|
||||||
(author "TakeV")
|
(author "TakeV")
|
||||||
(copyright (2023))
|
(copyright (2023))
|
||||||
(synopsis "")
|
(synopsis "")
|
||||||
(description "Utilities to make programming with guix feel like magic.")
|
(description
|
||||||
|
"Utilities to make programming with guix feel like magic.")
|
||||||
(home-page "")
|
(home-page "")
|
||||||
(license gpl3+)
|
(license gpl3+)
|
||||||
(dependencies
|
(dependencies
|
||||||
`(("guix" ,guix)
|
`(("guile-git" ,guile-git)
|
||||||
("guile-git" ,guile-git)
|
|
||||||
("guile-config" ,guile-config)))
|
("guile-config" ,guile-config)))
|
||||||
(skip ())
|
(skip ())
|
||||||
(files (libraries
|
(files (libraries
|
||||||
|
@ -27,7 +27,17 @@
|
||||||
(symlink "README" "README.org")
|
(symlink "README" "README.org")
|
||||||
(org-file "README")))
|
(org-file "README")))
|
||||||
(infrastructure
|
(infrastructure
|
||||||
((scheme-file "hall")
|
((text-file ".guix-authorizations")
|
||||||
|
(text-file ".guix-channel")
|
||||||
|
(symlink
|
||||||
|
"guix.scm"
|
||||||
|
".guix/modules/guix-cantrips-package.scm")
|
||||||
|
(directory "scripts" ((in-file "guix-cantrips")))
|
||||||
|
(directory
|
||||||
|
".guix"
|
||||||
|
((directory
|
||||||
|
"modules"
|
||||||
|
((scheme-file "guix-cantrips-package")))))
|
||||||
|
(scheme-file "hall")
|
||||||
(text-file ".gitignore")
|
(text-file ".gitignore")
|
||||||
(scheme-file "guix")
|
(scheme-file "guix")))))
|
||||||
(directory "scripts" ((in-file "guix-cantrips")))))))
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
#!@GUILE@ \
|
||||||
|
--no-auto-compile -e main -s
|
||||||
|
!#
|
||||||
|
|
||||||
;; bin/guix-cantrips --- guix-cantrips cli -*- coding: utf-8 -*-
|
;; bin/guix-cantrips --- guix-cantrips cli -*- coding: utf-8 -*-
|
||||||
|
|
||||||
(use-modules (config)
|
(use-modules (config)
|
||||||
(config api)
|
(config api)
|
||||||
(config licenses)
|
(config licenses)
|
||||||
|
|
Loading…
Reference in New Issue