fixing nix-shell attempt 1
This commit is contained in:
parent
07e82d7bdf
commit
819627a5a5
3 changed files with 103 additions and 9 deletions
92
default.nix
Normal file
92
default.nix
Normal file
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
# qtx11extras,
|
||||
# qttools,
|
||||
# kglobalaccel,
|
||||
# kinit,
|
||||
# kwin,
|
||||
# kio,
|
||||
# kguiaddons,
|
||||
# kcoreaddons,
|
||||
# systemsettings,
|
||||
gcc,
|
||||
gnumake,
|
||||
clang,
|
||||
cmake,
|
||||
extra-cmake-modules,
|
||||
pkg-config,
|
||||
wrapQtAppsHook,
|
||||
qtbase,
|
||||
qt5Full,
|
||||
clang-tools,
|
||||
qttools,
|
||||
qtquickcontrols2,
|
||||
qtx11extras,
|
||||
qtmultimedia,
|
||||
kirigami2,
|
||||
ki18n,
|
||||
kcoreaddons,
|
||||
mpv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "Libre Presenter";
|
||||
version = "0.0.0";
|
||||
|
||||
nativeBuildInputs = [
|
||||
gcc
|
||||
gnumake
|
||||
clang
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
# gccStdenv
|
||||
# stdenv
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
clang-tools
|
||||
qt5Full
|
||||
qttools
|
||||
qtquickcontrols2
|
||||
qtx11extras
|
||||
qtmultimedia
|
||||
kirigami2
|
||||
ki18n
|
||||
kcoreaddons
|
||||
mpv
|
||||
# libsForQt5.kconfig
|
||||
# ffmpeg-full
|
||||
# yt-dlp
|
||||
];
|
||||
|
||||
# preConfigure = ''
|
||||
# # local modulepath=$(kf5-config --install module)
|
||||
# # local datapath=$(kf5-config --install data)
|
||||
# # local servicespath=$(kf5-config --install services)
|
||||
# # substituteInPlace CMakeLists.txt \
|
||||
# # --replace "\''${MODULEPATH}" "$out/''${modulepath#/nix/store/*/}" \
|
||||
# # --replace "\''${DATAPATH}" "$out/''${datapath#/nix/store/*/}"
|
||||
|
||||
# # substituteInPlace CMakeLists.txt \
|
||||
# # --replace "\''${MODULEPATH}" "$out/qt-5.15.3/plugins" \
|
||||
# # --replace "\''${DATAPATH}" "$out/share"
|
||||
# '';
|
||||
|
||||
# postConfigure = ''
|
||||
# substituteInPlace cmake_install.cmake \
|
||||
# --replace "${kdelibs4support}" "$out"
|
||||
|
||||
# '';
|
||||
|
||||
meta = with lib; {
|
||||
name = "Libre Presenter";
|
||||
description = "A church presentation software made with QT/QML";
|
||||
homepage = "";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ "chriscochrun" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
17
shell.nix
17
shell.nix
|
@ -16,7 +16,8 @@ mkShell {
|
|||
];
|
||||
|
||||
buildInputs = [
|
||||
qt5.qtbase
|
||||
clang-tools
|
||||
qt5.full
|
||||
qt5.qttools
|
||||
qt5.qtquickcontrols2
|
||||
qt5.qtx11extras
|
||||
|
@ -36,12 +37,12 @@ mkShell {
|
|||
|
||||
# This creates the proper qt env so that plugins are found right.
|
||||
shellHook = ''
|
||||
setQtEnvironment=$(mktemp --suffix .setQtEnvironment.sh)
|
||||
echo "shellHook: setQtEnvironment = $setQtEnvironment"
|
||||
makeWrapper "/bin/sh" "$setQtEnvironment" "''${qtWrapperArgs[@]}"
|
||||
sed "/^exec/d" -i "$setQtEnvironment"
|
||||
source "$setQtEnvironment"
|
||||
QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
||||
fish
|
||||
# setQtEnvironment=$(mktemp --suffix .setQtEnvironment.sh)
|
||||
# echo "shellHook: setQtEnvironment = $setQtEnvironment"
|
||||
# makeWrapper "/bin/sh" "$setQtEnvironment" "''${qtWrapperArgs[@]}"
|
||||
# sed "/^exec/d" -i "$setQtEnvironment"
|
||||
# source "$setQtEnvironment"
|
||||
# addToSearchPath QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
||||
# export QML2_IMPORT_PATH=${libsForQt5.kirigami2}/lib/${builtins.replaceStrings ["full-"] [""] qt5.full.name}/qml
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ static void connectToDatabase() {
|
|||
db.setHostName("localhost");
|
||||
db.setDatabaseName(dbName);
|
||||
db.setUserName("presenter");
|
||||
// TODO change password system before launch
|
||||
db.setPassword("i393jkf782djyr98302j");
|
||||
if (!db.open()) {
|
||||
qFatal("Cannot open database: %s", qPrintable(db.lastError().text()));
|
||||
|
@ -84,7 +85,7 @@ int main(int argc, char *argv[])
|
|||
#else
|
||||
QIcon::setFallbackThemeName("breeze");
|
||||
QQuickStyle::setStyle(QStringLiteral("org.kde.desktop"));
|
||||
QQuickStyle::setFallbackStyle(QStringLiteral("breeze"));
|
||||
QQuickStyle::setFallbackStyle(QStringLiteral("Default"));
|
||||
#endif
|
||||
|
||||
QGuiApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("system-config-display")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue