Created
February 13, 2017 14:27
-
-
Save brainrake/417fde486162313bc39ae16872e55a2f to your computer and use it in GitHub Desktop.
This file contains hidden or 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> {}, ...}: | |
pkgs.stdenv.mkDerivation { | |
name = "a-slower-speed-of-light"; | |
src = pkgs.fetchurl { | |
url = http://web.mit.edu/gambit/summer12/speedoflight/beta/A_Slower_Speed_of_Light.tgz; | |
sha256 = "095kbvpjwzllm0p0c92100vsk40fdrxp2ak3wvdbmk3vzfvbxb6v"; | |
}; | |
installPhase = with pkgs; '' | |
mkdir -p $out/src | |
cp -r * $out/src | |
${patchelf}/bin/patchelf --set-interpreter \ | |
${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \ | |
"$out/src/A Slower Speed of Light.x86_64" | |
patchelf --set-rpath \ | |
"${stdenv.glibc}/lib:${pkgs.mesa}/lib/:${pkgs.xlibs.libX11}/lib/:${pkgs.xlibs.libXext}/lib/:${pkgs.xlibs.libXcursor}/lib/" \ | |
"$out/src/A Slower Speed of Light.x86_64" | |
mkdir -p $out/bin | |
ln -s "../src/A Slower Speed of Light.x86_64" "$out/bin/a-slower-speed-of-light" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment