about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-12-22 14:16:01 +0100
committerSefa Eyeoglu <contact@scrumplex.net>2023-12-22 14:16:01 +0100
commit941f937481dcd8c218d95d631b9ef7d845760044 (patch)
tree336b6eca95f5bd176e5c97f4051af52f9d8081b5 /pkgs/os-specific
parent95045fba9705238cf43338dc9dafb11676bd60c5 (diff)
hdparm: general improvements
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/hdparm/default.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/hdparm/default.nix b/pkgs/os-specific/linux/hdparm/default.nix
index eacce23bc4242..3e23e3a7da7b0 100644
--- a/pkgs/os-specific/linux/hdparm/default.nix
+++ b/pkgs/os-specific/linux/hdparm/default.nix
@@ -1,17 +1,18 @@
 { lib, stdenv, fetchurl }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "hdparm";
   version = "9.65";
 
   src = fetchurl {
-    url = "mirror://sourceforge/hdparm/hdparm-${version}.tar.gz";
+    url = "mirror://sourceforge/hdparm/hdparm-${finalAttrs.version}.tar.gz";
     sha256 = "sha256-0Ukp+RDQYJMucX6TgkJdR8LnFEI1pTcT1VqU995TWks=";
   };
 
-  preBuild = ''
-    makeFlagsArray=(sbindir=$out/sbin manprefix=$out)
-  '';
+  makeFlags = [
+    "sbindir=${placeholder "out"}/sbin"
+    "manprefix=${placeholder "out"}"
+  ];
 
   meta = with lib; {
     description = "A tool to get/set ATA/SATA drive parameters under Linux";
@@ -21,5 +22,4 @@ stdenv.mkDerivation rec {
     mainProgram = "hdparm";
     maintainers = [ ];
   };
-
-}
+})