2024-03-17 18:48:49 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2024-06-05 09:23:12 +00:00
|
|
|
clan-app,
|
2024-03-17 18:48:49 +00:00
|
|
|
mkShell,
|
|
|
|
ruff,
|
|
|
|
desktop-file-utils,
|
|
|
|
xdg-utils,
|
|
|
|
mypy,
|
|
|
|
python3,
|
2024-03-24 22:36:00 +00:00
|
|
|
gtk4,
|
|
|
|
libadwaita,
|
2024-05-18 09:56:35 +00:00
|
|
|
webview-ui,
|
2024-03-17 18:48:49 +00:00
|
|
|
}:
|
2024-02-29 15:46:09 +00:00
|
|
|
|
2024-03-24 22:36:00 +00:00
|
|
|
let
|
|
|
|
devshellTestDeps =
|
2024-06-05 09:23:12 +00:00
|
|
|
clan-app.externalTestDeps
|
2024-03-24 22:36:00 +00:00
|
|
|
++ (with python3.pkgs; [
|
|
|
|
rope
|
2024-02-29 15:46:09 +00:00
|
|
|
mypy
|
2024-03-24 22:36:00 +00:00
|
|
|
ipdb
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
pip
|
|
|
|
]);
|
|
|
|
in
|
|
|
|
mkShell {
|
2024-06-05 09:23:12 +00:00
|
|
|
inherit (clan-app) nativeBuildInputs;
|
2024-03-24 22:36:00 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
ruff
|
|
|
|
gtk4.dev # has the demo called 'gtk4-widget-factory'
|
2024-02-29 15:46:09 +00:00
|
|
|
libadwaita.devdoc # has the demo called 'adwaita-1-demo'
|
2024-03-24 22:36:00 +00:00
|
|
|
]
|
|
|
|
++ devshellTestDeps
|
|
|
|
|
|
|
|
# Dependencies for testing for linux hosts
|
|
|
|
++ (lib.optionals stdenv.isLinux [
|
|
|
|
xdg-utils # install desktop files
|
|
|
|
desktop-file-utils # verify desktop files
|
|
|
|
]);
|
|
|
|
|
2024-04-23 16:55:00 +00:00
|
|
|
PYTHONBREAKPOINT = "ipdb.set_trace";
|
|
|
|
|
2024-03-24 22:36:00 +00:00
|
|
|
shellHook = ''
|
2024-03-24 23:32:03 +00:00
|
|
|
export GIT_ROOT=$(git rev-parse --show-toplevel)
|
2024-06-05 09:23:12 +00:00
|
|
|
export PKG_ROOT=$GIT_ROOT/pkgs/clan-app
|
2024-03-24 23:32:03 +00:00
|
|
|
|
2024-06-05 09:23:12 +00:00
|
|
|
# Add clan-app command to PATH
|
2024-03-24 23:32:03 +00:00
|
|
|
export PATH="$PKG_ROOT/bin":"$PATH"
|
2024-03-24 22:52:30 +00:00
|
|
|
|
|
|
|
# Add clan-cli to the python path so that we can import it without building it in nix first
|
2024-03-24 23:32:03 +00:00
|
|
|
export PYTHONPATH="$GIT_ROOT/pkgs/clan-cli":"$PYTHONPATH"
|
2024-05-18 09:56:35 +00:00
|
|
|
|
|
|
|
# Add the webview-ui to the .webui directory
|
2024-06-05 09:23:12 +00:00
|
|
|
rm -rf ./clan_app/.webui/*
|
|
|
|
mkdir -p ./clan_app/.webui
|
|
|
|
cp -a ${webview-ui}/lib/node_modules/@clan/webview-ui/dist/* ./clan_app/.webui
|
|
|
|
chmod -R +w ./clan_app/.webui
|
2024-03-24 22:36:00 +00:00
|
|
|
'';
|
|
|
|
}
|