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

feat: add cinnamon #74242

Closed
wants to merge 73 commits into from
Closed

feat: add cinnamon #74242

wants to merge 73 commits into from

Conversation

mkg20001
Copy link
Member

@mkg20001 mkg20001 commented Nov 26, 2019

Motivation for this change

I need this for myself and I think a lot of people want this, too

NOTE: THIS PR IS WIP
❗ It's been decided that most expressions will be moved out of this PR, and into individual ones.

The packages here are being continued to be developed in https://github.com/mkg20001/nixpkgs and will be moved to PRs to get them ready for upstream

Also, I'm running this on my laptop already. So it works and you can try it already, it's just a bit broken at this point...

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 nix-review --run "nix-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.
Notify maintainers

cc @

@mkg20001
Copy link
Member Author

I've added the old cinnamon port from the repo before removal & the new cinnamon port https://github.com/cawilliamson/nixos-cinnamon/ from @cawilliamson

Going to merge them together and make a new port, latest going to remove the leftover files

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/porting-cinnamon-to-nixos/3512/7

@worldofpeace
Copy link
Contributor

worldofpeace commented Nov 26, 2019

I'd be happy to review this/assist 👍

@mkg20001
Copy link
Member Author

mkg20001 commented Nov 26, 2019

I've added services.xserver.desktopManager.cinnamon.enable as an option and referenced cinnamon.nix in desktop-manager/default.nix, yet my local nixbuild fails (evaluation logs show it seems to use my cloned nixpkgs). Any idea?

@worldofpeace
Copy link
Contributor

I've added services.xserver.desktopManager.cinnamon.enable as an option and referenced cinnamon.nix in desktop-manager/default.nix, yet my local nixbuild fails (evaluation logs show it seems to use my cloned nixpkgs). Any idea?

I think the module might be a far off idea just yet. I'd probably try to get the packaging very good first and maybe just use some configuration locally to verify their installation. So, I could much better assist with packaging first, as the module might prove more difficult. (but I can for sure help with this as well).

pkgs/desktops/cinnamon-old/cinnamon-control-center.nix Outdated Show resolved Hide resolved
pkgs/desktops/cinnamon-old/cinnamon-control-center.nix Outdated Show resolved Hide resolved
pkgs/desktops/cinnamon-old/cinnamon-control-center.nix Outdated Show resolved Hide resolved
pkgs/desktops/cinnamon-old/cinnamon-control-center.nix Outdated Show resolved Hide resolved
pkgs/desktops/cinnamon-old/cinnamon-control-center.nix Outdated Show resolved Hide resolved
pkgs/top-level/aliases.nix Show resolved Hide resolved
cinnamon = super.callPackage ./cinnamon { };
cinnamon-desktop = super.callPackage ./cinnamon-desktop { };
cinnamon-menus = super.callPackage ./cinnamon-menus { };
cinnamon-session = super.callPackage ./cinnamon-session { gconf = super.gnome2.GConf; };
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still require GConf? It has been deprecated over 8 years ago.

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently. I've had to add it again.

pkgs/desktops/cinnamon/xapps/default.nix Outdated Show resolved Hide resolved
@mkg20001
Copy link
Member Author

I think the module might be a far off idea just yet. I'd probably try to get the packaging very good first and maybe just use some configuration locally to verify their installation. So, I could much better assist with packaging first, as the module might prove more difficult. (but I can for sure help with this as well).

Can we keep it now in this PR and I'll move it to another PR later, so we can merge just the packages in this PR?

@worldofpeace
Copy link
Contributor

I think the module might be a far off idea just yet. I'd probably try to get the packaging very good first and maybe just use some configuration locally to verify their installation. So, I could much better assist with packaging first, as the module might prove more difficult. (but I can for sure help with this as well).

Can we keep it now in this PR and I'll move it to another PR later, so we can merge just the packages in this PR?

I believe you're suggesting merging packaging first and then a nixos module?
That sounds right, it's an approach we've done for packaging deepin. It would make the reviews smaller and easier to manage.

@mkg20001
Copy link
Member Author

I have trouble adding libnm as a dependency for cinnamon-control-center

I can't find any headers in that package. Are they exposed somewhere else than networkmanager?

@mkg20001 mkg20001 force-pushed the cinnamon branch 2 times, most recently from c5fb8c2 to 8ea1077 Compare November 27, 2019 11:21
@mkg20001
Copy link
Member Author

mkg20001 commented Dec 1, 2019

That didn't quite work, instead I just copied some code from gnome3 and added it to the module
Now it works

@mkg20001 mkg20001 marked this pull request as ready for review December 1, 2019 01:19
@mkg20001 mkg20001 changed the title [WIP] feat: add cinnamon feat: add cinnamon Dec 1, 2019
@mkg20001
Copy link
Member Author

mkg20001 commented Dec 1, 2019

In which package is the adwaita theme? Can't find it anywhere, cinnamon depends on it as it's the default theme.

@jtojnar
Copy link
Contributor

jtojnar commented Dec 1, 2019

Adwaita GTK theme is built into GTK.

@mkg20001
Copy link
Member Author

mkg20001 commented Dec 1, 2019

This PR should be ready now.

@mkg20001
Copy link
Member Author

mkg20001 commented Dec 1, 2019

screenshot

Cinnamon, with fonts, theme & icons fixed

@worldofpeace
Copy link
Contributor

Ok, there's still quite a few issues here. Mostly when it comes to the gobject-introspection using packages. I should have some time this week or later to review just those.

While I'm here, why's there a cinnamon-old directory?

Comment on lines +60 to +78
services.xserver.desktopManager.session = [
{
name = "cinnamon";
bgSupport = true;
start = ''
${pkgs.runtimeShell} ${pkgs.cinnamon.cinnamon-common}/bin/cinnamon-session-cinnamon &
waitPID=$!
'';
}
{
name = "cinnamon2d";
bgSupport = true;
start = ''
${pkgs.runtimeShell} ${pkgs.cinnamon.cinnamon-common}/bin/cinnamon-session-cinnamon2d &
waitPID=$!
'';
}
];
};
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming that cinnamon has some sort of upstream xsession file?
Then we could use services.xserver.displayManager.extraSessionFilePackages and not create a session manually.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, they just reference a wrong path

Exec=cinnamon-session-cinnamon2d
TryExec=/usr/bin/cinnamon2d

@jonringer
Copy link
Contributor

do you mind cleaning up the commit history? there should rougly be a commit per package change, so multiple fixes should be squashed

git rebase -i will be your very dear friend

@worldofpeace
Copy link
Contributor

worldofpeace commented Dec 4, 2019

do you mind cleaning up the commit history? there should rougly be a commit per package change, so multiple fixes should be squashed

git rebase -i will be your very dear friend

I haven't suggested a particular commit history because it's very wip.
I'm fine with at least the commits coming in a way where it's changes per package so I can review them properly. In the end, cinnamon: init at some_version is fine with me very new package sets.
Though I'm not opposed to it being a commit per package 😄 But at that point I'd reset and recreate the callPackage file from scratch.

@jonringer
Copy link
Contributor

actually, I think moving some of these things into other PRs may help on being able to review the changes in a timely manner, some of things that can be refactored to other PRs because they don't rely on other cinnamon packages:

  • add to maintainers list
  • xapp
  • cinnamon-old/cjs
  • cinnamon/cjs
  • cinnamon/muffin
  • cinnamon-control-center
  • cinnamon-menus
  • cinnamon-screen-saver'

if i were to do a thorough review of this PR, it would be very difficult to adhere to CONTRIBUTING standards

@worldofpeace
Copy link
Contributor

actually, I think moving some of these things into other PRs may help on being able to review the changes in a timely manner, some of things that can be refactored to other PRs because they don't rely on other cinnamon packages:

* add to maintainers list

* xapp

* cinnamon-old/cjs

* cinnamon/cjs

* cinnamon/muffin

* cinnamon-control-center

* cinnamon-menus

* cinnamon-screen-saver'

if i were to do a thorough review of this PR, it would be very difficult to adhere to CONTRIBUTING standards

It seems we established on #74242 (comment).
Though what you've suggested is much better though, it allows reviewers to review less in a sense.
(we've done that for deepin #59023, so things do actually get committed)

@mkg20001
Copy link
Member Author

mkg20001 commented Dec 4, 2019

So we could keep this PR as the "incubator" and then move things to other PRs for finalization, eventually moving everything from this PR into seperate PRs?

@mkg20001
Copy link
Member Author

mkg20001 commented Dec 4, 2019

While I'm here, why's there a cinnamon-old directory?

It's some older port of cinnamon

I'll look through those to find fixes to issues I have, since I've based off another cinnamon port. (nixos-cinnamon, and cinnamon-old is the old cinnamon from nixpkgs)

@mkg20001
Copy link
Member Author

mkg20001 commented Dec 7, 2019

I've created #75138 with just the xapps package. Please review 😄

@worldofpeace
Copy link
Contributor

worldofpeace commented Dec 7, 2019

@mkg20001, that sounds cool. As long as review doesn't get duplicated, I'll expect you moving your expressions into nixpkgs piece by piece from here.

Edit: I've updated the description so as to encourage review on the individual PRs.

@mkg20001
Copy link
Member Author

mkg20001 commented Dec 13, 2019

I'm still working on the other cinnamon packages in parallel in https://github.com/mkg20001/nixpkgs (this is where I keep all the stuff that is going to be up streamed eventually)

Edit: The reason because I don't want to push it into this PR, is because it's a gigantic mixture of all the patches and it would be too much effort to split commits, since I'd need to pull them in for testing everytime

I've stumbled upon #9415 because cinnamon fails to load opengl and that seems to be the reason

Also some module fails to find network manager libraries, so some NM stuff is still broken and it can't find adwaita (which package is it in? I've already added gtk3, unsure if I added it to the right package as build input)

Aside from that I've got the desktop working so far without bugs, just the cinnamon spices & nemo extensions are missing

screenshot

@nh2 nh2 mentioned this pull request Jan 19, 2020
10 tasks
@stale
Copy link

stale bot commented Jul 17, 2020

Hello, I'm a bot and I thank you in the name of the community for your contributions.

Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do:

If you received an approval by an unpriviledged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list.

If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past.

If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments.

Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 17, 2020
@mkg20001
Copy link
Member Author

mkg20001 commented Sep 8, 2020

merged with #97256

@mkg20001 mkg20001 closed this Sep 8, 2020
@mkg20001 mkg20001 deleted the cinnamon branch June 28, 2021 04:09
@mkg20001 mkg20001 restored the cinnamon branch June 28, 2021 04:09
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

7 participants