I’ve been using fpm2 for some of my passwords the last couple of years. It’s not the best, and as far I’m aware upstream development has ceased, so changing to something better is definitely on the agenda (also known as the-evergrowing-list-of-things-I-should-have-done-last-year).

So after having been on GuixSD for a while I decided to package, or more precisely, write a recipe for fpm2 (Figaros Password Manager 2). With little experience with Guile Scheme and my programmer skills getting rusty this has been a bumpy ride, though I guess we learn as long as we live - don’t we?

First of I copied the Nix recipe for fpm2 from https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/security/fpm2/default.nix and created what I thought would be a guile version of it - which turns out wasn’t as guilish as I thought…

To make guix find the file I’ve put (add-to-load-path "/home/thomas/guixsd/modules/tms") to my systems config.scm. /home/thomas/guixsd/modules/tms is the path to my modules.

I’ve been bashing my heads against this for some time, but in the came up with something I could almost get to finish building: https://notabug.org/thomassgn/guixsd-configuration/src/8dd3f613371b7f1ab28111f061f6735646174ee0/modules/tms/fpm2.scm

In the end I read over a few other package definitions that also appended to files, and after having a good look at nvi.scm xfig.scm in the gnu/packages/ I ended up with the current definition wich builds and works and everything…

Though I’m not sure why :)

Some day I’ll sit down and read the Guile manual and do some programming with it so I might understand, but right now I’ll just celebrate and go to bed.

I did try using emacs’ geiser and guix-development-mode while working on this, but for the most part they just worked away forever without any feedback when I tried evaluating the buffer with the package definition in it. I would love to meet up with someone who knows at least guile and emacs (and maybe even guix), and have a crash course with help on getting these running together. Cause at the moment I find manually jumping around my terminals and emacs to be easier and quicker than the all-in-emacs-geiser-guix - even though that looks much easier.