2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, bundlerEnv, ruby, makeWrapper, bundlerUpdateScript
|
2021-08-05 21:33:18 +00:00
|
|
|
, git, docutils, perl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gollum";
|
|
|
|
# nix-shell -p bundix icu zlib cmake pkg-config openssl
|
|
|
|
version = (import ./gemset.nix).gollum.version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = let
|
|
|
|
env = bundlerEnv {
|
|
|
|
name = "${pname}-${version}-gems";
|
|
|
|
inherit pname ruby;
|
|
|
|
gemdir = ./.;
|
|
|
|
};
|
|
|
|
in ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${env}/bin/gollum $out/bin/gollum \
|
2021-08-05 21:33:18 +00:00
|
|
|
--prefix PATH ":" ${lib.makeBinPath [ git docutils perl]}
|
2020-04-24 23:36:52 +00:00
|
|
|
makeWrapper ${env}/bin/gollum-migrate-tags $out/bin/gollum-migrate-tags \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH ":" ${lib.makeBinPath [ git ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = bundlerUpdateScript "gollum";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A simple, Git-powered wiki with a sweet API and local frontend";
|
|
|
|
homepage = "https://github.com/gollum/gollum";
|
|
|
|
changelog = "https://github.com/gollum/gollum/blob/v${version}/HISTORY.md";
|
|
|
|
license = licenses.mit;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ erictapen jgillich nicknovitski ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|