2015-04-02 21:24:43 +00:00
|
|
|
{ stdenv, fetchurl, patchelf }:
|
2014-03-20 18:18:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ssdeep-${version}";
|
2015-07-20 18:52:06 +00:00
|
|
|
version = "2.13";
|
2014-03-20 18:18:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/ssdeep/${name}.tar.gz";
|
2015-07-20 18:52:06 +00:00
|
|
|
sha256 = "1igqy0j7jrklb8fdlrm6ald4cyl1fda5ipfl8crzyl6bax2ajk3f";
|
2014-03-20 18:18:51 +00:00
|
|
|
};
|
|
|
|
|
2017-05-16 14:35:52 +00:00
|
|
|
# Hack to avoid TMPDIR in RPATHs.
|
|
|
|
preFixup = ''rm -rf "$(pwd)" '';
|
|
|
|
|
2015-04-02 21:24:43 +00:00
|
|
|
# For some reason (probably a build system bug), the binary isn't
|
|
|
|
# properly linked to $out/lib to find libfuzzy.so
|
2015-10-28 17:53:03 +00:00
|
|
|
postFixup = stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
2015-04-02 21:24:43 +00:00
|
|
|
rp=$(patchelf --print-rpath $out/bin/ssdeep)
|
|
|
|
patchelf --set-rpath $rp:$out/lib $out/bin/ssdeep
|
|
|
|
'';
|
|
|
|
|
2014-03-20 18:18:51 +00:00
|
|
|
meta = {
|
|
|
|
description = "A program for calculating fuzzy hashes";
|
|
|
|
homepage = "http://www.ssdeep.sf.net";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2014-03-30 00:28:39 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2014-03-20 18:18:51 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|