* Create package to add new files
@ 2022-06-27 20:22 calcium via
2022-08-18 14:19 ` zimoun
0 siblings, 1 reply; 2+ messages in thread
From: calcium via @ 2022-06-27 20:22 UTC (permalink / raw)
To: help-guix
I tried using the procedures text-file* and plain-file but I can't manage to make it works.
Im trying to define a package that will be used to add files to cups, in the same ways taht the package brlaser add files. But no luck, every time I try to create a `plain-file` the build fails.
Help appreciated
(define-public
add-my-filters-and-ppd
(package/inherit
brlaser
(name "add-my-filters-and-ppd")
(arguments
`(#:phases
(modify-phases
%standard-phases
;; (delete 'configure) ;no 'configure' script
(replace
'install
(lambda* (#:key outputs #:allow-other-keys)
;; The package's Makefile doesn't provide an "install"
;; rule so do it by ourselves.
(let ((filter-dir
(string-append (assoc-ref outputs "out")
"/lib/cups/filter"))
(ppd-dir
(string-append (assoc-ref outputs "out")
"/share/ppd/cupsfilters")))
;; (install-file
;; (plain-file "brother_lpdwrapper_printer-model"
;; "ldwrapper string/content of file"))
;; (install-file
;; (plain-file "brother-printer-model-cups-en.ppd"
;; ".ppd string/content of file")
;; ppd-dir)
)
#t)))))))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Create package to add new files
2022-06-27 20:22 Create package to add new files calcium via
@ 2022-08-18 14:19 ` zimoun
0 siblings, 0 replies; 2+ messages in thread
From: zimoun @ 2022-08-18 14:19 UTC (permalink / raw)
To: calcium, help-guix
Hi,
On Mon, 27 Jun 2022 at 22:22, calcium via <help-guix@gnu.org> wrote:
> I tried using the procedures text-file* and plain-file but I can't
> manage to make it works.
Well, I am not sure it is what you are looking for. There are from
G-expressions [1] when you probably just want install some files.
1: <https://guix.gnu.org/manual/devel/en/guix.html#G_002dExpressions>
> (replace
> 'install
> (lambda* (#:key outputs #:allow-other-keys)
> ;; The package's Makefile doesn't provide an "install"
> ;; rule so do it by ourselves.
> (let ((filter-dir
> (string-append (assoc-ref outputs "out")
> "/lib/cups/filter"))
> (ppd-dir
> (string-append (assoc-ref outputs "out")
> "/share/ppd/cupsfilters")))
> ;; (install-file
> ;; (plain-file "brother_lpdwrapper_printer-model"
> ;; "ldwrapper string/content of file"))
For instance, instead of…
> ;; (install-file
> ;; (plain-file "brother-printer-model-cups-en.ppd"
> ;; ".ppd string/content of file")
> ;; ppd-dir)
> )
> #t)))))))
maybe this:
(install-file
"brother-printer-model-cups-en.ppd"
ppd-dir)
is what you would like. Is it?
Hope that helps,
simon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-18 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 20:22 Create package to add new files calcium via
2022-08-18 14:19 ` zimoun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).