diff --git a/PACKAGING.md b/PACKAGING.md index e85a9e987..d85f55de7 100644 --- a/PACKAGING.md +++ b/PACKAGING.md @@ -83,8 +83,7 @@ zig build \ --prefix /usr \ --system /tmp/offline-cache/p \ -Doptimize=ReleaseFast \ - -Dcpu=baseline \ - -Dsystem-package=true + -Dcpu=baseline ``` The build options are covered in the next section, but this will build diff --git a/nix/package.nix b/nix/package.nix index f24b401cc..08dfd710b 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -99,7 +99,6 @@ in "-Dgtk-x11=${lib.boolToString enableX11}" "-Dgtk-wayland=${lib.boolToString enableWayland}" "-Dstrip=${lib.boolToString strip}" - "-Dsystem-package=true" ]; outputs = [ diff --git a/src/build/Config.zig b/src/build/Config.zig index ede42c738..e55da3860 100644 --- a/src/build/Config.zig +++ b/src/build/Config.zig @@ -45,7 +45,6 @@ version: std.SemanticVersion = .{ .major = 0, .minor = 0, .patch = 0 }, pie: bool = false, strip: bool = false, patch_rpath: ?[]const u8 = null, -system_package: bool = false, /// Artifacts flatpak: bool = false, @@ -88,11 +87,7 @@ pub fn init(b: *std.Build) !Config { // This is set to true when we're building a system package. For now // this is trivially detected using the "system_package_mode" bool // but we may want to make this more sophisticated in the future. - const system_package = b.option( - bool, - "system-package", - "Controls whether we build a system package", - ) orelse b.graph.system_package_mode; + const system_package = b.graph.system_package_mode; // This specifies our target wasm runtime. For now only one semi-usable // one exists so this is hardcoded. @@ -266,8 +261,6 @@ pub fn init(b: *std.Build) !Config { .ReleaseFast, .ReleaseSmall => true, }; - config.system_package = system_package; - //--------------------------------------------------------------- // Artifacts to Emit diff --git a/src/build/GhosttyResources.zig b/src/build/GhosttyResources.zig index 364818a1a..f52c2e810 100644 --- a/src/build/GhosttyResources.zig +++ b/src/build/GhosttyResources.zig @@ -267,7 +267,7 @@ pub fn init(b: *std.Build, cfg: *const Config) !GhosttyResources { b.fmt( "{s}/systemd/user/com.mitchellh.ghostty{s}.service", .{ - if (cfg.system_package) "lib" else "share", + if (b.graph.system_package_mode) "lib" else "share", switch (cfg.optimize) { .Debug, .ReleaseSafe => "-debug", .ReleaseFast, .ReleaseSmall => "",