sg3_utils: fix hard coded paths in scripts

This commit is contained in:
Eric Helgeson
2026-01-01 15:04:31 -06:00
parent 83a105a81b
commit f94bbf8854
+9 -3
View File
@@ -4,17 +4,23 @@
fetchurl,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "sg3_utils";
version = "1.48";
src = fetchurl {
url = "https://sg.danny.cz/sg/p/sg3_utils-${version}.tgz";
url = "https://sg.danny.cz/sg/p/sg3_utils-${finalAttrs.version}.tgz";
sha256 = "sha256-1itsPPIDkPpzVwRDkAhBZtJfHZMqETXEULaf5cKD13M=";
};
postPatch = ''
substituteInPlace scripts/rescan-scsi-bus.sh \
--replace-fail '/usr/bin/sg_' "$out/bin/sg_"
'';
meta = {
homepage = "https://sg.danny.cz/sg/";
changelog = "https://sg.danny.cz/sg/p/sg3_utils.ChangeLog";
description = "Utilities that send SCSI commands to devices";
platforms = lib.platforms.linux;
license = with lib.licenses; [
@@ -22,4 +28,4 @@ stdenv.mkDerivation rec {
gpl2Plus
];
};
}
})