Created
June 1, 2017 22:23
-
-
Save cessationoftime/b88e87afcf8e55e4cc5f11cb5dc12673 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: with pkgs; | |
stdenv.mkDerivation { | |
name = "frontend"; | |
src = ../.; | |
buildInputs = [ elmPackages.elm nodejs nodePackages.yarn ]; | |
HOME="."; | |
patchPhase = '' | |
cd frontend | |
if [ ! -d "node_modules" ]; then | |
yarn | |
fi | |
patchShebangs node_modules/webpack | |
''; | |
buildPhase = '' | |
if [ -d "dist" ]; then | |
rm ./dist -r | |
fi | |
node node_modules/webpack/bin/webpack.js | |
''; | |
installPhase = '' | |
mkdir $out | |
cp -r dist/* $out/ | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment