15 setupPy = writeText "setup.py" ''
16 from setuptools import setup
27 python3Packages.buildPythonApplication rec {
28 pname = "onedrivegui";
31 src = fetchFromGitHub {
35 hash = "sha256-pcY1JOi74pePvkIMRuHv5mlE4F68NzuBLJTCtgjUFRw=";
43 propagatedBuildInputs = with python3Packages; [
48 # wrap manually to avoid having a bash script in $out/bin with a .py extension
49 dontWrapPythonPrograms = true;
51 doCheck = false; # No tests defined
52 pythonImportsCheck = [ "OneDriveGUI" ];
58 desktopName = "OneDriveGUI";
59 comment = "OneDrive GUI Client";
63 categories = [ "Utility" ];
68 # Patch OneDriveGUI.py so DIR_PATH points to shared files location
69 sed -i src/OneDriveGUI.py -e "s@^DIR_PATH =.*@DIR_PATH = '$out/share/OneDriveGUI'@"
70 cp ${setupPy} ${setupPy.name}
74 mkdir -p $out/share/OneDriveGUI
75 # we do not need the `ui` directory - only resources
76 cp -r src/resources $out/share/OneDriveGUI
77 install -Dm444 -t $/out/share/icons/hicolor/48x48/apps src/resources/images/OneDriveGUI.png
78 # we put our own executable wrapper in place instead
81 makeWrapper ${python3Packages.python.interpreter} $out/bin/onedrivegui \
82 --prefix PATH : ${lib.makeBinPath [ onedrive ]} \
83 --prefix PYTHONPATH : ${
84 python3Packages.makePythonPath (propagatedBuildInputs ++ [ (placeholder "out") ])
86 --add-flags $out/${python3Packages.python.sitePackages}/OneDriveGUI.py
90 homepage = "https://github.com/bpozdena/OneDriveGUI";
91 description = "Simple GUI for Linux OneDrive Client, with multi-account support";
92 mainProgram = "onedrivegui";
93 license = licenses.gpl3Only;
94 maintainers = with maintainers; [ chewblacka ];
95 platforms = platforms.linux;