Add tentative for Ati version
This commit is contained in:
parent
d3d9f07d02
commit
078b69f2e2
|
@ -83,6 +83,14 @@ nix-build -A nixGLNvidiaBumblebee --argstr nvidiaVersion 390.25
|
|||
|
||||
(replace `390.25` with the host driver version gathered earlier.)
|
||||
|
||||
For Ati (untested):
|
||||
|
||||
```
|
||||
nix-build ./default.nix -A nixGLAti --argstr atiUrl "https://www2.ati.com/drivers/linux/radeon-crimson-15.12-15.302-151217a-297685e.zip" --argstr atiVersion "15.12"
|
||||
```
|
||||
|
||||
(replace the url and the version with the correct ones. At the time of this writting, I have no idea on how we can detect that, ati seems to have a weird file naming convention).
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
|
|
34
default.nix
34
default.nix
|
@ -1,5 +1,7 @@
|
|||
{ system ? builtins.currentSystem,
|
||||
nvidiaVersion ? null
|
||||
nvidiaVersion ? null,
|
||||
atiUrl ? null,
|
||||
atiVersion ? null
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -21,6 +23,18 @@ rec {
|
|||
useGLVND = 0;
|
||||
});
|
||||
|
||||
ati = (linuxPackages.ati_drivers_x11.override {
|
||||
libsOnly = true;
|
||||
kernel = null;
|
||||
}).overrideAttrs(oldAttrs : rec {
|
||||
name = "ati_drivers-${atiVersion}";
|
||||
src = fetchurl {
|
||||
url = atiUrl;
|
||||
sha256 = null;
|
||||
curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux+x86_64";
|
||||
};
|
||||
});
|
||||
|
||||
nixGLNvidiaBumblebee = runCommand "nixGLNvidiaBumblebee-${version}" {
|
||||
buildInputs = [ nvidiaLibsOnly bumblebee ];
|
||||
|
||||
|
@ -74,4 +88,22 @@ rec {
|
|||
|
||||
chmod u+x $out/bin/nixGLIntel
|
||||
'';
|
||||
|
||||
nixGLAti = runCommand "nixGLAti-${version}" {
|
||||
buildInputs = [ mesa_drivers ];
|
||||
|
||||
meta = with pkgs.stdenv.lib; {
|
||||
description = "A tool to launch OpenGL application on system other than NixOS - Ati version";
|
||||
homepage = "https://github.com/guibou/nixGL";
|
||||
};
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/nixGLAti << FOO
|
||||
#!/usr/bin/env sh
|
||||
export LD_LIBRARY_PATH=${ati}/lib
|
||||
"\$@"
|
||||
FOO
|
||||
|
||||
chmod u+x $out/bin/nixGLAti
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user