summary refs log tree commit diff
path: root/pkgs/tools/filesystems/wipefreespace/default.nix
blob: 03adc070c0ef1ee41a4ad06d72c4aab196cba2c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ stdenv
, lib
, fetchurl
, e2fsprogs
, ntfs3g
, xfsprogs
, reiser4progs
, libaal
, jfsutils
, libuuid
, texinfo
}:

stdenv.mkDerivation rec {
  pname = "wipefreespace";
  version = "2.5";

  src = fetchurl {
    url = "mirror://sourceforge/project/wipefreespace/wipefreespace/${version}/wipefreespace-${version}.tar.gz";
    hash = "sha256-wymV6G4Et5TCoIztZfdb3xuzjdBHFyB5OmI4EcsJKwQ=";
  };

  nativeBuildInputs = [
    texinfo
  ];

  # missed: Reiser3 FAT12/16/32 MinixFS HFS+ OCFS
  buildInputs = [
    e2fsprogs
    ntfs3g
    xfsprogs
    reiser4progs
    libaal
    jfsutils
    libuuid
  ];

  strictDeps = true;

  preConfigure = ''
    export PATH=$PATH:${xfsprogs}/bin
    export CFLAGS=-I${jfsutils}/include
    export LDFLAGS="-L${jfsutils}/lib -L${reiser4progs}/lib"
  '';

  meta = with lib; {
    description = "A program which will securely wipe the free space";
    homepage = "https://wipefreespace.sourceforge.io";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ catap ];
  };
}