From dc3cec536896fa224e0ce340557aa02b8d98738f Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 11 Sep 2024 14:48:53 +0000 Subject: add lua builder --- flake.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 000ded1..a975e78 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,11 @@ outputs = ["out" "dev"]; }; in { + mkLuaPackage = import ./nix/lua.nix { + inherit pkgs; + astal = self; + }; + packages.${system} = with pkgs; { docs = import ./docs {inherit self pkgs;}; default = self.packages.${system}.astal; -- cgit v1.2.3 From 374d76f4152ea46987203f49642d7d46aff221ab Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 11 Sep 2024 16:28:04 +0000 Subject: nix: move devshell into its own file --- flake.nix | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index a975e78..8ff60e7 100644 --- a/flake.nix +++ b/flake.nix @@ -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}); - }; - }; }; } -- cgit v1.2.3 From e2b9013d38f64f6e0f53841f32f9e000b74e220f Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 11 Sep 2024 21:48:26 +0000 Subject: nix: touchups --- flake.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 8ff60e7..f2ae8cf 100644 --- a/flake.nix +++ b/flake.nix @@ -8,8 +8,8 @@ inherit (builtins) replaceStrings readFile; version = replaceStrings ["\n"] [""] (readFile ./version); - system = "x86_64-linux"; - pkgs = import nixpkgs {inherit system;}; + system = "x86_64-linux"; # TODO: other architectures + pkgs = nixpkgs.legacyPackages.${system}; mkPkg = name: src: inputs: pkgs.stdenv.mkDerivation { @@ -33,9 +33,11 @@ inherit self pkgs; }; - mkLuaPackage = import ./nix/lua.nix { - inherit pkgs; - astal = self; + lib = { + mkLuaPackage = import ./nix/lua.nix { + inherit pkgs; + astal = self; + }; }; packages.${system} = with pkgs; { -- cgit v1.2.3