From 8cfdb0713122a9b8f2ea236b9505ae36bb48d39b Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 27 Nov 2017 17:22:02 +0100 Subject: pkgs/profpatsch/nman: rewrite in golang Apart from using the go compiler, switch from `nix-shell -p`, which only worked in certain cases, to a `nix-build` with fallback for `man` and default outputs. Thanks to @muesli for the golang intro. --- pkgs/profpatsch/nman/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/profpatsch/nman/default.nix') diff --git a/pkgs/profpatsch/nman/default.nix b/pkgs/profpatsch/nman/default.nix index 10e5417f..b9b967cf 100644 --- a/pkgs/profpatsch/nman/default.nix +++ b/pkgs/profpatsch/nman/default.nix @@ -1,12 +1,12 @@ -{ lib, runCommandCC }: +{ lib, runCommandNoCC, go }: -runCommandCC "nman" { +runCommandNoCC "nman" { meta = with lib; { description = "Invoke manpage in temporary nix-shell"; license = licenses.gpl3; }; } '' - cc -o nman ${./nman.c} + ${lib.getBin go}/bin/go build -o nman ${./nman.go} install -D nman $out/bin/nman '' -- cgit 1.4.1