Resolve data-file directories via environment variables so that Nix (and other non-FHS layouts) can point us at the right store paths.
| 25 | // Resolve data-file directories via environment variables so that Nix (and |
| 26 | // other non-FHS layouts) can point us at the right store paths. |
| 27 | QString hwdataPath(const QString &filename) { |
| 28 | QByteArray dir = qgetenv("HWDATA_DIR"); |
| 29 | if (!dir.isEmpty()) |
| 30 | return QString::fromUtf8(dir) + "/" + filename; |
| 31 | return QStringLiteral("/usr/share/hwdata/") + filename; |
| 32 | } |
| 33 | |
| 34 | QString libdrmPath(const QString &filename) { |
| 35 | QByteArray dir = qgetenv("LIBDRM_DIR"); |