From 1425b396b08f0e91d45bbd0f92b1309115c7c870 Mon Sep 17 00:00:00 2001 From: Aylur Date: Sun, 19 May 2024 02:39:53 +0200 Subject: init 0.1.0 --- flake.nix | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..79d8180 --- /dev/null +++ b/flake.nix @@ -0,0 +1,58 @@ +{ + 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; [ + wrapGAppsHook + gobject-introspection + meson + pkg-config + ninja + vala + ]; + + buildInputs = with pkgs; [ + glib + gtk3 + gtk-layer-shell + ]; + in { + packages.${system} = rec { + default = astal; + astal = pkgs.stdenv.mkDerivation { + inherit nativeBuildInputs buildInputs; + pname = "astal"; + version = version; + src = ./.; + outputs = ["out" "dev"]; + }; + }; + + devShells.${system} = let + inputs = with pkgs; buildInputs ++ [ + (lua.withPackages(ps: [ps.lgi])) + (python3.withPackages(ps: [ps.pygobject3])) + gjs + deno + nodejs + ]; + in { + default = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = inputs; + }; + astal = pkgs.mkShell { + inherit nativeBuildInputs; + buildInputs = inputs ++ [ + self.packages.${system}.astal + pkgs.playerctl # FIXME: just for demo + ]; + }; + }; + }; +} -- cgit v1.2.3