2023-10-25 22:43:03 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libgcrypt
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, linuxHeaders ? stdenv.cc.libc.linuxHeaders
|
|
|
|
, sqlite
|
|
|
|
, util-linux
|
|
|
|
, testers
|
|
|
|
, duperemove
|
|
|
|
}:
|
2014-11-05 22:58:14 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "duperemove";
|
2023-11-25 12:28:52 +00:00
|
|
|
version = "0.14.1";
|
2014-11-05 22:58:14 +00:00
|
|
|
|
2015-07-02 10:26:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "markfasheh";
|
|
|
|
repo = "duperemove";
|
|
|
|
rev = "v${version}";
|
2023-11-25 12:28:52 +00:00
|
|
|
hash = "sha256-iMv80UKktYOhNfVA3mW6kKv8TwLZaP6MQt24t3Rchk4=";
|
2014-11-05 22:58:14 +00:00
|
|
|
};
|
|
|
|
|
2023-08-12 08:59:44 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace util.c --replace \
|
|
|
|
"lscpu" "${lib.getBin util-linux}/bin/lscpu"
|
|
|
|
'';
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2023-11-19 12:55:54 +00:00
|
|
|
buildInputs = [ libgcrypt glib linuxHeaders sqlite util-linux ];
|
2014-11-05 22:58:14 +00:00
|
|
|
|
2023-10-22 16:00:45 +00:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"VERSION=v${version}"
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = duperemove;
|
|
|
|
command = "duperemove --version";
|
|
|
|
version = "v${version}";
|
|
|
|
};
|
2014-11-05 22:58:14 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-11-05 22:58:14 +00:00
|
|
|
description = "A simple tool for finding duplicated extents and submitting them for deduplication";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/markfasheh/duperemove";
|
2024-04-26 11:35:31 +00:00
|
|
|
license = licenses.gpl2Only;
|
2016-05-09 17:28:24 +00:00
|
|
|
maintainers = with maintainers; [ bluescreen303 thoughtpolice ];
|
|
|
|
platforms = platforms.linux;
|
2023-11-09 09:35:26 +00:00
|
|
|
mainProgram = "duperemove";
|
2014-11-05 22:58:14 +00:00
|
|
|
};
|
|
|
|
}
|