flake: factor out Qt paths into exported variable

Signed-off-by: Florian Agbuya <fa@m-labs.ph>
This commit is contained in:
Florian Agbuya 2024-11-25 11:38:58 +08:00 committed by Sébastien Bourdeauducq
parent fd664e82d1
commit 145a973213
1 changed files with 8 additions and 3 deletions

View File

@ -49,6 +49,11 @@
artiqVersion = (builtins.toString artiqVersionMajor) + "." + (builtins.toString artiqVersionMinor) + "+" + artiqVersionId + ".beta"; artiqVersion = (builtins.toString artiqVersionMajor) + "." + (builtins.toString artiqVersionMinor) + "+" + artiqVersionId + ".beta";
artiqRev = self.sourceInfo.rev or "unknown"; artiqRev = self.sourceInfo.rev or "unknown";
qtPaths = {
QT_PLUGIN_PATH = "${pkgs.qt6.qtbase}/${pkgs.qt6.qtbase.dev.qtPluginPrefix}:${pkgs.qt6.qtsvg}/${pkgs.qt6.qtbase.dev.qtPluginPrefix}";
QML2_IMPORT_PATH = "${pkgs.qt6.qtbase}/${pkgs.qt6.qtbase.dev.qtQmlPrefix}";
};
rust = pkgs.rust-bin.nightly."2021-09-01".default.override { rust = pkgs.rust-bin.nightly."2021-09-01".default.override {
extensions = [ "rust-src" ]; extensions = [ "rust-src" ];
targets = [ ]; targets = [ ];
@ -414,7 +419,7 @@
}; };
}; };
inherit makeArtiqBoardPackage openocd-bscanspi-f; inherit qtPaths makeArtiqBoardPackage openocd-bscanspi-f;
defaultPackage.x86_64-linux = pkgs.python3.withPackages(ps: [ packages.x86_64-linux.artiq ]); defaultPackage.x86_64-linux = pkgs.python3.withPackages(ps: [ packages.x86_64-linux.artiq ]);
@ -446,8 +451,8 @@
]; ];
shellHook = '' shellHook = ''
export LIBARTIQ_SUPPORT=`libartiq-support` export LIBARTIQ_SUPPORT=`libartiq-support`
export QT_PLUGIN_PATH=${pkgs.qt6.qtbase}/${pkgs.qt6.qtbase.dev.qtPluginPrefix}:${pkgs.qt6.qtsvg}/${pkgs.qt6.qtbase.dev.qtPluginPrefix} export QT_PLUGIN_PATH=${qtPaths.QT_PLUGIN_PATH}
export QML2_IMPORT_PATH=${pkgs.qt6.qtbase}/${pkgs.qt6.qtbase.dev.qtQmlPrefix} export QML2_IMPORT_PATH=${qtPaths.QML2_IMPORT_PATH}
export PYTHONPATH=`git rev-parse --show-toplevel`:$PYTHONPATH export PYTHONPATH=`git rev-parse --show-toplevel`:$PYTHONPATH
''; '';
}; };