summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/hd/hdapsd/package.nix
blob: c0411c5e541d85fa86ba6e30ace55506158e25ec (plain)
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
{
  lib,
  stdenv,
  fetchurl,
  pkg-config,
  udevCheckHook,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "hdapsd";
  version = "20250908";

  src = fetchurl {
    url = "https://github.com/linux-thinkpad/hdapsd/releases/download/${finalAttrs.version}/hdapsd-${finalAttrs.version}.tar.gz";
    hash = "sha256-qENcOFJ9x5CkN72ZkTx/OL+gpwAYJlJomKvAjTklDYQ=";
  };

  nativeBuildInputs = [
    pkg-config
    udevCheckHook
  ];

  doInstallCheck = true;

  postInstall = builtins.readFile ./postInstall.sh;

  meta = {
    description = "Hard Drive Active Protection System Daemon";
    mainProgram = "hdapsd";
    homepage = "https://github.com/linux-thinkpad/hdapsd";
    license = lib.licenses.gpl2Plus;
    platforms = lib.platforms.linux;
  };
})