depot/third_party/nixpkgs/pkgs/servers/web-apps/frab/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

53 lines
1.3 KiB
Nix

{ stdenv, bundlerEnv, fetchFromGitHub, ruby, nodejs }:
let
env = bundlerEnv {
name = "frab";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in
stdenv.mkDerivation {
name = "frab-2016-12-28";
src = fetchFromGitHub {
owner = "frab";
repo = "frab";
rev = "e4bbcfd1a9db7f89f53a8702c236d9628bafb72c";
sha256 = "04pzmif8jxjww3fdf2zbg3k7cm49vxc9hhf4xhmvdmvywgin6fqp";
};
buildInputs = [ env nodejs ];
buildPhase = ''
cp config/database.yml.template config/database.yml
cp .env.development .env.production
bundler exec rake assets:precompile RAILS_ENV=production
rm .env.production
'';
installPhase = ''
mkdir -p $out/share
cp -r . $out/share/frab
ln -sf /run/frab/database.yml $out/share/frab/config/database.yml
rm -rf $out/share/frab/tmp $out/share/frab/public/system
ln -sf /run/frab/system $out/share/frab/public/system
ln -sf /tmp $out/share/frab/tmp
'';
passthru = {
inherit env ruby;
};
meta = with stdenv.lib; {
description = "Web-based conference planning and management system";
homepage = "https://github.com/frab/frab";
license = licenses.mit;
broken = true; # 2018-09-08; no successful hydra build since 2018-02-14
};
}