Last active
June 25, 2020 11:08
-
-
Save pasviegas/cd26354ad56d2e2ba1a9b90ce908ae37 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
with import <nixpkgs> { }; | |
let | |
formality = stdenv.mkDerivation { | |
name = "formality"; | |
src = fetchFromGitHub { | |
owner = "moonad"; | |
repo = "Formality"; | |
rev = "7672090304ec1a5e83a4edb24d02a692620807b6"; | |
sha256 = "1wkixraa21cj05wnibsdb9s7wbs2m3qsq3ssqcjyc4rx0v94szpb"; | |
}; | |
buildInputs = [ nodejs ]; | |
buildPhase = '' | |
# Install dependencies | |
cd ./javascript | |
HOME=. ${pkgs.nodejs}/bin/npm install --force --ignore-scripts --only=production | |
''; | |
installPhase = '' | |
# Copy files | |
mkdir -p $out/bin | |
cp -pR ../* $out | |
# Symlink binaries | |
ln -s $out/javascript/bin/fm.js $out/bin/fm | |
ln -s $out/javascript/bin/fmcjs.js $out/bin/fmjs | |
ln -s $out/javascript/bin/fmcio.js $out/bin/fmio | |
ln -s $out/javascript/bin/fmcx.js $out/bin/fmx | |
ln -s $out/javascript/bin/fm2fmc.js $out/bin/fm2fmc | |
ln -s $out/javascript/bin/fmchs.js $out/bin/fmchs | |
''; | |
}; | |
in mkShell { buildInputs = [ formality ]; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment