about summary refs log tree commit diff
path: root/pkgs/by-name/ag/ags/package.nix
blob: 85fb28aa12a3a0fcf0f711c1ec6d688dafe3bb34 (plain) (blame)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
  lib,
  buildNpmPackage,
  fetchFromGitHub,
  meson,
  ninja,
  pkg-config,
  gobject-introspection,
  gjs,
  glib-networking,
  gnome,
  gtk-layer-shell,
  libpulseaudio,
  libsoup_3,
  networkmanager,
  upower,
  typescript,
  wrapGAppsHook3,
  linux-pam,
  nix-update-script,
}:

buildNpmPackage rec {
  pname = "ags";
  version = "1.8.2";

  src = fetchFromGitHub {
    owner = "Aylur";
    repo = "ags";
    rev = "v${version}";
    hash = "sha256-ebnkUaee/pnfmw1KmOZj+MP1g5wA+8BT/TPKmn4Dkwc=";
    fetchSubmodules = true;
  };

  npmDepsHash = "sha256-ucWdADdMqAdLXQYKGOXHNRNM9bhjKX4vkMcQ8q/GZ20=";

  mesonFlags = [ (lib.mesonBool "build_types" true) ];

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    gjs
    gobject-introspection
    typescript
    wrapGAppsHook3
  ];

  # Most of the build inputs here are basically needed for their typelibs.
  buildInputs = [
    gjs
    glib-networking
    gnome.gnome-bluetooth
    gtk-layer-shell
    libpulseaudio
    libsoup_3
    linux-pam
    networkmanager
    upower
  ];

  postPatch = ''
    chmod u+x ./post_install.sh && patchShebangs ./post_install.sh
  '';

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

  meta = {
    homepage = "https://github.com/Aylur/ags";
    description = "A EWW-inspired widget system as a GJS library";
    changelog = "https://github.com/Aylur/ags/releases/tag/v${version}";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [
      foo-dogsquared
      johnrtitor
    ];
    mainProgram = "ags";
    platforms = lib.platforms.linux;
  };
}