diff options
-rw-r--r-- | flake.nix | 36 | ||||
-rw-r--r-- | nix/devshell.nix | 52 | ||||
-rw-r--r-- | nix/lua.nix | 2 |
3 files changed, 57 insertions, 33 deletions
@@ -29,6 +29,10 @@ outputs = ["out" "dev"]; }; in { + devShells.${system} = import ./nix/devshell.nix { + inherit self pkgs; + }; + mkLuaPackage = import ./nix/lua.nix { inherit pkgs; astal = self; @@ -52,37 +56,5 @@ tray = mkPkg "astal-tray" ./lib/tray [gtk3 gdk-pixbuf libdbusmenu-gtk3 json-glib]; wireplumber = mkPkg "astal-wireplumber" ./lib/wireplumber [wireplumber]; }; - - devShells.${system} = let - buildInputs = with pkgs; [ - wrapGAppsHook - gobject-introspection - meson - pkg-config - ninja - vala - gtk3 - gtk-layer-shell - json-glib - pam - gvfs - networkmanager - gdk-pixbuf - wireplumber - libdbusmenu-gtk3 - wayland - - (lua.withPackages (ps: [ps.lgi])) - (python3.withPackages (ps: [ps.pygobject3 ps.pygobject-stubs])) - gjs - ]; - in { - default = pkgs.mkShell { - inherit buildInputs; - }; - astal = pkgs.mkShell { - buildInputs = buildInputs ++ (builtins.attrValues self.packages.${system}); - }; - }; }; } diff --git a/nix/devshell.nix b/nix/devshell.nix new file mode 100644 index 0000000..9f664f6 --- /dev/null +++ b/nix/devshell.nix @@ -0,0 +1,52 @@ +{ + self, + pkgs, +}: let + lua = pkgs.lua.withPackages (ps: [ + ps.lgi + (ps.luaPackages.toLuaModule (pkgs.stdenv.mkDerivation { + name = "astal"; + src = "${self}/core/lua"; + dontBuild = true; + installPhase = '' + mkdir -p $out/share/lua/${ps.lua.luaversion}/astal + cp -r astal/* $out/share/lua/${ps.lua.luaversion}/astal + ''; + })) + ]); + + python = pkgs.python3.withPackages (ps: [ + ps.pygobject3 + ps.pygobject-stubs + ]); + + buildInputs = with pkgs; [ + wrapGAppsHook + gobject-introspection + meson + pkg-config + ninja + vala + gtk3 + gtk-layer-shell + json-glib + pam + gvfs + networkmanager + gdk-pixbuf + wireplumber + libdbusmenu-gtk3 + wayland + + lua + python + gjs + ]; +in { + default = pkgs.mkShell { + inherit buildInputs; + }; + astal = pkgs.mkShell { + buildInputs = buildInputs ++ (builtins.attrValues self.packages.${pkgs.system}); + }; +} diff --git a/nix/lua.nix b/nix/lua.nix index 36ab4e5..ed8ec0a 100644 --- a/nix/lua.nix +++ b/nix/lua.nix @@ -52,7 +52,7 @@ in preFixup = '' gappsWrapperArgs+=( - --prefix PATH : ${pkgs.lib.makeBinPath extraPacakges} + --prefix PATH : "${pkgs.lib.makeBinPath extraPacakges}" ) ''; } |