Unverified Commit 26868aed authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

nixos/vte: restore lightweight shell integration, build without app;...

nixos/vte: restore lightweight shell integration, build without app; nixos/gdm: generate users (#463526)
parents 91013a2c ba247b73
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -9,7 +9,12 @@ let
  vteInitSnippet = ''
    # Show current working directory in VTE terminals window title.
    # Supports both bash and zsh, requires interactive shell.
    . ${pkgs.vte-gtk4}/etc/profile.d/vte.sh
    . ${
      pkgs.vte.override {
        withApp = false;
        gtkVersion = null;
      }
    }/etc/profile.d/vte.sh
  '';

in
+25 −39
Original line number Diff line number Diff line
@@ -179,47 +179,33 @@ in

    services.xserver.displayManager.lightdm.enable = false;

    users.users.gdm = {
    users.users = lib.mkMerge [
      {
        gdm = {
          name = "gdm";
          uid = config.ids.uids.gdm;
          group = "gdm";
          description = "GDM user";
        };

    users.users.gdm-greeter = {
        gdm-greeter = {
          isSystemUser = true;
          uid = 60578;
          group = "gdm";
          home = "/run/gdm";
        };
      }

    users.users.gdm-greeter-1 = {
      isSystemUser = true;
      uid = 60579;
      group = "gdm";
      home = "/run/gdm-1";
    };

    users.users.gdm-greeter-2 = {
      isSystemUser = true;
      uid = 60580;
      group = "gdm";
      home = "/run/gdm-2";
    };

    users.users.gdm-greeter-3 = {
      isSystemUser = true;
      uid = 60581;
      group = "gdm";
      home = "/run/gdm-3";
    };

    users.users.gdm-greeter-4 = {
      (lib.genAttrs' [ 1 2 3 4 ] (
        i:
        lib.nameValuePair "gdm-greeter-${toString i}" {
          isSystemUser = true;
      uid = 60582;
          uid = 60578 + i;
          group = "gdm";
      home = "/run/gdm-4";
    };
          home = "/run/gdm-${toString i}";
        }
      ))
    ];

    users.groups.gdm.gid = config.ids.gids.gdm;

+25 −8
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
  nixosTests,
  blackbox-terminal,
  darwinMinVersionHook,
  withApp ? true,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -60,6 +61,23 @@ stdenv.mkDerivation (finalAttrs: {
      url = "https://git.alpinelinux.org/aports/plain/community/vte3/fix-W_EXITCODE.patch?id=4d35c076ce77bfac7655f60c4c3e4c86933ab7dd";
      hash = "sha256-FkVyhsM0mRUzZmS2Gh172oqwcfXv6PyD6IEgjBhy2uU=";
    })

    # Skip test depending on gdk when building without gtk3 and gtk4
    (fetchpatch {
      url = "https://github.com/GNOME/vte/commit/f946e5bacf97305453d731c507885c52d4c34171.patch";
      hash = "sha256-axi16Fpt4d32akFYeAR+SuUIwzRhjhK2oHp/yAXVRgk=";
    })
    # https://gitlab.gnome.org/GNOME/vte/-/merge_requests/11
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/vte/-/commit/f672ed15a88dd3e25c33aa0a5ef6f6d291a6d5c7.patch";
      hash = "sha256-JdLDild5j7marvR5n2heW9YD00+bwzJIoxDlzO5r/6w=";
    })

    # Add option to not build the vte application
    (fetchpatch {
      url = "https://github.com/GNOME/vte/commit/6b7a6a7df9df99368b7ce5ac5903bd2578167567.patch";
      hash = "sha256-s3HigfTZLtGmsZS6dfD3YE95ZdBjB4WOWDvuoatOu3o=";
    })
  ];

  nativeBuildInputs = [
@@ -107,11 +125,10 @@ stdenv.mkDerivation (finalAttrs: {

  mesonFlags = [
    "-Ddocs=true"
    (lib.mesonBool "app" withApp)
    (lib.mesonBool "gtk3" (gtkVersion == "3"))
    (lib.mesonBool "gtk4" (gtkVersion == "4"))
  ]
  ++ lib.optionals (!systemdSupport) [
    "-D_systemd=false"
    (lib.mesonBool "_systemd" (!systemdSupport))
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # -Bsymbolic-functions is not supported on darwin
@@ -125,11 +142,11 @@ stdenv.mkDerivation (finalAttrs: {
  );

  postPatch = ''
    patchShebangs perf/*
    patchShebangs src/app/meson_desktopfile.py
    patchShebangs src/parser-seq.py
    patchShebangs src/minifont-coverage.py
    patchShebangs src/modes.py
    patchShebangs perf/* \
      src/app/meson_desktopfile.py \
      src/parser-seq.py \
      src/minifont-coverage.py \
      src/modes.py
  '';

  postFixup = ''