tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/hardware/raid/hpsa: init at 2.40
Volth
8 years ago
b998d8e8
f0f55ac6
+62
2 changed files
expand all
collapse all
unified
split
nixos
modules
hardware
raid
hpsa.nix
module-list.nix
+61
nixos/modules/hardware/raid/hpsa.nix
···
1
1
+
{ config, lib, pkgs, ... }:
2
2
+
3
3
+
with lib;
4
4
+
5
5
+
let
6
6
+
hpssacli = pkgs.stdenv.mkDerivation rec {
7
7
+
name = "hpssacli-${version}";
8
8
+
version = "2.40-13.0";
9
9
+
10
10
+
src = pkgs.fetchurl {
11
11
+
url = "http://downloads.linux.hpe.com/SDR/downloads/MCP/Ubuntu/pool/non-free/${name}_amd64.deb";
12
12
+
sha256 = "11w7fwk93lmfw0yya4jpjwdmgjimqxx6412sqa166g1pz4jil4sw";
13
13
+
};
14
14
+
15
15
+
nativeBuildInputs = [ pkgs.dpkg ];
16
16
+
17
17
+
unpackPhase = "dpkg -x $src ./";
18
18
+
19
19
+
installPhase = ''
20
20
+
mkdir -p $out/bin $out/share/doc $out/share/man
21
21
+
mv opt/hp/hpssacli/bld/{hpssascripting,hprmstr,hpssacli} $out/bin/
22
22
+
mv opt/hp/hpssacli/bld/*.{license,txt} $out/share/doc/
23
23
+
mv usr/man $out/share/
24
24
+
25
25
+
for file in $out/bin/*; do
26
26
+
chmod +w $file
27
27
+
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
28
28
+
--set-rpath ${lib.makeLibraryPath [ pkgs.stdenv.cc.cc ]} \
29
29
+
$file
30
30
+
done
31
31
+
'';
32
32
+
33
33
+
dontStrip = true;
34
34
+
35
35
+
meta = with lib; {
36
36
+
description = "HP Smart Array CLI";
37
37
+
homepage = http://downloads.linux.hpe.com/SDR/downloads/MCP/Ubuntu/pool/non-free/;
38
38
+
license = licenses.unfreeRedistributable;
39
39
+
platforms = [ "x86_64-linux" ];
40
40
+
maintainers = with maintainers; [ volth ];
41
41
+
};
42
42
+
};
43
43
+
in {
44
44
+
###### interface
45
45
+
46
46
+
options = {
47
47
+
hardware.raid.HPSmartArray = {
48
48
+
enable = mkEnableOption "HP Smart Array kernel modules and CLI utility";
49
49
+
};
50
50
+
};
51
51
+
52
52
+
###### implementation
53
53
+
54
54
+
config = mkIf config.hardware.raid.HPSmartArray.enable {
55
55
+
56
56
+
boot.initrd.kernelModules = [ "sg" ]; /* hpssacli wants it */
57
57
+
boot.initrd.availableKernelModules = [ "hpsa" ];
58
58
+
59
59
+
environment.systemPackages = [ hpssacli ];
60
60
+
};
61
61
+
}
+1
nixos/modules/module-list.nix
···
43
43
./hardware/nitrokey.nix
44
44
./hardware/opengl.nix
45
45
./hardware/pcmcia.nix
46
46
+
./hardware/raid/hpsa.nix
46
47
./hardware/usb-wwan.nix
47
48
./hardware/video/amdgpu.nix
48
49
./hardware/video/amdgpu-pro.nix