nixos-config/pkgs/ags/default.nix

80 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
2023-08-07 07:40:24 +00:00
, buildNpmPackage
, fetchFromGitHub
, meson
, ninja
, pkg-config
, gobject-introspection
, gjs
, glib-networking
, gnome
, gtk-layer-shell
2023-08-07 07:40:24 +00:00
, libpulseaudio
, libsoup_3
, networkmanager
, upower
, wrapGAppsHook
2024-02-11 09:48:54 +00:00
, linux-pam
2023-08-07 07:40:24 +00:00
}:
buildNpmPackage rec {
pname = "ags";
2024-02-23 12:51:59 +00:00
version = "1.7.7";
2023-08-07 07:40:24 +00:00
src = fetchFromGitHub {
owner = "Aylur";
repo = "ags";
2023-12-20 14:06:35 +00:00
rev = "v${version}";
2024-02-23 12:51:59 +00:00
hash = "sha256-vaA4ERhDIHZDmgg5GJdPVGqDdyXT5FvsdZYelojb3UQ=";
2023-08-07 07:40:24 +00:00
fetchSubmodules = true;
};
2024-02-11 09:48:54 +00:00
npmDepsHash = "sha256-ucWdADdMqAdLXQYKGOXHNRNM9bhjKX4vkMcQ8q/GZ20=";
mesonFlags = [
(lib.mesonBool "build_types" true)
];
2023-08-07 07:40:24 +00:00
nativeBuildInputs = [
meson
ninja
pkg-config
gjs
gobject-introspection
wrapGAppsHook
2023-08-07 07:40:24 +00:00
];
# Most of the build inputs here are basically needed for their typelibs.
2023-08-07 07:40:24 +00:00
buildInputs = [
gjs
glib-networking
gnome.gnome-bluetooth
gtk-layer-shell
2023-08-07 07:40:24 +00:00
libpulseaudio
libsoup_3
2024-02-11 09:48:54 +00:00
linux-pam
networkmanager
upower
2023-08-07 07:40:24 +00:00
];
# TODO: I have no idea how to properly make use of the binaries from
# node_modules folder, pls fix later (or is this the most Nix-idiomatic way of
# doing this?). :(
preConfigure = ''
addToSearchPath PATH $PWD/node_modules/.bin
'';
2024-02-11 09:48:54 +00:00
postPatch = ''
chmod u+x ./post_install.sh && patchShebangs ./post_install.sh
'';
2023-08-07 07:40:24 +00:00
meta = with lib; {
homepage = "https://github.com/Aylur/ags";
description = "A EWW-inspired widget system as a GJS library";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ foo-dogsquared ];
mainProgram = "ags";
platforms = platforms.linux;
2023-08-07 07:40:24 +00:00
};
}