+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanUpdate and fix lints387acb1

main
1.8 KiB82 linesraw
1{ stdenv, lib, python3, fetchFromGitHub,
2  makeDesktopItem, copyDesktopItems, writeShellScript, ... }: let
3  # TODO: simplify with wrapProgram
4  wrapper = writeShellScript "eontimer-wrapper" ''
5    export QT_QPA_PLATFORM=xcb
6    exec @out@/bin/EonTimer
7  '';
8in python3.pkgs.buildPythonApplication rec {
9  pname = "eontimer";
10  version = "3.0.0-rc.6";
11  pyproject = true;
12
13  src = fetchFromGitHub {
14    owner = "DasAmpharos";
15    repo = "EonTimer";
16    rev = version;
17    hash = "sha256-+XN/VGGlEg2gVncRZrWDOZ2bfxt8xyIu22F2wHlG6YI=";
18  };
19
20  build-system = [
21    python3.pkgs.setuptools
22    python3.pkgs.wheel
23  ];
24
25  dependencies = with python3.pkgs; [
26    altgraph
27    certifi
28    charset-normalizer
29    idna
30    libsass
31    macholib
32    packaging
33    pillow
34    pipdeptree
35    platformdirs
36    pyinstaller
37    pyinstaller-hooks-contrib
38    pyside6
39    requests
40    setuptools
41    shiboken6
42    urllib3
43  ];
44
45  nativeBuildInputs = [
46    python3.pkgs.pyinstaller
47    copyDesktopItems
48  ];
49
50  buildPhase = ''
51    runHook preBuild
52
53    pyinstaller --clean --noconfirm EonTimer.spec
54
55    runHook postBuild
56  '';
57
58  installPhase = ''
59    runHook preInstall
60
61    mkdir -p $out/bin
62    cp dist/EonTimer $out/bin/
63    mkdir -p $out/share/icons/hicolor/scalable/apps
64    cp $src/docs/icon.svg $out/share/icons/hicolor/scalable/apps/eontimer.svg
65    install -Dm755 -T ${wrapper} $out/bin/eontimer
66    substituteInPlace $out/bin/eontimer --subst-var out
67
68    runHook postInstall
69  '';
70
71  desktopItems = [
72    (makeDesktopItem { name = pname; desktopName = "EonTimer"; exec = pname; icon = "eontimer"; })
73  ];
74
75  meta = {
76    description = "Pokémon RNG Timer";
77    homepage = "https://github.com/DasAmpharos/EonTimer";
78    license = lib.licenses.mit;
79    broken = stdenv.hostPlatform.isDarwin;
80  };
81}
82