package.nix (1129B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 makeWrapper, 7 lua5_3, 8 zlib, 9 }: 10 11 stdenv.mkDerivation { 12 pname = "tom"; 13 version = "2021-10-21"; 14 15 __structuredAttrs = true; 16 17 src = fetchFromGitHub { 18 owner = "omar-polo"; 19 repo = "tom"; 20 rev = "5d89c1bb50200f79fac9eee5f88ed4e43ccd32a8"; 21 hash = "sha256-dpDNZYkOzcugtPi3ZeB9xHlYas2tdsTqfnhp7KqBMYg="; 22 }; 23 24 postPatch = '' 25 substituteInPlace runcgi.sh \ 26 --replace-fail "lua53" "${lua5_3}/bin/lua" \ 27 --replace-fail "tom.lua" "$out/share/lua/tom.lua" 28 ''; 29 30 nativeBuildInputs = [ 31 pkg-config 32 makeWrapper 33 ]; 34 35 buildInputs = [ 36 lua5_3 37 zlib 38 ]; 39 40 installPhase = '' 41 install -Dm644 *.so *.lua -t $out/share/lua 42 install -Dm755 *.sh -t $out/bin 43 44 wrapProgram $out/bin/runcgi.sh \ 45 --set LUA_PATH "$out/share/lua/?.lua" \ 46 --set LUA_CPATH "$out/share/lua/?.so" 47 ''; 48 49 meta = { 50 description = "Gemini frontend for git repositories"; 51 homepage = "https://github.com/omar-polo/tom"; 52 license = lib.licenses.isc; 53 maintainers = [ lib.maintainers.sikmir ]; 54 platforms = lib.platforms.unix; 55 }; 56 }
