6 python3.pkgs.buildPythonApplication rec {
11 src = fetchFromGitHub {
14 rev = "refs/tags/v${version}";
15 sha256 = "sha256-AIaPzYavbBlJyi9arZN8HTmUXM7Tef0SIfE07PmV9Oo=";
18 sourceRoot = "${src.name}/src";
20 propagatedBuildInputs = with python3.pkgs; [
25 google-api-python-client
36 # Use XDG-ish dirs for configuration. These would otherwise be in the gam
39 # Using --run as `makeWapper` evaluates variables for --set and --set-default
40 # at build time and then single quotes the vars in the wrapper, thus they
41 # wouldn't get expanded. But using --run allows setting default vars that are
42 # evaluated on run and not during build time.
44 ''--run 'export GAMUSERCONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' ''
45 ''--run 'export GAMSITECONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' ''
46 ''--run 'export GAMCACHEDIR="''${XDG_CACHE_HOME:-$HOME/.cache}/gam"' ''
47 ''--run 'export GAMDRIVEDIR="$PWD"' ''
53 cp gam.py $out/bin/gam
54 mkdir -p $out/${python3.sitePackages}
55 cp -r gam $out/${python3.sitePackages}
61 ${python3.interpreter} -m unittest discover --pattern "*_test.py" --buffer
66 description = "Command line management for Google Workspace";
68 homepage = "https://github.com/GAM-team/GAM/wiki";
69 changelog = "https://github.com/GAM-team/GAM/releases/tag/v${version}";
70 license = licenses.asl20;
71 maintainers = with maintainers; [ thanegill ];