summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-06-28 17:07:18 +0200
committerGitHub <[email protected]>2024-06-28 17:07:18 +0200
commit9a484bdee02904034449961612fd5b2cdbe6a337 (patch)
tree7be3b0a66894a980e6e9ddef5ef2e8782a2fe964 /flake.nix
parent2c701b970e7b2b208d8d12d3ea34078236d3f62e (diff)
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
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix56
1 files changed, 56 insertions, 0 deletions
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
+ ];
+ };
+ };
+ };
+}