-
-
Save nocoolnametom/649b587a944eb972bd59cfb8a021f54b 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