summaryrefslogtreecommitdiff
path: root/pkgs/by-name/do/dosage-tracker/package.nix
blob: f31b2603c289cfb8a27c5fd5d3e4b1a960b9e4d7 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  lib,
  stdenv,
  blueprint-compiler,
  desktop-file-utils,
  fetchFromGitHub,
  gjs,
  glib,
  gtk4,
  libadwaita,
  libportal,
  meson,
  ninja,
  nix-update-script,
  wrapGAppsHook4,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "dosage";
  version = "1.9.9";

  src = fetchFromGitHub {
    owner = "diegopvlk";
    repo = "Dosage";
    tag = "v${finalAttrs.version}";
    hash = "sha256-UVcbZgPk35VsYvyzIJrR79vAhSByJjn8kh+y0KQcwpM=";
  };

  # https://github.com/NixOS/nixpkgs/issues/318830
  postPatch = ''
    sed -i "1 a imports.package._findEffectiveEntryPointName = () => 'io.github.diegopvlk.Dosage';" src/io.github.diegopvlk.Dosage.in
  '';

  strictDeps = true;

  nativeBuildInputs = [
    blueprint-compiler
    desktop-file-utils
    gjs
    glib # For `glib-compile-schemas`
    gtk4 # For `gtk-update-icon-theme`
    meson
    ninja
    wrapGAppsHook4
  ];

  buildInputs = [
    gjs
    libadwaita
    libportal
  ];

  passthru = {
    updateScript = nix-update-script { };
  };

  meta = {
    description = "Medication tracker for Linux";
    homepage = "https://github.com/diegopvlk/Dosage";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ getchoo ];
    mainProgram = "io.github.diegopvlk.Dosage";
    platforms = lib.platforms.linux;
  };
})