lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

gam init at 6.22

Fixes #59781

+113
+73
pkgs/tools/admin/gam/default.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , python3 4 + }: 5 + 6 + python3.pkgs.buildPythonApplication rec { 7 + pname = "gam"; 8 + version = "6.22"; 9 + format = "other"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "GAM-team"; 13 + repo = "gam"; 14 + rev = "v${version}"; 15 + sha256 = "sha256-G/S1Rrm+suiy1CTTFLcBGt/QhARL7puHgR65nCxodH0="; 16 + }; 17 + 18 + sourceRoot = "source/src"; 19 + 20 + patches = [ 21 + # Also disables update check 22 + ./signal_files_as_env_vars.patch 23 + ]; 24 + 25 + propagatedBuildInputs = with python3.pkgs; [ 26 + distro 27 + filelock 28 + google-api-python-client 29 + google-auth 30 + google-auth-oauthlib 31 + passlib 32 + pathvalidate 33 + python-dateutil 34 + setuptools 35 + ]; 36 + 37 + # Use XDG-ish dirs for configuration. These would otherwise be in the gam 38 + # package. 39 + # 40 + # Using --run as `makeWapper` evaluates variables for --set and --set-default 41 + # at build time and then single quotes the vars in the wrapper, thus they 42 + # wouldn't get expanded. But using --run allows setting default vars that are 43 + # evaluated on run and not during build time. 44 + makeWrapperArgs = [ 45 + ''--run 'export GAMUSERCONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' '' 46 + ''--run 'export GAMSITECONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' '' 47 + ''--run 'export GAMCACHEDIR="''${XDG_CACHE_HOME:-$HOME/.cache}/gam"' '' 48 + ''--run 'export GAMDRIVEDIR="$PWD"' '' 49 + ]; 50 + 51 + installPhase = '' 52 + runHook preInstall 53 + mkdir -p $out/bin 54 + cp gam.py $out/bin/gam 55 + mkdir -p $out/lib/${python3.libPrefix}/site-packages 56 + cp -r gam $out/lib/${python3.libPrefix}/site-packages 57 + runHook postInstall 58 + ''; 59 + 60 + checkPhase = '' 61 + runHook preCheck 62 + ${python3.interpreter} -m unittest discover --pattern "*_test.py" --buffer 63 + runHook postCheck 64 + ''; 65 + 66 + meta = with lib; { 67 + description = "Command line management for Google Workspace"; 68 + homepage = "https://github.com/GAM-team/GAM/wiki"; 69 + license = licenses.asl20; 70 + maintainers = with maintainers; [ thanegill ]; 71 + }; 72 + 73 + }
+38
pkgs/tools/admin/gam/signal_files_as_env_vars.patch
··· 1 + diff --git a/gam/__init__.py b/gam/__init__.py 2 + index 1c187ce..b2de793 100755 3 + --- a/gam/__init__.py 4 + +++ b/gam/__init__.py 5 + @@ -549,22 +549,16 @@ def SetGlobalVariables(): 6 + _getOldEnvVar(GC_TLS_MIN_VERSION, 'GAM_TLS_MIN_VERSION') 7 + _getOldEnvVar(GC_TLS_MAX_VERSION, 'GAM_TLS_MAX_VERSION') 8 + _getOldEnvVar(GC_CA_FILE, 'GAM_CA_FILE') 9 + - _getOldSignalFile(GC_DEBUG_LEVEL, 10 + - 'debug.gam', 11 + - filePresentValue=4, 12 + - fileAbsentValue=0) 13 + - _getOldSignalFile(GC_NO_BROWSER, 'nobrowser.txt') 14 + - _getOldSignalFile(GC_NO_TDEMAIL, 'notdemail.txt') 15 + - _getOldSignalFile(GC_OAUTH_BROWSER, 'oauthbrowser.txt') 16 + + _getOldEnvVar(GC_DEBUG_LEVEL, 'GAM_DEBUG') 17 + + _getOldEnvVar(GC_NO_BROWSER, 'GAM_NO_BROWSER') 18 + + _getOldEnvVar(GC_NO_TDEMAIL, 'GAM_NO_TDEMAIL') 19 + + _getOldEnvVar(GC_OAUTH_BROWSER, 'GAM_OAUTH_BROWSER') 20 + # _getOldSignalFile(GC_NO_CACHE, u'nocache.txt') 21 + # _getOldSignalFile(GC_CACHE_DISCOVERY_ONLY, u'allcache.txt', filePresentValue=False, fileAbsentValue=True) 22 + - _getOldSignalFile(GC_NO_CACHE, 23 + - 'allcache.txt', 24 + - filePresentValue=False, 25 + - fileAbsentValue=True) 26 + - _getOldSignalFile(GC_NO_SHORT_URLS, 'noshorturls.txt') 27 + - _getOldSignalFile(GC_NO_UPDATE_CHECK, 'noupdatecheck.txt') 28 + - _getOldSignalFile(GC_ENABLE_DASA, FN_ENABLEDASA_TXT) 29 + + _getOldEnvVar(GC_NO_CACHE, 'GAM_NO_CACHE') 30 + + _getOldEnvVar(GC_NO_SHORT_URLS, 'GAM_NO_SHORT_URLS') 31 + + GC_Defaults[GC_NO_UPDATE_CHECK] = True 32 + + _getOldEnvVar(GC_ENABLE_DASA, FN_ENABLEDASA_TXT) 33 + # Assign directories first 34 + for itemName in GC_VAR_INFO: 35 + if GC_VAR_INFO[itemName][GC_VAR_TYPE] == GC_TYPE_DIRECTORY: 36 + -- 37 + 2.36.0 38 +
+2
pkgs/top-level/all-packages.nix
··· 1179 1179 inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa VideoToolbox; 1180 1180 }; 1181 1181 1182 + gam = callPackage ../tools/admin/gam { }; 1183 + 1182 1184 gfshare = callPackage ../tools/security/gfshare { }; 1183 1185 1184 1186 gh-cal = callPackage ../tools/misc/gh-cal {