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

gnomeExtensions.unite-shell: rename to gnomeExtensions.unite #109880

Merged
merged 1 commit into from Jan 24, 2021
Merged

gnomeExtensions.unite-shell: rename to gnomeExtensions.unite #109880

merged 1 commit into from Jan 24, 2021

Conversation

rhoriguchi
Copy link
Contributor

@rhoriguchi rhoriguchi commented Jan 19, 2021

Motivation for this change

After using the gnome-shell-extension-prefs i realized this package should be named unite.

On GitHub repository the extension is mentioned under the name Unite also the header in the demo images is also Unite.

Unite is a GNOME Shell extension which makes a few layout tweaks to the top panel and removes window decorations to make it look like Ubuntu Unity Shell.

image

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@rhoriguchi rhoriguchi changed the title pkgs.gnomeExtensions.unite-shell: rename to pkgs.gnomeExtensions.unite gnomeExtensions.unite-shell: rename to gnomeExtensions.unite Jan 19, 2021
@SuperSandro2000
Copy link
Member

@ofborg eval

@rhoriguchi
Copy link
Contributor Author

@SuperSandro2000 is my commit message wrong, that's why ofborg can't build it? should I rename the commit to gnomeExtensions.unite: init at 44?

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 19, 2021

@SuperSandro2000 is my commit message wrong, that's why ofborg can't build it? should I rename the commit to gnomeExtensions.unite: init at 44?

I am not actually sure what is happening here.

@ofborg eval

Edit: I guessed it is fixed.

@SuperSandro2000
Copy link
Member

@rhoriguchi Sorry that I not noticed this earlier but can you add an alias to aliases.nix? I think a normal one without throw should be fine.

@rhoriguchi
Copy link
Contributor Author

Should be fine now. Please verify that the alias is correct. I'm not sure this is the correct way. Should a set be used or is this fine?

@SuperSandro2000
Copy link
Member

Should be fine now. Please verify that the alias is correct. I'm not sure this is the correct way. Should a set be used or is this fine?

Good catch. Actually I am not sure but looking at other examples we maybe want it? https://github.com/rhoriguchi/nixpkgs/blob/unite/pkgs/top-level/aliases.nix#L197

@SuperSandro2000
Copy link
Member

@jonringer du you think this is correct this way?

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

cc gnome people @jtojnar @worldofpeace

pkgs/top-level/aliases.nix Outdated Show resolved Hide resolved
@jonringer
Copy link
Contributor

Personally, I think the gnomeExtensions should be moved in to a package set under pkgs/desktops/gnome3/extensions/default.nix. It's already got 32 packages in it, and a small deprecation section as well.

  gnomeExtensions = recurseIntoAttrs {
    appindicator = callPackage ../desktops/gnome-3/extensions/appindicator { };
    arc-menu = callPackage ../desktops/gnome-3/extensions/arc-menu { };
    caffeine = callPackage ../desktops/gnome-3/extensions/caffeine { };
    clipboard-indicator = callPackage ../desktops/gnome-3/extensions/clipboard-indicator { };
    clock-override = callPackage ../desktops/gnome-3/extensions/clock-override { };
    dash-to-dock = callPackage ../desktops/gnome-3/extensions/dash-to-dock { };
    dash-to-panel = callPackage ../desktops/gnome-3/extensions/dash-to-panel { };
    draw-on-your-screen = callPackage ../desktops/gnome-3/extensions/draw-on-your-screen { };
    drop-down-terminal = callPackage ../desktops/gnome-3/extensions/drop-down-terminal { };
    easyScreenCast = callPackage ../desktops/gnome-3/extensions/EasyScreenCast { };
    emoji-selector = callPackage ../desktops/gnome-3/extensions/emoji-selector { };
    freon = callPackage ../desktops/gnome-3/extensions/freon { };
    gsconnect = callPackage ../desktops/gnome-3/extensions/gsconnect { };
    icon-hider = callPackage ../desktops/gnome-3/extensions/icon-hider { };
    impatience = callPackage ../desktops/gnome-3/extensions/impatience { };
    material-shell = callPackage ../desktops/gnome-3/extensions/material-shell { };
    mpris-indicator-button = callPackage ../desktops/gnome-3/extensions/mpris-indicator-button { };
    night-theme-switcher = callPackage ../desktops/gnome-3/extensions/night-theme-switcher { };
    no-title-bar = callPackage ../desktops/gnome-3/extensions/no-title-bar { };
    noannoyance = callPackage ../desktops/gnome-3/extensions/noannoyance { };
    paperwm = callPackage ../desktops/gnome-3/extensions/paperwm { };
    pidgin-im-integration = callPackage ../desktops/gnome-3/extensions/pidgin-im-integration { };
    remove-dropdown-arrows = callPackage ../desktops/gnome-3/extensions/remove-dropdown-arrows { };
    sound-output-device-chooser = callPackage ../desktops/gnome-3/extensions/sound-output-device-chooser { };
    system-monitor = callPackage ../desktops/gnome-3/extensions/system-monitor { };
    taskwhisperer = callPackage ../desktops/gnome-3/extensions/taskwhisperer { };
    tilingnome = callPackage ../desktops/gnome-3/extensions/tilingnome { };
    timepp = callPackage ../desktops/gnome-3/extensions/timepp { };
    topicons-plus = callPackage ../desktops/gnome-3/extensions/topicons-plus { };
    unite-shell = callPackage ../desktops/gnome-3/extensions/unite-shell { };
    window-corner-preview = callPackage ../desktops/gnome-3/extensions/window-corner-preview { };
    window-is-ready-remover = callPackage ../desktops/gnome-3/extensions/window-is-ready-remover { };
    workspace-matrix = callPackage ../desktops/gnome-3/extensions/workspace-matrix { };

    nohotcorner = throw "gnomeExtensions.nohotcorner removed since 2019-10-09: Since 3.34, it is a part of GNOME Shell configurable through GNOME Tweaks.";
    mediaplayer = throw "gnomeExtensions.mediaplayer deprecated since 2019-09-23: retired upstream https://github.com/JasonLG1979/gnome-shell-extensions-mediaplayer/blob/master/README.md";
  };

@jtojnar
Copy link
Contributor

jtojnar commented Jan 24, 2021

Right, using self (i.e. final in recemt terminology) would not be correct here. gitAndTools uses it because those packages were moved to top level so self will contain them (along with all other packages).

Moving the extensions to a separate file would be a good improvement as well. And we should probably rename the attribute to gnome-shell-extensions or something.

But this looks good to me as is. Thanks.

@jtojnar jtojnar merged commit 8bcc8f6 into NixOS:master Jan 24, 2021
@amaxine
Copy link
Contributor

amaxine commented Jan 24, 2021

Building with this commit in master is broken for me, seemingly because of the alias - this is the first bad commit I could find that I couldn't build on.

error: Alias gnomeExtensions is still in all-packages.nix

@jonringer
Copy link
Contributor

yea, the intention was correct, but the implementation needs to change:

  # Make sure that we are not shadowing something from
  # all-packages.nix.
  checkInPkgs = n: alias: if builtins.hasAttr n super
                          then throw "Alias ${n} is still in all-packages.nix"
                          else alias;

@jonringer
Copy link
Contributor

nested attrs are not allowed to be aliased in aliases.nix

@jonringer
Copy link
Contributor

fixed in 31e833e

$ nix-build -A gnomeExtensions.unite
/nix/store/cv2jm9ywcz6cbvkg9n7hcivnkivc27s7-gnome-shell-extension-unite-44

@jonringer
Copy link
Contributor

well, more accurately, there's an assertion that top-level attrs aren't being shadowed. For nested attrs, it means they will always fail as they all exist on a top-level attr.

@jonringer
Copy link
Contributor

Kind of surprised ofborg didn't fail, as it should have tried to do query rebuilds... unless that's done with allowAliases = false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants