From 9a484bdee02904034449961612fd5b2cdbe6a337 Mon Sep 17 00:00:00 2001 From: Aylur <104676705+Aylur@users.noreply.github.com> Date: Fri, 28 Jun 2024 17:07:18 +0200 Subject: add flake, format, small fixes (#1) * add flake, format, small fixes * moved the mainloop in cli.vala to the scope of deamonize * made versions public in config.vala * added notify_property("items") calls in tray.vala, this makes it work with the bind API in gjs * added flake.nix NOTE for nix: The dbusmenu workaround in meson seems to break typelib linking on nix which I could not find a solution for. A simple workaround is to simply put the dependencies of dbusmenu-gtk in buildInputs, which is fine, but I'm sure this will cause confusion since no other libs require additional packages in buildInputs * fix(cli): item changed event * move header to includedir/astal --- flake.nix | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c78cbaa --- /dev/null +++ b/flake.nix @@ -0,0 +1,56 @@ +{ + description = "Library and cli for the StatusNotifierItem protocol"; + + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + outputs = { + self, + nixpkgs, + }: let + version = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./version); + system = "x86_64-linux"; + pkgs = import nixpkgs {inherit system;}; + + nativeBuildInputs = with pkgs; [ + gobject-introspection + meson + pkg-config + ninja + vala + ]; + + buildInputs = with pkgs; [ + gtk3 + glib + gdk-pixbuf + libdbusmenu-gtk3 + json-glib + ]; + in { + packages.${system} = rec { + default = tray; + tray = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal-tray"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + inherit nativeBuildInputs buildInputs; + }; + tray = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = + buildInputs + ++ [ + self.packages.${system}.default + pkgs.gjs + ]; + }; + }; + }; +} -- cgit v1.2.3