mirror of
https://github.com/zoriya/astal.git
synced 2026-05-28 08:23:38 +00:00
fixes and touchups
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
public class Astal.Switch : Gtk.Stack {
|
||||
public class Astal.Stack : Gtk.Stack {
|
||||
/**
|
||||
* whether to implicity destroy previous children when setting them
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,13 @@ Using Astal on Nix will require you to package your project.
|
||||
in {
|
||||
packages.${system}.default = astal.lib.mkLuaPacakge {
|
||||
inherit pkgs;
|
||||
src = ./path/to/project; # should contain app.lua
|
||||
src = ./path/to/project; # should contain init.lua
|
||||
|
||||
# add extra glib packages or binaries
|
||||
extraPackages = [
|
||||
astal.packages.${system}.battery
|
||||
pkgs.dart-sass
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+17
-7
@@ -10,9 +10,8 @@ defaults: {
|
||||
(extraLuaPackages ps)
|
||||
++ [
|
||||
ps.lgi
|
||||
(ps.luaPackages.toLuaModule (pkgs.stdenv.mkDerivation {
|
||||
(ps.luaPackages.toLuaModule (pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "astal";
|
||||
version = "0.1.0";
|
||||
src = "${astal}/core/lua";
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
@@ -20,12 +19,19 @@ defaults: {
|
||||
cp -r astal/* $out/share/lua/${ps.lua.luaversion}/astal
|
||||
'';
|
||||
}))
|
||||
(ps.luaPackages.toLuaModule (pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit src name;
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/lua/${ps.lua.luaversion}
|
||||
cp -r * $out/share/lua/${ps.lua.luaversion}
|
||||
'';
|
||||
}))
|
||||
]);
|
||||
|
||||
script = ''
|
||||
#!${lua}/bin/lua
|
||||
package.path = package.path .. ";${src}/?.lua"
|
||||
require "app"
|
||||
require "init"
|
||||
'';
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
@@ -45,14 +51,18 @@ in
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp -r * $out/bin
|
||||
echo '${script}' > astal-lua
|
||||
install -m 755 astal-lua $out/bin/${name}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
gappsWrapperArgs = [
|
||||
"--prefix PATH : ${pkgs.lib.makeBinPath extraPackages}"
|
||||
];
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath extraPackages}
|
||||
)
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user