Skip to content

Commit 30a81e8

Browse files
committed
Split nix file, and fix GLX error
1 parent b2663ba commit 30a81e8

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

default.nix

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
11
with import <nixpkgs> {};
22

3-
stdenv.mkDerivation {
4-
name = "QSerial";
5-
version = "1.1";
6-
7-
src = ./.;
8-
9-
nativeBuildInputs = [
10-
cmake
11-
pkgconfig
12-
libsForQt5.wrapQtAppsHook
13-
];
14-
15-
buildInputs = [
16-
libsForQt5.qt5.qtbase
17-
libsForQt5.qt5.qtserialport
18-
libsForQt5.qt5.qtwebengine
19-
libusb1
20-
];
21-
}
22-
3+
libsForQt5.callPackage ./qserial.nix { }

qserial.nix

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{ stdenv, qtbase, qtserialport, qtwebengine, wrapQtAppsHook, cmake, pkgconfig, libusb1 }:
2+
3+
stdenv.mkDerivation {
4+
name = "QSerial";
5+
version = "1.1";
6+
7+
src = ./.;
8+
9+
nativeBuildInputs = [
10+
cmake
11+
pkgconfig
12+
wrapQtAppsHook
13+
];
14+
15+
buildInputs = [
16+
qtbase
17+
qtserialport
18+
qtwebengine
19+
libusb1
20+
];
21+
22+
# https://github.com/NixOS/nixpkgs/issues/66755#issuecomment-657305962
23+
# Fix "Could not initialize GLX" error
24+
postInstall = ''
25+
wrapProgram "$out/bin/QSerial" --set QT_XCB_GL_INTEGRATION none
26+
'';
27+
}
28+

0 commit comments

Comments
 (0)