tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos opengl: add extraPackages and extraPackages32
Nikolay Amiantov
10 years ago
1ae1791e
768f7d19
+32
-4
1 changed file
expand all
collapse all
unified
split
nixos
modules
hardware
opengl.nix
+32
-4
nixos/modules/hardware/opengl.nix
···
10
10
11
11
videoDrivers = config.services.xserver.videoDrivers;
12
12
13
13
-
makePackage = p: p.buildEnv {
13
13
+
makePackage = p: pkgs.buildEnv {
14
14
name = "mesa-drivers+txc-${p.mesa_drivers.version}";
15
15
paths =
16
16
[ p.mesa_drivers
17
17
p.mesa_noglu # mainly for libGL
18
18
(if cfg.s3tcSupport then p.libtxc_dxtn else p.libtxc_dxtn_s2tc)
19
19
];
20
20
+
};
21
21
+
22
22
+
package = pkgs.buildEnv {
23
23
+
name = "opengl-drivers";
24
24
+
paths = [ cfg.package ] ++ cfg.extraPackages;
25
25
+
};
26
26
+
27
27
+
package32 = pkgs.buildEnv {
28
28
+
name = "opengl-drivers-32bit";
29
29
+
paths = [ cfg.package32 ] ++ cfg.extraPackages32;
20
30
};
21
31
22
32
in
···
75
85
internal = true;
76
86
description = ''
77
87
The package that provides the 32-bit OpenGL implementation on
78
78
-
64-bit systems. Used when <option>driSupport32Bit</option> is
88
88
+
64-bit systems. Used when <option>driSupport32Bit</option> is
89
89
+
set.
90
90
+
'';
91
91
+
};
92
92
+
93
93
+
hardware.opengl.extraPackages = mkOption {
94
94
+
type = types.listOf types.package;
95
95
+
default = [];
96
96
+
description = ''
97
97
+
Additional packages to add to OpenGL drivers.
98
98
+
'';
99
99
+
};
100
100
+
101
101
+
hardware.opengl.extraPackages32 = mkOption {
102
102
+
type = types.listOf types.package;
103
103
+
default = [];
104
104
+
description = ''
105
105
+
Additional packages to add to 32-bit OpenGL drivers on
106
106
+
64-bit systems. Used when <option>driSupport32Bit</option> is
79
107
set.
80
108
'';
81
109
};
···
91
119
92
120
system.activationScripts.setup-opengl =
93
121
''
94
94
-
ln -sfn ${cfg.package} /run/opengl-driver
122
122
+
ln -sfn ${package} /run/opengl-driver
95
123
${if pkgs.stdenv.isi686 then ''
96
124
ln -sfn opengl-driver /run/opengl-driver-32
97
125
'' else if cfg.driSupport32Bit then ''
98
98
-
ln -sfn ${cfg.package32} /run/opengl-driver-32
126
126
+
ln -sfn ${package32} /run/opengl-driver-32
99
127
'' else ''
100
128
rm -f /run/opengl-driver-32
101
129
''}