Skip to content

Instantly share code, notes, and snippets.

@Jomik
Created March 18, 2019 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jomik/2232896e4530a43c70938b047c1bc0a0 to your computer and use it in GitHub Desktop.
Save Jomik/2232896e4530a43c70938b047c1bc0a0 to your computer and use it in GitHub Desktop.
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