astal: init at 0-unstable-2025-01-12
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
glib,
|
||||
wrapGAppsHook3,
|
||||
gobject-introspection,
|
||||
meson,
|
||||
pkg-config,
|
||||
ninja,
|
||||
vala,
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
python3,
|
||||
}:
|
||||
let
|
||||
cleanArgs = lib.flip builtins.removeAttrs [
|
||||
"name"
|
||||
"sourceRoot"
|
||||
"nativeBuildInputs"
|
||||
"buildInputs"
|
||||
"website-path"
|
||||
"meta"
|
||||
];
|
||||
|
||||
buildAstalModule =
|
||||
{
|
||||
name,
|
||||
sourceRoot ? "lib/${name}",
|
||||
nativeBuildInputs ? [ ],
|
||||
buildInputs ? [ ],
|
||||
website-path ? name,
|
||||
meta ? { },
|
||||
...
|
||||
}@args:
|
||||
stdenv.mkDerivation (
|
||||
finalAttrs:
|
||||
cleanArgs args
|
||||
// {
|
||||
pname = "astal-${name}";
|
||||
version = "0-unstable-2025-01-12";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Aylur";
|
||||
repo = "astal";
|
||||
rev = "6fd7ae514af36ff9baf1209a2eeebd3a26cf94ce";
|
||||
hash = "sha256-IjLW96gjrCAjx/QZOvYyNpoeb53bkOJ6dDQt8ubaMMY=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/${sourceRoot}";
|
||||
|
||||
nativeBuildInputs = nativeBuildInputs ++ [
|
||||
wrapGAppsHook3
|
||||
gobject-introspection
|
||||
meson
|
||||
pkg-config
|
||||
ninja
|
||||
vala
|
||||
wayland
|
||||
wayland-scanner
|
||||
python3
|
||||
];
|
||||
|
||||
buildInputs = [ glib ] ++ buildInputs;
|
||||
|
||||
meta = {
|
||||
homepage = "https://aylur.github.io/astal/guide/libraries/${website-path}";
|
||||
license = lib.licenses.lgpl21;
|
||||
maintainers = with lib.maintainers; [ perchun ];
|
||||
platforms = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
} // meta;
|
||||
}
|
||||
);
|
||||
in
|
||||
|
||||
args:
|
||||
# to support (finalAttrs: {...})
|
||||
if builtins.typeOf args == "function" then
|
||||
buildAstalModule (lib.fix args)
|
||||
else
|
||||
buildAstalModule args
|
||||
@@ -0,0 +1,23 @@
|
||||
{ wireplumber }:
|
||||
self: {
|
||||
buildAstalModule = self.callPackage ./buildAstalModule.nix { };
|
||||
|
||||
apps = self.callPackage ./modules/apps.nix { };
|
||||
astal3 = self.callPackage ./modules/astal3.nix { };
|
||||
astal4 = self.callPackage ./modules/astal4.nix { };
|
||||
auth = self.callPackage ./modules/auth.nix { };
|
||||
battery = self.callPackage ./modules/battery.nix { };
|
||||
bluetooth = self.callPackage ./modules/bluetooth.nix { };
|
||||
cava = self.callPackage ./modules/cava.nix { };
|
||||
gjs = self.callPackage ./modules/gjs.nix { };
|
||||
greet = self.callPackage ./modules/greet.nix { };
|
||||
hyprland = self.callPackage ./modules/hyprland.nix { };
|
||||
io = self.callPackage ./modules/io.nix { };
|
||||
mpris = self.callPackage ./modules/mpris.nix { };
|
||||
network = self.callPackage ./modules/network.nix { };
|
||||
notifd = self.callPackage ./modules/notifd.nix { };
|
||||
powerprofiles = self.callPackage ./modules/powerprofiles.nix { };
|
||||
river = self.callPackage ./modules/river.nix { };
|
||||
tray = self.callPackage ./modules/tray.nix { };
|
||||
wireplumber = self.callPackage ./modules/wireplumber.nix { inherit wireplumber; };
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
json-glib,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "apps";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for application query";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
gtk3,
|
||||
gtk-layer-shell,
|
||||
io,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "astal3";
|
||||
sourceRoot = "lib/astal/gtk3";
|
||||
buildInputs = [ io ];
|
||||
propagatedBuildInputs = [
|
||||
gtk3
|
||||
gtk-layer-shell
|
||||
];
|
||||
meta.description = "Astal module for GTK3 widgets";
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
gtk4,
|
||||
gtk4-layer-shell,
|
||||
io,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "astal4";
|
||||
sourceRoot = "lib/astal/gtk4";
|
||||
buildInputs = [
|
||||
io
|
||||
gtk4
|
||||
gtk4-layer-shell
|
||||
];
|
||||
meta.description = "Astal module for GTK4 widgets";
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
pam,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "auth";
|
||||
buildInputs = [ pam ];
|
||||
meta.description = "Astal module for authentication using pam";
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
json-glib,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "battery";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for upowerd devices (DBus proxy)";
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ buildAstalModule }:
|
||||
buildAstalModule {
|
||||
name = "bluetooth";
|
||||
meta.description = "Astal module for bluez using DBus";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ buildAstalModule }:
|
||||
buildAstalModule {
|
||||
name = "cava";
|
||||
meta.description = "Astal module for audio visualization using cava";
|
||||
meta.broken = true; # https://github.com/NixOS/nixpkgs/pull/368312
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
astal3,
|
||||
io,
|
||||
|
||||
meson,
|
||||
ninja,
|
||||
pkg-config,
|
||||
}:
|
||||
(buildAstalModule {
|
||||
name = "gjs";
|
||||
sourceRoot = "lang/gjs";
|
||||
meta.description = "Astal module for GJS";
|
||||
}).overrideAttrs
|
||||
{
|
||||
# Remove all unused here inputs
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
astal3
|
||||
io
|
||||
];
|
||||
propagatedBuildInputs = [ ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ buildAstalModule, json-glib }:
|
||||
buildAstalModule {
|
||||
name = "greet";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for greetd using IPC";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ buildAstalModule, json-glib }:
|
||||
buildAstalModule {
|
||||
name = "hyprland";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for Hyprland using IPC";
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ buildAstalModule, nix-update-script }:
|
||||
(buildAstalModule {
|
||||
name = "io";
|
||||
sourceRoot = "lib/astal/io";
|
||||
meta.description = "Astal core library";
|
||||
}).overrideAttrs
|
||||
{
|
||||
# add an update script only in one place,
|
||||
# so r-ryantm won't run it multiple times
|
||||
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
gvfs,
|
||||
json-glib,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "mpris";
|
||||
buildInputs = [
|
||||
gvfs
|
||||
json-glib
|
||||
];
|
||||
meta.description = "Astal module for mpris players";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ buildAstalModule, networkmanager }:
|
||||
buildAstalModule {
|
||||
name = "network";
|
||||
buildInputs = [ networkmanager ];
|
||||
meta.description = "Astal module for NetworkManager";
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
json-glib,
|
||||
gdk-pixbuf,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "notifd";
|
||||
buildInputs = [
|
||||
json-glib
|
||||
gdk-pixbuf
|
||||
];
|
||||
meta.description = "Astal module for notification daemon";
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ buildAstalModule, json-glib }:
|
||||
buildAstalModule {
|
||||
name = "powerprofiles";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for upowerd profiles using DBus";
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ buildAstalModule, json-glib }:
|
||||
buildAstalModule {
|
||||
name = "river";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for River using IPC";
|
||||
|
||||
postUnpack = ''
|
||||
rm -rf $sourceRoot/subprojects
|
||||
mkdir -p $sourceRoot/subprojects
|
||||
cp -r --remove-destination $src/lib/wayland-glib $sourceRoot/subprojects/wayland-glib
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
buildAstalModule,
|
||||
json-glib,
|
||||
}:
|
||||
buildAstalModule {
|
||||
name = "tray";
|
||||
buildInputs = [ json-glib ];
|
||||
meta.description = "Astal module for StatusNotifierItem";
|
||||
meta.broken = true; # https://github.com/NixOS/nixpkgs/issues/337630
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ buildAstalModule, wireplumber }:
|
||||
buildAstalModule {
|
||||
name = "wireplumber";
|
||||
buildInputs = [ wireplumber ];
|
||||
meta.description = "Astal module for wireplumber";
|
||||
}
|
||||
@@ -8569,6 +8569,8 @@ with pkgs;
|
||||
aspell = aspell.override { searchNixProfiles = false; };
|
||||
};
|
||||
|
||||
astal = recurseIntoAttrs (lib.makeScope newScope (callPackage ../development/libraries/astal { }));
|
||||
|
||||
attr = callPackage ../development/libraries/attr { };
|
||||
|
||||
# Not moved to aliases while we decide if we should split the package again.
|
||||
|
||||
Reference in New Issue
Block a user