Created
December 14, 2022 00:13
-
-
Save maxsei/f0cdee5808295c76ae2d4e25513dded0 to your computer and use it in GitHub Desktop.
Patching executables with presumed dynamically linked libarary locations (these systems that aren't nix lol)
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
| { stdenv, lib, gcc-unwrapped }: | |
| stdenv.mkDerivation rec { | |
| name = "mercurytcpclient"; | |
| version = "0.0.1"; | |
| src = ./.; | |
| dontUnpack = true; | |
| dontConfigure = true; | |
| dontBuild = true; | |
| installPhase = '' | |
| mkdir $out | |
| cp ${src}/mercurytcpclient $out | |
| ''; | |
| preFixup = let | |
| # Include dependencies here. | |
| libPath = lib.makeLibraryPath [ gcc-unwrapped ]; | |
| in '' | |
| patchelf \ | |
| --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | |
| --set-rpath "${libPath}" \ | |
| $out/mercurytcpclient | |
| ''; | |
| meta = with lib; { | |
| homepage = "https://www.algoseek.com/"; | |
| description = "a test client for connecting to algoseek"; | |
| # license = licenses.unfree; | |
| platforms = platforms.linux; | |
| # maintainers = [ your_name ]; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment