2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, bundlerEnv, ruby, makeWrapper, bundlerUpdateScript
|
2017-06-04 16:02:42 +02:00
|
|
|
, git }:
|
2016-02-11 19:49:33 +01:00
|
|
|
|
2017-06-04 16:02:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gollum";
|
2020-03-30 18:20:25 +02:00
|
|
|
# nix-shell -p bundix icu zlib cmake pkg-config openssl
|
2017-06-04 16:02:42 +02:00
|
|
|
version = (import ./gemset.nix).gollum.version;
|
2016-02-11 19:49:33 +01:00
|
|
|
|
2017-06-04 16:02:42 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-06-03 22:50:33 +02:00
|
|
|
|
2017-06-04 16:02:42 +02:00
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
2019-11-10 00:52:53 +01:00
|
|
|
installPhase = let
|
|
|
|
env = bundlerEnv {
|
|
|
|
name = "${pname}-${version}-gems";
|
|
|
|
inherit pname ruby;
|
|
|
|
gemdir = ./.;
|
|
|
|
};
|
|
|
|
in ''
|
2017-06-04 16:02:42 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper ${env}/bin/gollum $out/bin/gollum \
|
2021-01-15 06:42:41 +01:00
|
|
|
--prefix PATH ":" ${lib.makeBinPath [ git ]}
|
2020-03-30 18:20:25 +02:00
|
|
|
makeWrapper ${env}/bin/gollum-migrate-tags $out/bin/gollum-migrate-tags \
|
2021-01-15 06:42:41 +01:00
|
|
|
--prefix PATH ":" ${lib.makeBinPath [ git ]}
|
2017-06-04 16:02:42 +02:00
|
|
|
'';
|
2016-02-11 19:49:33 +01:00
|
|
|
|
2019-07-22 14:02:47 +02:00
|
|
|
passthru.updateScript = bundlerUpdateScript "gollum";
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-03-30 18:20:25 +02: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";
|
2016-02-11 19:49:33 +01:00
|
|
|
license = licenses.mit;
|
2021-02-27 19:56:10 +01:00
|
|
|
maintainers = with maintainers; [ erictapen jgillich nicknovitski ];
|
2016-02-11 19:49:33 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|