nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 pname = "sg3_utils";
9 version = "1.48";
10
11 src = fetchurl {
12 url = "https://sg.danny.cz/sg/p/sg3_utils-${finalAttrs.version}.tgz";
13 sha256 = "sha256-1itsPPIDkPpzVwRDkAhBZtJfHZMqETXEULaf5cKD13M=";
14 };
15
16 postPatch = ''
17 substituteInPlace scripts/rescan-scsi-bus.sh \
18 --replace-fail '/usr/bin/sg_' "$out/bin/sg_"
19 '';
20
21 meta = {
22 homepage = "https://sg.danny.cz/sg/";
23 changelog = "https://sg.danny.cz/sg/p/sg3_utils.ChangeLog";
24 description = "Utilities that send SCSI commands to devices";
25 platforms = lib.platforms.linux;
26 license = with lib.licenses; [
27 bsd2
28 gpl2Plus
29 ];
30 };
31})