diff options
Diffstat (limited to 'publications/default.nix')
| -rw-r--r-- | publications/default.nix | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/publications/default.nix b/publications/default.nix index 0c13869..d41555c 100644 --- a/publications/default.nix +++ b/publications/default.nix @@ -3,29 +3,15 @@ lib, ... }: let - export = id: publication: format: let - publicationJSON = - builtins.toFile "${id}.json" (builtins.toJSON [publication]); - publicationOut = pkgs.runCommand "${id}.${format}" {} '' - "${pkgs.pandoc}/bin/pandoc" "${publicationJSON}" --from csljson --to "${format}" --output "$out" - ''; - in - builtins.readFile publicationOut; importPublications = builtins.map (publication: - with publication; let - exportThisTo = export id publication; - in + with publication; publication // { year = with builtins; toString (head (head issued.date-parts)); url = URL; - cite = { - bibtex = exportThisTo "bibtex"; - biblatex = exportThisTo "biblatex"; - csljson = exportThisTo "csljson"; - }; }); in { selected = importPublications (lib.importJSON ./publications_selected.json); all = importPublications (lib.importJSON ./publications.json); + files = pkgs.callPackage ./export.nix {}; } |
