diff --git a/pkgs/development/tools/fac/default.nix b/pkgs/development/tools/fac/default.nix index c587505600c9..0fae9fad5d14 100644 --- a/pkgs/development/tools/fac/default.nix +++ b/pkgs/development/tools/fac/default.nix @@ -1,14 +1,8 @@ { stdenv, buildGoPackage, fetchFromGitHub, fetchurl, makeWrapper, git }: -let - # TODO: Remove this on next update, should be included - fac_1 = fetchurl { - url = https://raw.githubusercontent.com/mkchoi212/fac/0a500c2a2dba9017fe7c2a45f15c328755f561a6/doc/fac.1; - sha256 = "1fsyx9i20ryhpihdpvs2z7vccl13b9bnh5hcdxn7bvqjz78mbqhw"; - }; -in buildGoPackage rec { +buildGoPackage rec { name = "fac-${version}"; - version = "1.0.4"; + version = "1.1.0"; goPackagePath = "github.com/mkchoi212/fac"; @@ -16,16 +10,19 @@ in buildGoPackage rec { owner = "mkchoi212"; repo = "fac"; rev = "v${version}"; - sha256 = "0jhx80jbkxfxj95hmdpb9wwwya064xpfkaa218l1lwm3qwfbpk95"; + sha256 = "054j8yrblf1frcfn3dwrjbgf000i3ngbaz2c172nwbx75g309ihx"; }; + goDeps = ./deps.nix; + nativeBuildInputs = [ makeWrapper ]; postInstall = '' wrapProgram $bin/bin/fac \ --prefix PATH : ${git}/bin - install -D ${fac_1} $out/share/man/man1/fac.1 + # Install man page, not installed by default + install -D go/src/${goPackagePath}/assets/doc/fac.1 $out/share/man/man1/fac.1 ''; meta = with stdenv.lib; { diff --git a/pkgs/development/tools/fac/deps.nix b/pkgs/development/tools/fac/deps.nix new file mode 100644 index 000000000000..65ec5ded5ad5 --- /dev/null +++ b/pkgs/development/tools/fac/deps.nix @@ -0,0 +1,66 @@ +# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) +[ + { + goPackagePath = "github.com/alecthomas/chroma"; + fetch = { + type = "git"; + url = "https://github.com/alecthomas/chroma"; + rev = "1b755a90bd109f170385cb3964f0abdfd3451145"; + sha256 = "1ilmavg291qhb0xq881f5h172zw40aaynqfb0y4yjyq13jnrf8p8"; + }; + } + { + goPackagePath = "github.com/danwakefield/fnmatch"; + fetch = { + type = "git"; + url = "https://github.com/danwakefield/fnmatch"; + rev = "cbb64ac3d964b81592e64f957ad53df015803288"; + sha256 = "0cbf511ppsa6hf59mdl7nbyn2b2n71y0bpkzbmfkdqjhanqh1lqz"; + }; + } + { + goPackagePath = "github.com/dlclark/regexp2"; + fetch = { + type = "git"; + url = "https://github.com/dlclark/regexp2"; + rev = "7632a260cbaf5e7594fc1544a503456ecd0827f1"; + sha256 = "0vhp5r0ywv9p1c74fm8xzclnwx2mg9f0764b3id7a9nwh0plisx2"; + }; + } + { + goPackagePath = "github.com/jroimartin/gocui"; + fetch = { + type = "git"; + url = "https://github.com/jroimartin/gocui"; + rev = "c055c87ae801372cd74a0839b972db4f7697ae5f"; + sha256 = "1b1cbjg925l1c5v3ls8amni9716190yzf847cqs9wjnj82z8qa47"; + }; + } + { + goPackagePath = "github.com/mattn/go-runewidth"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-runewidth"; + rev = "ce7b0b5c7b45a81508558cd1dba6bb1e4ddb51bb"; + sha256 = "0lc39b6xrxv7h3v3y1kgz49cgi5qxwlygs715aam6ba35m48yi7g"; + }; + } + { + goPackagePath = "github.com/mkchoi212/fac"; + fetch = { + type = "git"; + url = "https://github.com/mkchoi212/fac"; + rev = "642a3ad8d8b4b76c7eb201e6f69b3bddb210c502"; + sha256 = "10rsmnixs3lybnj4xv09b2ya6x0hjjd03y148f78qfppyz2hsvaz"; + }; + } + { + goPackagePath = "github.com/nsf/termbox-go"; + fetch = { + type = "git"; + url = "https://github.com/nsf/termbox-go"; + rev = "21a4d435a86280a2927985fd6296de56cbce453e"; + sha256 = "0afbb0nr9rqzlpg5n7dg070w5scdvckyzyy525mhndp8phhzwpg7"; + }; + } +] \ No newline at end of file