Commit 00f81357 authored by PerchunPak's avatar PerchunPak Committed by Masum Reza
Browse files

astal: move source to a separate package

It provides general description for all astal packages and r-ryantm
will create properly named PRs.
parent b5d863ce
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  source, # this is ./source.nix

  glib,
  wrapGAppsHook3,
@@ -39,17 +39,12 @@ let
      cleanArgs args
      // {
        pname = "astal-${name}";
        version = "0-unstable-2025-03-21";
        inherit (source) version;

        __structuredAttrs = true;
        strictDeps = true;

        src = fetchFromGitHub {
          owner = "Aylur";
          repo = "astal";
          rev = "dc0e5d37abe9424c53dcbd2506a4886ffee6296e";
          hash = "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=";
        };
        src = source;

        sourceRoot = "${finalAttrs.src.name}/${sourceRoot}";

+1 −0
Original line number Diff line number Diff line
{ wireplumber }:
self: {
  source = self.callPackage ./source.nix { };
  buildAstalModule = self.callPackage ./buildAstalModule.nix { };

  apps = self.callPackage ./modules/apps.nix { };
+4 −15
Original line number Diff line number Diff line
{ buildAstalModule, nix-update-script }:
(buildAstalModule {
{ buildAstalModule }:
buildAstalModule {
  name = "io";
  sourceRoot = "lib/astal/io";
  meta = {
    description = "Astal core library";
    longDescription = ''
      Astal is a collection of building blocks for creating custom desktop shells
    '';
    mainProgram = "astal";
  };
}).overrideAttrs
  {
    # add an update script only in one place,
    # so r-ryantm won't run it multiple times
    passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
  meta.description = "Astal core library";
}
+33 −0
Original line number Diff line number Diff line
{
  lib,
  nix-update-script,
  fetchFromGitHub,
}:
(fetchFromGitHub {
  owner = "Aylur";
  repo = "astal";
  rev = "dc0e5d37abe9424c53dcbd2506a4886ffee6296e";
  hash = "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=";
}).overrideAttrs
  (
    final: prev: {
      name = "${final.pname}-${final.version}"; # fetchFromGitHub already defines name
      pname = "astal-source";
      version = "0-unstable-2025-03-21";

      meta = prev.meta // {
        description = "Building blocks for creating custom desktop shells (source)";
        longDescription = ''
          Please don't use this package directly, use one of subpackages in
          `astal` namespace. This package is just a `fetchFromGitHub`, which is
          reused between all subpackages.
        '';
        maintainers = with lib.maintainers; [ perchun ];
        platforms = lib.platforms.linux;
      };

      passthru = prev.passthru // {
        updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
      };
    }
  )