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

Librem 5 phone packages #88767

Closed
wants to merge 36 commits into from
Closed

Librem 5 phone packages #88767

wants to merge 36 commits into from

Conversation

masipcat
Copy link
Contributor

@masipcat masipcat commented May 24, 2020

Motivation for this change

Use this amazing applications from Librem on PinePhone running Mobile NixOS

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.

Custom:

  • Tested on a PinePhone running Mobile NixOS 20.09-unstable

Closes #72715
Based on PR #57614 from @jtojnar

@masipcat masipcat changed the title Librem 5 Phone packages Librem 5 phone packages May 24, 2020
@ofborg ofborg bot requested a review from jtojnar May 24, 2020 11:07
@prusnak
Copy link
Member

prusnak commented May 24, 2020

Please change the commit message of the last commit to maintainers: add masipcat

@prusnak
Copy link
Member

prusnak commented May 24, 2020

PR #65361 also mentions calls. Would you like to add that as well?

pkgs/applications/misc/feedbackd/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/phoc/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/squeekboard/default.nix Outdated Show resolved Hide resolved
pkgs/applications/window-managers/phosh/default.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/libcroco/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/phoc/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/squeekboard/default.nix Outdated Show resolved Hide resolved
@masipcat
Copy link
Contributor Author

PR #65361 also mentions calls. Would you like to add that as well?

Already in nixpkgs: https://github.com/NixOS/nixpkgs/blob/6ade57efe37b5a4bc08b36579f771e0629f481cc/pkgs/applications/networking/calls/default.nix . There is a new version 0.1.5 but I think i'll update it in another PR

pkgs/applications/window-managers/phosh/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/feedbackd/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/phoc/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/squeekboard/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/feedbackd/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/feedbackd/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/phoc/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/phoc/default.nix Show resolved Hide resolved
pkgs/applications/misc/squeekboard/default.nix Outdated Show resolved Hide resolved
pkgs/applications/misc/squeekboard/default.nix Outdated Show resolved Hide resolved
@ofborg ofborg bot requested a review from jtojnar May 24, 2020 13:20
@ofborg ofborg bot requested a review from jtojnar May 24, 2020 13:24
@stale
Copy link

stale bot commented Jan 2, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2021
@flokli
Copy link
Contributor

flokli commented Jan 2, 2021

Ouch, I'm sad to see this gone stale. @masipcat, was there anything in here not addressed yet? Or does this mostly need another rebase?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2021
@masipcat
Copy link
Contributor Author

I think the packages were working fine and the missing bits were in the phosh-ui module. But right now I don't have time to continue to this PR :(

btw, the package feedbackd (part of this PR) is already on master: #107681

@archseer
Copy link
Member

I'll be trying to finish up this PR next week. Sorted out mobile-nixos on my pinephone last week, so phosh was my next step :)

@archseer
Copy link
Member

archseer commented Feb 1, 2021

master...archseer:librem

I updated phoc and phosh, but I've been having problems packaging squeekboard. Squeekboard uses cargo through it's meson build, and Cargo.toml is now generated during build time. If I follow correctly, @masipcat's definition used the rust builder to fetch the dependencies, then proceed with the meson build. That now fails because Cargo.toml is no longer present, instead there's Cargo.toml.in and Cargo.deps. I've been trying to do cat Cargo.toml.in Cargo.deps > Cargo.toml as a workaround inside the postUnpack phase, but that gets called after the vendoring hook so it doesn't quite work...

Librem also maintains their own gnome-settings-daemon fork that we'd need to package (it adds some options and drops a few dependencies?). As an aside, it has been a total pain to cross-compile things because the total graph ended up being almost 3k packages. gnome-settings-daemon pulls in a bunch of applications which pull in codecs that haven't been updated since 2002 that need patches to properly cross-compile.

@claudiiii
Copy link
Contributor

@archseer I got Squeekboard to build using cargoUpdateHook to create the Cargo.toml. (Got that from #95331 (comment))

@Pacman99
Copy link
Contributor

I think these packages should go under the gnome3 namespace. They are very closely related to gnome. And some already have plans to be moved to the gnome infrastructure, while others will probably be moved eventually
.
One option could be to make a mobile folder in desktops/gnome-3 and put them all in there.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 15, 2021

AIUI they are only slightly more related to GNOME than Pantheon is. And we are actually trying to remove everything but gnome-core from the gnome3 namespace to make it easier to use in other desktops’ expressions.

@Pacman99
Copy link
Contributor

Ohh I didn't know that. Well it would be nice if there was a better place to put them rather than misc.

Also I think phoc can go in window-managers, its a compositor just like sway which is also there. And phosh would probably be better described as a desktop.

@Mindavi
Copy link
Contributor

Mindavi commented Mar 10, 2021

I guess things like squeekboard could go under applications/mobile, that seems appropriate.

Gonna try getting archseer's fork working on my PinePhone. Is there anything that still needs to be done? Been sitting on a branch that builds correctly, but I'm still missing a display manager etc that actually cross-compiles.

@zhaofengli
Copy link
Member

So I was able to get Phosh to start on the latest master (started directly without a display manager), with the changes here. Some notes:

One thing I don't understand is that gnome-session can't seem to find Phosh's session file. At the end of the launch script it tries to run gnome-session in a new login shell to start Phosh itself. Phosh's share directory is added to XDG_DATA_DIRS in the wrapper, so it should theoretically be able to find the session file. However, the debug log showed otherwise, with gnome-session searching in paths different from what I'd expect from XDG_DATA_DIRS. Can someone shed some light here? I'm currently testing by copying Phosh's session file to the user's session directory.

Shall we play Reversi? iagno

@Mindavi
Copy link
Contributor

Mindavi commented Mar 13, 2021

I merged your branch into mine, but it's missing this patch: ./0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch. Is it just a revert commit of the one patch?

@zhaofengli
Copy link
Member

I merged your branch into mine, but it's missing this patch: ./0001-Revert-layer-shell-error-on-0-dimension-without-anch.patch. Is it just a revert commit of the one patch?

Sorry, forgot to add the patch. It's the one I linked in the comment. I have updated my branch.

@zhaofengli zhaofengli mentioned this pull request Mar 13, 2021
10 tasks
@queezle42
Copy link
Contributor

queezle42 commented Mar 13, 2021

@archseer I was able to update squeekboard to 1.12.0, feel free to copy from
https://git.c3pb.de/jens/dotfiles/-/blob/cbda9bf286ccf48603833bccee8e2c9d459f5b9e/pkgs/squeekboard/default.nix

@zhaofengli
Copy link
Member

I have rebased my branch against master, now that squeekboard is added into Nixpkgs in #116253. It seems to work fine on my PinePhone.

In case you are interested in trying out Purism's patches against GTK which implement mobile-friendly versions of some GTK components/dialogs, you can cherry-pick this commit and replace the system GTK with one that have withPurismPatches = true in system.replaceRuntimeDependencies.

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/mobile-nixos-progress-thread/342/65

@zhaofengli
Copy link
Member

I've rebased my branch again and bumped the versions of Phoc and Phosh. Anything we can do to push this PR forward?

@jtojnar
Copy link
Contributor

jtojnar commented Apr 29, 2021

I guess at this point it would be best if you opened a new PR.

@zhaofengli zhaofengli mentioned this pull request Apr 30, 2021
10 tasks
@zhaofengli
Copy link
Member

New PR opened: #121226

@jtojnar
Copy link
Contributor

jtojnar commented Apr 30, 2021

Thanks, closing in favour of that. And thanks masipcat for getting this off the ground.

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.

Phosh - Mobile-friendly replacement for the GNOME shell