diff options
Diffstat (limited to 'tray/flake.nix')
-rw-r--r-- | tray/flake.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tray/flake.nix b/tray/flake.nix new file mode 100644 index 0000000..c78cbaa --- /dev/null +++ b/tray/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 + ]; + }; + }; + }; +} |