Add tentative for Ati version

This commit is contained in:
Guillaume Bouchard 2018-03-19 11:47:40 +01:00
parent d3d9f07d02
commit 078b69f2e2
2 changed files with 41 additions and 1 deletions

View File

@ -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
```

View File

@ -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
'';
}