Status page for GenSoc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

53 lines
1.1 KiB

with import <nixpkgs> {};
let
name = "gensoc-status";
version = "0.1.0";
src = ./.;
executableName = "gensoc-status";
nodePkg = pkgs.nodejs-12_x;
yarnPkg = pkgs.yarn.override { nodejs = nodePkg; };
port = 8081;
in mkYarnPackage {
inherit name src version;
system = builtins.currentSystem;
packageJSON = "${src}/package.json";
yarnLock = "${src}/yarn.lock";
doDist = false;
buildInputs = [
automake autoconf m4 git bash
nodejs-10_x libpng libGL gcc makeWrapper
(yarn.override { nodejs = nodejs-10_x; })
];
nativeBuildInputs = [
makeWrapper
];
configurePhase = ''
rm -rf ./node_modules || true
ln -s $node_modules ./node_modules
export PATH=$PATH:$node_modules/.bin/
export NODE_PATH=$NODE_PATH:$node_modules
'';
buildPhase = ''
yarn build:server
'';
installPhase = ''
mkdir $out
cp -R dist/* $out/
cp -R static $out/static
cp -R src/config.json $out/config.json
makeWrapper ${nodePkg}/bin/node $out/bin/${executableName} \
--add-flags $out/server.js \
--set NODE_PATH $NODE_PATH:$out:$node_modules \
'';
distPhase = ''
true
'';
}