Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Forked from SuzanneSoy/nixpatch.sh
Last active September 17, 2016 14:23
Show Gist options
  • Save cleverca22/1e2c36c5832efdbd5a0e06f38d2c080a to your computer and use it in GitHub Desktop.
Save cleverca22/1e2c36c5832efdbd5a0e06f38d2c080a to your computer and use it in GitHub Desktop.
{ runCommand, fetchurl, makeFontsConf, makeWrapper
, cairo, coreutils, fontconfig, freefont_ttf
, glib, gmp, gtk2, libffi, libjpeg, libpng
, libtool, mpfr, openssl, pango, poppler
, readline, sqlite
}:
let
fontsConf = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
libPath = stdenv.lib.makeLibraryPath [
cairo
fontconfig
glib
gmp
gtk2
libjpeg
libpng
mpfr
openssl
pango
poppler
readline
sqlite
];
in
runCommand "graket" { } ''
mkdir -p $out/bin
cp -vi ${./gracket} $out/bin/gracket
patchelf $out/bin/gracket --set-rpath "${libPath}" --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)";
'';
### Gives:
### these derivations will be built:
### /nix/store/34nc78kgk5b02iqh4sqpyy22zb28n7h8-patch-gracket.drv
### building path(s) ‘/nix/store/jrmh5fvcjsywijh0lgsvqv8xws0vqzwz-patch-gracket’
### unpacking sources
### variable $src or $srcs should point to the source
### builder for ‘/nix/store/34nc78kgk5b02iqh4sqpyy22zb28n7h8-patch-gracket.drv’ failed with exit code 1
### error: build of ‘/nix/store/34nc78kgk5b02iqh4sqpyy22zb28n7h8-patch-gracket.drv’ failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment