1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pythonOlder
6, importlib-metadata
7, packaging
8, pyxdg
9}:
10
11buildPythonPackage rec {
12 pname = "show-in-file-manager";
13 version = "1.1.4";
14
15 src = fetchPypi {
16 inherit pname version;
17 hash = "sha256-FdFuSodbniF7A40C8CnDgAxKatZF4/c8nhB+omurOts=";
18 };
19
20 propagatedBuildInputs = [
21 packaging
22 ]
23 ++ lib.optional (stdenv.isLinux) pyxdg
24 ++ lib.optional (pythonOlder "3.8") importlib-metadata;
25
26 meta = with lib; {
27 homepage = "https://github.com/damonlynch/showinfilemanager";
28 description = "Open the system file manager and select files in it";
29 longDescription = ''
30 Show in File Manager is a Python package to open the system file
31 manager and optionally select files in it. The point is not to
32 open the files, but to select them in the file manager, thereby
33 highlighting the files and allowing the user to quickly do
34 something with them.
35 '';
36 license = licenses.mit;
37 maintainers = with maintainers; [ ];
38 };
39}