Jesse, Thank you! I am b1ff and can't figure out how to make emacs quote an attachment, so consider +es >s below. Jesse Gibbons 写道:+ %D%/packages/filters.scm \ A new file's overkill. I created a toys.scm file long ago for misfit toys that aren't games. They could use some company. There's also games.scm which already contains talkfilters, although they aren't games dammit. Choose wisely. +(define-module (gnu packages filters) +#:use-module (guix build-system gnu) +#:use-module (guix download) +#:use-module (guix git-download) +#:use-module ((guix licenses) #:prefix license:) +#:use-module (guix packages) +#:use-module (gnu packages bison) +#:use-module (gnu packages flex) +#:use-module (gnu packages perl)) Not a relevant nitpick anymore, but this would have been indented. + (let + ((version "2.55") More nitpicking: convention is to write the above as one line. + (uri (git-reference + (url "git://git.joeyh.name/filters") https:// is preferred over git://, if not for any ‘security’ benefit, then for the fact that it's much more unfriendly-firewall-friendly. https://git.joeyh.name/git/filters.git works here. + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) Both lines can be written simply as (lambda _ since OUT and hence OUTPUTS are never used in this final version. + (("kenny") + ""))) This part would have belonged in the phase below, but + ;; kenny is under nonfree Artistic License (Perl) 1.0. + (add-after 'fix-install-directories 'remove-nonfree-filter + (lambda _ + (substitute* "Makefile" + (("kenny") + "")) + #t))) I'm afraid this isn't an option when unfree code is involved. The offending files must be removed (and any Makefiles &c. fixed if feasible) in a source snippet so ‘guix build --source filters’ doesn't return unfree code to unsuspecting users. Examples of snippets abound. + #:make-flags (list "CC=gcc" (string-append "DESTDIR=" %output)) Prefer putting each assignment on its own line for clarity. + #:tests? #f)) ‘; no test suite’? + (home-page "http://joeyh.name/code/filters/") Prefer HTTPS here too. + (synopsis "Various amusing text filters") + (description "The filters collection harks back to the late 80's, when ‘80s’ (1980s, even, who knows how long Guix will prosper ;-). +various text filters were written to munge written language in amusing ways. +The earliest and best known were legends such as the Swiedish Chef filter and ‘Swedish’ (or ‘Sweedish’ as below, although that's not the common name). ‘legends’ is a bit too PR-ish for my tastes but I'll leave it up to you. +@item b1ff - The B1FF filter ‘A satire of a stereotypical Usenet newbie’. +@item censor - CDA-ize text +@item chef - convert English on stdin to Mock Sweedish on stdout +@item cockney - Cockney English This list is long, and each description is written in a wildly different style which annoys me for some reason. I prefer the last one, it's simple and to the point. I think a list of all filters can be justified here (it helps searching for ‘pirate’ :-) but >1 line each is too much. ‘jibberish’ & ‘fanboy’ focus too much the workings of the code; ‘A random combination of all other filters’ and ‘Speak like a fanboy (supports custom fandoms)’ are sufficient. +The GNU project hosts a similar collection of filters, the GNU talkfilters. Due +to copyright concerns and difficulty in communication between maintainers, these +collections have not been merged.") I think the description is already quite long without this factoid. + (license (list license:gpl2+ ;; most of the filters (see debian/copyright) + license:gpl2 ;; rasterman, ky00te.dir/* nethackify, pirate + license:gpl3+ ;; scramble, scottish + license:public-domain ;; jethro, kraut, ken, studly + license:gpl1+ ;; cockney, jive, nyc only say "gpl" + license:expat))))) ;; newspeak. Thank you for taking the time to list each filter! Trailing comments like this take only a single ‘;’, no ‘.’, and are indented together (either by your editor or by etc/indent-code.el). Something like: (license (list license:gpl2+ ; most of the filters (see debian/copyright) license:gpl2 ; rasterman, ky00te.dir/* nethackify, pirate license:gpl3+ ; scramble, scottish license:public-domain ; jethro, kraut, ken, studly license:gpl1+ ; cockney, jive, nyc only say "gpl" license:expat))))) ; newspeak Thanks again, T G-R