Files
nixpkgs/pkgs/by-name/sc/scalpel/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
stdenv,
autoconf,
automake,
libtool,
tre,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "scalpel";
version = "2.1";
src = fetchFromGitHub {
owner = "sleuthkit";
repo = "scalpel";
rev = "35e1367ef2232c0f4883c92ec2839273c821dd39";
hash = "sha256-0lqU1CAcWXNw9WFa29BXla1mvABlzWV+hcozZyfR0oE=";
};
nativeBuildInputs = [
autoconf
automake
libtool
];
buildInputs = [
tre
];
postPatch = ''
sed -i \
-e 's|#define\s*SCALPEL_DEFAULT_CONFIG_FILE\s.*"scalpel.conf"|#define SCALPEL_DEFAULT_CONFIG_FILE "${placeholder "out"}/share/scalpel/scalpel.conf"|' \
src/scalpel.h
'';
env.CXXFLAGS =
"-std=c++14" + lib.optionalString stdenv.cc.isClang " -Wno-error=reserved-user-defined-literal";
preConfigure = ''
./bootstrap
'';
configureFlags = [
"--with-pic"
];
postInstall = ''
install -Dm644 scalpel.conf -t $out/share/scalpel/
'';
meta = with lib; {
homepage = "https://github.com/sleuthkit/scalpel";
description = "Recover files based on their headers, footers and internal data structures, based on Foremost";
mainProgram = "scalpel";
maintainers = with maintainers; [ shard7 ];
platforms = platforms.unix;
license = with licenses; [ asl20 ];
};
})