summary refs log tree commit diff
path: root/pkgs/os-specific/linux/hd-idle/default.nix
blob: 3e4b08151463cecbbc30a8bacacc1e3825460504 (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
{ lib, stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "hd-idle-1.05";

  src = fetchurl {
    url = "mirror://sourceforge/project/hd-idle/${name}.tgz";
    sha256 = "031sm996s0rhy3z91b9xvyimsj2yd2fhsww2al2hxda5s5wzxzjf";
  };

  prePatch = ''
    substituteInPlace Makefile \
      --replace "-g root -o root" ""
  '';

  installFlags = [ "TARGET_DIR=$(out)" ];

  meta = with lib; {
    description = "Spins down external disks after a period of idle time";
    homepage = "http://hd-idle.sourceforge.net/";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = [ maintainers.rycee ];
  };
}