nur-packages

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

default.nix (1100B)


      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   src = fetchFromGitHub {
     16     owner = "omar-polo";
     17     repo = "tom";
     18     rev = "5d89c1bb50200f79fac9eee5f88ed4e43ccd32a8";
     19     hash = "sha256-dpDNZYkOzcugtPi3ZeB9xHlYas2tdsTqfnhp7KqBMYg=";
     20   };
     21 
     22   postPatch = ''
     23     substituteInPlace runcgi.sh \
     24       --replace-fail "lua53" "${lua5_3}/bin/lua" \
     25       --replace-fail "tom.lua" "$out/share/lua/tom.lua"
     26   '';
     27 
     28   nativeBuildInputs = [
     29     pkg-config
     30     makeWrapper
     31   ];
     32 
     33   buildInputs = [
     34     lua5_3
     35     zlib
     36   ];
     37 
     38   installPhase = ''
     39     install -Dm644 *.so *.lua -t $out/share/lua
     40     install -Dm755 *.sh -t $out/bin
     41 
     42     wrapProgram $out/bin/runcgi.sh \
     43       --set LUA_PATH "$out/share/lua/?.lua" \
     44       --set LUA_CPATH "$out/share/lua/?.so"
     45   '';
     46 
     47   meta = {
     48     description = "Gemini frontend for git repositories";
     49     homepage = "https://github.com/omar-polo/tom";
     50     license = lib.licenses.isc;
     51     maintainers = [ lib.maintainers.sikmir ];
     52     platforms = lib.platforms.unix;
     53   };
     54 }