nixpkgs/pkgs/tools/security/ssdeep/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

30 lines
806 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";
mainProgram = "ssdeep";
homepage = "http://www.ssdeep.sf.net";
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.thoughtpolice ];
};
}