2018-08-19 13:09:38 +01:00
|
|
|
{ stdenv, fetchurl, bundlerEnv, ruby }:
|
2014-10-07 09:52:45 +01:00
|
|
|
|
2018-08-19 13:09:38 +01:00
|
|
|
let
|
|
|
|
version = "3.4.6";
|
|
|
|
rubyEnv = bundlerEnv {
|
|
|
|
name = "redmine-env-${version}";
|
2014-10-07 09:52:45 +01:00
|
|
|
|
2018-08-19 13:09:38 +01:00
|
|
|
inherit ruby;
|
|
|
|
gemdir = ./.;
|
2014-10-07 09:52:45 +01:00
|
|
|
};
|
2018-08-19 13:09:38 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "redmine-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.redmine.org/releases/${name}.tar.gz";
|
|
|
|
sha256 = "15akq6pn42w7cf7dg45xmvw06fixck1qznp7s8ix7nyxlmcyvcg3";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
mv config config.dist
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share
|
|
|
|
cp -r . $out/share/redmine
|
|
|
|
|
2018-08-19 21:29:44 +01:00
|
|
|
for i in config files log plugins tmp; do
|
2018-08-19 13:09:38 +01:00
|
|
|
rm -rf $out/share/redmine/$i
|
2018-08-19 21:29:44 +01:00
|
|
|
ln -fs /run/redmine/$i $out/share/redmine/
|
2018-08-19 13:09:38 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.redmine.org/;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.garbas ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|