Compare commits

..

3 Commits

Author SHA1 Message Date
Guillaume Bouchard
76e4820d8a
Update default.nix 2020-10-05 13:35:30 +02:00
Suzanne Soy
8d894a5682 Typos 2020-10-05 00:44:04 +01:00
Suzanne Soy
0c97096826
Typos 2020-10-05 00:42:20 +01:00
6 changed files with 38 additions and 131 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
/result

View File

@ -118,7 +118,7 @@ VkPhysicalDeviceProperties:
```bash
building '/nix/store/ijs5h6h07faai0k74diiy5b2xlxh891g-auto-detect-nvidia.drv'...
pcregrep: Failed to open /proc/driver/nvidia/ersion: No such file or directory
pcregrep: Failed to open /proc/driver/nvidia/version: No such file or directory
builder for '/nix/store/ijs5h6h07faai0k74diiy5b2xlxh891g-auto-detect-nvidia.drv' failed with exit code 2
error: build of '/nix/store/ijs5h6h07faai0k74diiy5b2xlxh891g-auto-detect-nvidia.drv' faile
```

29
default.nix Normal file
View File

@ -0,0 +1,29 @@
{ ## Nvidia informations.
# Version of the system kernel module. Let it to null to enable auto-detection.
nvidiaVersion ? null,
# Hash of the Nvidia driver .run file. null is fine, but fixing a value here
# will be more reproducible and more efficient.
nvidiaHash ? null,
# Alternatively, you can pass a path that points to a nvidia version file
# and let nixGL extract the version from it. That file must be a copy of
# /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
# https://github.com/NixOS/nix/issues/3539 ).
nvidiaVersionFile ? null,
# Enable 32 bits driver
# This is on by default, you can switch it to off if you want to reduce a
# bit the size of nixGL closure.
enable32bits ? true,
# Make sure to enable config.allowUnfree to the instance of nixpkgs to be
# able to access the nvidia drivers.
pkgs ? import <nixpkgs> {
config = { allowUnfree = true; };
}
}:
pkgs.callPackage ./nixGL.nix {
inherit
nvidiaVersion
nvidiaVersionFile
nvidiaHash
enable32bits
;
}

View File

@ -1,72 +0,0 @@
{
"nodes": {
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1598695561,
"narHash": "sha256-gyH/5j+h/nWw0W8AcR2WKvNBUsiQ7QuxqSJNXAwV+8E=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "1705b4a26fbf065d9574dce47a94e8c7c79e052f",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1604964115,
"narHash": "sha256-ANcswniHS4eYeMNyCGdiG3z0M35vEyvWoCsdLnTvObA=",
"owner": "NixOS",
"repo": "nix",
"rev": "0ed7c957bed18d963df65d55f0c0ffc79dee656d",
"type": "github"
},
"original": {
"id": "nix",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1602702596,
"narHash": "sha256-fqJ4UgOb4ZUnCDIapDb4gCrtAah5Rnr2/At3IzMitig=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad0d20345219790533ebe06571f82ed6b034db31",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-20.09-small",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"narHash": "sha256-wLDweKqbmufa2wonCKBf4Wfl8I0eS1CGS7WdR5tPHKo=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/60330b60655b3fa3a18624bdd7069855bb37af99.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/60330b60655b3fa3a18624bdd7069855bb37af99.tar.gz"
}
},
"root": {
"inputs": {
"nix": "nix",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,49 +0,0 @@
{
description = "";
inputs = {
nixpkgs.url = https://github.com/NixOS/nixpkgs/archive/60330b60655b3fa3a18624bdd7069855bb37af99.tar.gz;
};
outputs = { nixpkgs, nix, self, ... }@inputs : {
defaultPackage.x86_64-linux =
let pkgs = import nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; }; in
(pkgs.callPackage ./nixGL.nix {
nvidiaVersionFile = null;
nvidiaVersion = "455.28"; nvidiaHash = "03ysf61qrb272yqkn7bhn9d65lcfhmqc2c0dbh5prp5f2ndlkqg4";
# nvidiaVersion = "455.23.04"; nvidiaHash = "0rvbb9s4ijb0gyiscd93chbgim4lqmy4ksfy15b4abf078qk7q4g";
# …
enable32bits = true;
}).nixGLIntel; # nixGLNvidia;
# nixpkgs.stdenv.mkDerivation {
# builsInputs = [];
# { ## Nvidia informations.
# # Version of the system kernel module. Let it to null to enable auto-detection.
# nvidiaVersion ? null,
# # Hash of the Nvidia driver .run file. null is fine, but fixing a value here
# # will be more reproducible and more efficient.
# nvidiaHash ? null,
# # Alternatively, you can pass a path that points to a nvidia version file
# # and let nixGL extract the version from it. That file must be a copy of
# # /proc/driver/nvidia/version. Nix doesn't like zero-sized files (see
# # https://github.com/NixOS/nix/issues/3539 ).
# nvidiaVersionFile ? null,
# # Enable 32 bits driver
# # This is one by default, you can switch it to off if you want to reduce a
# # bit the size of nixGL closure.
# enable32bits ? true,
# # Make sure to enable config.allowUnfree to the instance of nixpkgs to be
# # able to access the nvidia drivers.
# pkgs ? import <nixpkgs> {
# config = { allowUnfree = true; };
# }
# }:
# pkgs.callPackage ./nixGL.nix {
# inherit
# nvidiaVersion
# nvidiaVersionFile
# nvidiaHash
# enable32bits
# ;
# };
# };
};
}

View File

@ -179,14 +179,14 @@ in
};
nixGLCommon = nixGL:
runCommand "nixGLCommon" {
buildInuts = [nixGL];
}
''
mkdir -p "$out/bin"
# star because nixGLNvidia... have version prefixed name
cp ${nixGL}/bin/* "$out/bin/nixGL";
'';
runCommand "nixGLCommon" {
buildInuts = [nixGL];
}
''
mkdir -p "$out/bin"
# star because nixGLNvidia... have version prefixed name
cp ${nixGL}/bin/* "$out/bin/nixGL";
'';
# The output derivation contains nixGL which point either to
# nixGLNvidia or nixGLIntel using an heuristic.