nixpkgs/pkgs/tools/security/ssdeep/default.nix
Vladimír Čunát 3af97fc9ee
treewide: amend hacks of removing $(pwd)
The strip phase is using $TMPDIR now, so it would fail with:
 mktemp: failed to create file via template 'striperr.XXXXXX': No such file or directory
2023-08-05 09:26:04 +02:00

28 lines
778 B
Nix

{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "ssdeep";
version = "2.14.1";
src = fetchFromGitHub {
owner = "ssdeep-project";
repo = "ssdeep";
rev = "release-${version}";
sha256 = "1yx6yjkggshw5yl89m4kvyzarjdg2l3hs0bbjbrfzwp1lkfd8i0c";
};
nativeBuildInputs = [ autoreconfHook ];
# remove forbidden references to $TMPDIR
preFixup = lib.optionalString stdenv.isLinux ''
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$out"/bin/*
'';
meta = {
description = "A program for calculating fuzzy hashes";
homepage = "http://www.ssdeep.sf.net";
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.thoughtpolice ];
};
}