nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit c81c9ebd48dab197d5d6ea1c2c904c5e02717fa9
parent 1f0256f47e518e7ea21676a7d89570a6ce2497b8
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Tue,  5 Oct 2021 13:56:15 +0300

Add tom

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/gemini/tom/default.nix | 42++++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -152,6 +152,7 @@ lib.makeScope newScope ( stargazer = callPackage ./gemini/stargazer { inherit (darwin.apple_sdk.frameworks) Security; }; + tom = callPackage ./gemini/tom { }; ### GEOSPATIAL diff --git a/pkgs/gemini/tom/default.nix b/pkgs/gemini/tom/default.nix @@ -0,0 +1,42 @@ +{ lib, stdenv, fetchFromGitHub, pkg-config, makeWrapper +, lua5_3, memstreamHook, zlib +}: + +stdenv.mkDerivation rec { + pname = "tom"; + version = "2021-09-24"; + + src = fetchFromGitHub { + owner = "omar-polo"; + repo = pname; + rev = "87f805afd12ea0e971c6bc8278d94aa85120da6d"; + hash = "sha256-Syz73/h9z6ZLDywhfQzh2NKC0nWFWon3SK0KHptK5Cc="; + }; + + postPatch = '' + substituteInPlace runcgi.sh \ + --replace "lua53" "${lua5_3}/bin/lua" \ + --replace "tom.lua" "$out/share/lua/tom.lua" + ''; + + nativeBuildInputs = [ pkg-config makeWrapper ]; + + buildInputs = [ lua5_3 zlib ] ++ lib.optional stdenv.isDarwin memstreamHook; + + installPhase = '' + install -Dm644 *.so *.lua -t $out/share/lua + install -Dm755 *.sh -t $out/bin + + wrapProgram $out/bin/runcgi.sh \ + --set LUA_PATH "$out/share/lua/?.lua" \ + --set LUA_CPATH "$out/share/lua/?.so" + ''; + + meta = with lib; { + description = "Gemini frontend for git repositories"; + inherit (src.meta) homepage; + license = licenses.isc; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}