Created
March 18, 2019 15:05
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 | |
inherit (pkgs) mkShell stdenv; | |
troupe = stdenv.mkDerivation { | |
name = "troupe"; | |
version = "20191803"; | |
src = pkgs.fetchurl { | |
url = "http://lbs-troupe.troupe-lang.org/download/troupe-linux.zip"; | |
sha256 = "03wzf08b5ypi6vpmfvn0zz2bl2nqc33k6nm99nk28c0317frq96d"; | |
}; | |
nativeBuildInputs = [ unzip makeWrapper patchelf ]; | |
sourceRoot = "build/Troupe"; | |
installPhase = '' | |
mkdir $out | |
cp -r ./ $out/ | |
''; | |
preFixup = '' | |
for elf in golden troupec irtester; do | |
patchelf \ | |
--set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 \ | |
--set-rpath ${stdenv.cc.cc.lib.out}/lib:${pkgs.ncurses5.out}/lib \ | |
$out/bin/$elf | |
done | |
''; | |
postFixup = '' | |
# for elf in golden troupec irtester; do | |
# wrapProgram $out/bin/$elf \ | |
# --set TROUPE $out | |
# done | |
''; | |
}; | |
in mkShell { | |
buildInputs = with pkgs; [ | |
nodejs-10_x | |
troupe | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment