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