btrfs-assistant: fix runtime errors

This commit is contained in:
Austin Horstman 2024-06-13 19:05:28 -05:00
parent 31a6982b2b
commit dc2ccabad2
No known key found for this signature in database

View File

@ -34,16 +34,21 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
btrfs-progs
coreutils
qt6.qtbase
qt6.qtsvg
qt6.qttools
qt6.qtwayland
];
util-linux
] ++ lib.optionals enableSnapper [ snapper ];
prePatch = ''
substituteInPlace src/util/System.cpp \
--replace '/bin/bash' "${lib.getExe bash}"
substituteInPlace src/main.cpp \
--replace-fail 'if (!qEnvironmentVariableIsEmpty("DISPLAY"))' ' if(!qEnvironmentVariableIsEmpty("DISPLAY") || !qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY"))'
''
+ lib.optionalString enableSnapper ''
substituteInPlace src/main.cpp \