[email protected] writes:

> I would like to make a blog, and for some reason i have a wordpress
> account even though i do not want to interact with the wordpress
> software. I have read of org2blog, an extension for emacs to facilitate
> posting from org-mode to wordpress. So far all the extensions to emacs
> I'm using in Guix are installed via guix, so I am trying to make an
> org2blog package. 
>
> I started with the Guix Packager found at
> https://guix-hpc.gitlabpages.inria.fr/guix-packager/ to generate a
> template to start with. After some hand-editing I have this:
>
> '''
> (define-module (guix-packager)
>   #:use-module (guix)
>   #:use-module ((guix licenses) #:prefix license:)
>   #:use-module (gnu packages)
>   #:use-module (guix build-system emacs)
>   #:use-module (guix git-download))
>
> (define-public org2blog
>   (package
>     (name "org2blog")
>     (version "d016860")
>     (source
>       (origin
>         (method git-fetch)
>         (uri (git-reference
>               (url "https://github.com/org2blog/org2blog.git";)
>               (commit "d016860")))
>         (file-name (git-file-name name version))
>         (sha256 (base32
> "1idz1jcxccicl6r45a6zbgjkhdc7p0pg1w1bp67yk10dhm2gvpsy"))))
>     (build-system emacs-build-system)
>    (arguments (list #:tests? #f))
>     (home-page "https://github.com/org2blog";)
>     (synopsis " Blog from Org mode to WordPress.")
>     (description "An emacs org-mode facility for editing blog posts and
> publishing same to a wordpress instance.")
>     (license license:gpl3+)))
> org2blog
>
> '''
>
> which, when running `guix build -f org2blog.scm`, yields the following
> error, pasted in here from the build log, beginning from the first
> mention of error: please advise if it is helpful to include the rest of
> the log?
>
> '''
>
> What all am i doing wrong?

So you are missing few things, first `propagated inputs`, if you look
at the https://github.com/org2blog/org2blog/blob/master/org2blog.el it
will tell you required packages. the `metaweblog` package is vendored
with the org2blog package, you will need to package it too. An example
definition would be:

(define-public emacs-org2blog
  (let  ((commit "d0168606e60df2267b451dfe92975ad3f5c7919c")
         (revision "0"))
  (package
   (name "emacs-org2blog")
   (version (git-version "1.1.18" revision commit))
   (source
    (origin
     (method git-fetch)
     (uri (git-reference
           (url "https://github.com/org2blog/org2blog.git";)))
     (sha256 (base32 "1idz1jcxccicl6r45a6zbgjkhdc7p0pg1w1bp67yk10dhm2gvpsy"))))
   (build-system emacs-build-system)
   (propagated-inputs
    (list emacs-htmlize
          emacs-hydra
          emacs-xml-rpc
          emacs-writegood-mode
          emacs-metaweblog))
   (arguments
    (list
     #:exclude  #~(cons "^metaweblog\\.el$" )))
   (home-page "https://github.com/org2blog/org2blog";)
   (synopsis "Blog from Org mode to WordPress")
   (description "TODO")
   (license TODO))))

It is not 100% correct package as I wrote it in a whim, but you get
the idea, you will need to make a separate package for metaweblog and
fill in things. Do ask if you face any difficulties :D

Reply via email to