From: Scott Worley Date: Tue, 2 Jun 2020 18:37:37 +0000 (-0700) Subject: Don't depend upon xdg X-Git-Tag: 1.3 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/3603dde2e015c340cac1a2f1a0f3d35d44c51c98?ds=inline Don't depend upon xdg It's not yet available in a stable release branch of nixpkgs. We don't want to force folks to use unstable to use pinch. Revert this commit after 20.09 is released and everyone's had time to upgrade. --- diff --git a/pinch.py b/pinch.py index 732a91f..003ee70 100644 --- a/pinch.py +++ b/pinch.py @@ -25,7 +25,17 @@ from typing import ( Tuple, ) -import xdg +# Use xdg module when it's less painful to have as a dependency + + +class XDG(types.SimpleNamespace): + XDG_CACHE_HOME: str + + +xdg = XDG( + XDG_CACHE_HOME=os.getenv( + 'XDG_CACHE_HOME', + os.path.expanduser('~/.cache'))) Digest16 = NewType('Digest16', str) diff --git a/shell.nix b/shell.nix index 11e4f03..b408ea4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ { pkgs ? import { } }: pkgs.mkShell rec { doCheck = true; - buildInputs = with pkgs; [ (python3.withPackages (ps: with ps; [ xdg ])) ]; + buildInputs = with pkgs; [ python3 ]; checkInputs = with pkgs; [ mypy python3Packages.autopep8