From d488feb4b2a586071fdb28309858747549670903 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 8 Dec 2022 09:11:49 +0100 Subject: treewide: fmt with alejandra --- manpage.nix | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'manpage.nix') diff --git a/manpage.nix b/manpage.nix index bea6b25..c47d88a 100644 --- a/manpage.nix +++ b/manpage.nix @@ -1,13 +1,16 @@ -{ outputAttrPath, optionsAttrPath, optionsInternal ? true, }: - -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = getAttrFromPath (optionsAttrPath ++ [ "manpage" ]) config; -in { + outputAttrPath, + optionsAttrPath, + optionsInternal ? true, +}: { + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = getAttrFromPath (optionsAttrPath ++ ["manpage"]) config; +in { options = setAttrByPath optionsAttrPath { manpage = { name = mkOption { @@ -93,12 +96,12 @@ in default = ""; internal = optionsInternal; }; - }; }; config = setAttrByPath outputAttrPath { - manpage = pkgs.runCommand cfg.file + manpage = + pkgs.runCommand cfg.file { src = pkgs.writeText "${cfg.file}.md" '' % ${cfg.title} @@ -128,9 +131,9 @@ in ${cfg.textAfter} ''; - nativeBuildInputs = [ pkgs.pandoc ]; + nativeBuildInputs = [pkgs.pandoc]; } '' - pandoc "$src" --from=markdown --to=man --standalone --output="$out" - ''; + pandoc "$src" --from=markdown --to=man --standalone --output="$out" + ''; }; } -- cgit v1.2.3