Skip to content

Instantly share code, notes, and snippets.

@rasendubi
Created February 4, 2017 13:51
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 rasendubi/98bce71ed747ef41cb4f18774ef4dbf9 to your computer and use it in GitHub Desktop.
Save rasendubi/98bce71ed747ef41cb4f18774ef4dbf9 to your computer and use it in GitHub Desktop.
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
stdenv.mkDerivation {
name = "whatpulse-2.7.1";
src = pkgs.fetchurl {
url = http://static.whatpulse.org/files/whatpulse-linux-debian-64bit-2.7.1.tar.gz;
sha256 = "0631mnvwz5py1lp4jxdkb4sa51krljiv1w27hcrxhgqzjxba1sq7";
};
sourceRoot = ".";
dontStrip = true;
preFixup = let deps = [ qt4 stdenv.cc.cc stdenv.glibc sqlite openssl xorg.libX11 ]; in ''
patchelf --set-interpreter ${stdenv.lib.getLib pkgs.stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
--set-rpath ${stdenv.lib.makeLibraryPath deps} \
$out/bin/whatpulse
patchelf --add-needed libcrypto.so \
$out/bin/whatpulse
'';
installPhase = ''
mkdir -p $out/bin
cp whatpulse $out/bin
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment