|
Tags: Replaced Mobile edit Mobile web edit |
| Line 1: |
Line 1: |
| <syntaxhighlight lang="nix">
| |
| # mybinaryprogram.nix
| |
| with import <nixpkgs> {};
| |
| stdenv.mkDerivation rec {
| |
| name = "somename";
| |
| buildInputs = [ makeWrapper ];
| |
| buildPhase = "true";
| |
| libPath = lib.makeLibraryPath with xlibs;[ libXrandr libXinerama libXcursor ];
| |
| unpackPhase = "true";
| |
| installPhase = ''
| |
| mkdir -p $out/bin
| |
| cp ${./mybinaryprogram} $out/bin/mybinaryprogram
| |
| '';
| |
| postFixup = ''
| |
| patchelf \
| |
| --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
| |
| --set-rpath "${libPath}" \
| |
| $out/bin/mybinaryprogram
| |
| '';
| |
| }</syntaxhighlight>
| |
| This can be built with: | | This can be built with: |