Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

programs.sway: always wrap the provided package #4039

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

teto
Copy link
Collaborator

@teto teto commented May 31, 2023

when swapping the sway package with another (e.g., "swayfx") we lose HM's wrapping like session variables, command line arguments etc for no reason. It's inconsistent with how the neovim module behaves too.

If someone wants to bypass the HM wrapping, it's still possible to wrap the package with a function .

Description

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

@@ -335,7 +328,7 @@ in {

package = mkOption {
type = with types; nullOr package;
default = defaultSwayPackage;
default = pkgs.sway;
defaultText = literalExpression "${pkgs.sway}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you're at it

Suggested change
defaultText = literalExpression "${pkgs.sway}";
defaultText = literalExpression "pkgs.sway";

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used swayfx to show something different than the default.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also it should have been sway-unwrapped anyway

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defaultText should show what the default value is. Use example for an example.

@teto teto force-pushed the sway-wrapper branch 4 times, most recently from 3fb5f15 to 9d893bb Compare June 3, 2023 15:31
@teto
Copy link
Collaborator Author

teto commented Jun 3, 2023

so I lost a few minutes before discovering the tests ran with a mock/stub "sway". It's pretty smart but the module needs to override sway which broke with the stub. It was simpler to remove the stub so that's what I have done. My changes to the tests fixed make TEST=sway-bar-focused-colors test but before I proceed, I would like confirmation that my changes are OK.
I am a bit confused by the status_command @i3status@/bin/i3status that dont seem to get replaced/normalized. Is that due to the change in stubs/is it expected ? cc @rycee @sigprof

@teto teto force-pushed the sway-wrapper branch 4 times, most recently from b4c40d1 to 3dd6e0f Compare June 6, 2023 11:39
teto added a commit to teto/nixpkgs that referenced this pull request Jun 10, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
@teto
Copy link
Collaborator Author

teto commented Jun 10, 2023

this requires some changes tin nixpkgs to work, so I will try to merge NixOS/nixpkgs#237044 first

teto added a commit to teto/nixpkgs that referenced this pull request Jun 10, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 10, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 10, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 13, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 15, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 16, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 20, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 23, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 24, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 25, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
teto added a commit to teto/nixpkgs that referenced this pull request Jun 26, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
@teto teto mentioned this pull request Jul 2, 2023
teto added 2 commits July 2, 2023 15:03
when swapping the default package with another (e.g., "swayfx") we lose
all kinds of HM properties like the session variable / extra options etc
for no reason. It's inconsistent with how the neovim module behaves too.

If someone wants to bypass the HM wrapping, it's still possible to wrap
the package with a function .
mccurdyc pushed a commit to mccurdyc/nixpkgs that referenced this pull request Jul 3, 2023
it's easier to use overrideAttrs than override IMO, and for the
home-manager module I would like to be able to configure sway forks the same way as
the original sway which is not possible currently see
nix-community/home-manager#4039
@stale
Copy link

stale bot commented Sep 30, 2023

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.

If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

Copy link

stale bot commented Dec 29, 2023

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.

If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

@stale stale bot added the status: stale label Dec 29, 2023
@rycee
Copy link
Member

rycee commented Dec 31, 2023

The sway-stubs.nix file contains i3status = { };, which I think would explain the @i3status@.

Does this change mean that the CI will download Sway and its dependencies?

@stale stale bot removed the status: stale label Dec 31, 2023
@rycee rycee added the pinned Prevent marking as stale label Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Prevent marking as stale window-manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants