From 0cc1b272fce070e79b3d9350aacab2fe7010391a Mon Sep 17 00:00:00 2001 From: Aylur Date: Thu, 20 Jun 2024 15:46:08 +0200 Subject: init 0.1.0 --- flake.nix | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c6b4efd --- /dev/null +++ b/flake.nix @@ -0,0 +1,49 @@ +{ + description = "Library and cli tool for querying applications"; + + 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; [ + glib + json-glib + ]; + in { + packages.${system} = rec { + default = hyprland; + hyprland = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal-hyprland"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = { + default = pkgs.mkShell { + inherit nativeBuildInputs buildInputs; + }; + hyprland = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = buildInputs ++ [ + pkgs.gjs + self.packages.${system}.default + ]; + }; + }; + }; +} -- cgit v1.2.3