2021-04-19 21:54:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, autoreconfHook
|
2024-06-15 09:08:01 +00:00
|
|
|
, makeWrapper
|
2021-04-19 21:54:39 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, ncurses
|
|
|
|
, parted
|
|
|
|
, pkg-config
|
2024-06-15 09:08:01 +00:00
|
|
|
, libconfig
|
|
|
|
, hdparm
|
|
|
|
, smartmontools
|
|
|
|
, dmidecode
|
2021-04-19 21:54:39 +00:00
|
|
|
}:
|
2018-06-11 09:41:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nwipe";
|
2024-06-15 09:08:01 +00:00
|
|
|
version = "0.37";
|
2021-04-19 21:54:39 +00:00
|
|
|
|
2018-06-11 09:41:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "martijnvanbrummelen";
|
|
|
|
repo = "nwipe";
|
|
|
|
rev = "v${version}";
|
2024-06-15 09:08:01 +00:00
|
|
|
sha256 = "sha256-0mBiWKkMV8i9n158k843caulF90k43ctpMvKhc4HZxY";
|
2018-06-11 09:41:59 +00:00
|
|
|
};
|
2021-04-19 21:54:39 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2024-06-15 09:08:01 +00:00
|
|
|
makeWrapper
|
2021-04-19 21:54:39 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
parted
|
2024-06-15 09:08:01 +00:00
|
|
|
libconfig
|
2021-04-19 21:54:39 +00:00
|
|
|
];
|
|
|
|
|
2024-06-15 09:08:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/nwipe \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ hdparm smartmontools dmidecode ]}
|
2021-04-19 21:54:39 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-15 09:08:01 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-06-11 09:41:59 +00:00
|
|
|
description = "Securely erase disks";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "nwipe";
|
2020-03-04 08:31:40 +00:00
|
|
|
homepage = "https://github.com/martijnvanbrummelen/nwipe";
|
2021-04-19 21:54:39 +00:00
|
|
|
license = licenses.gpl2Only;
|
2024-06-15 09:08:01 +00:00
|
|
|
maintainers = with maintainers; [ vifino woffs ];
|
2018-06-11 09:41:59 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|