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

Add presentation app Spice Up #34546

Merged
merged 3 commits into from Feb 10, 2018
Merged

Add presentation app Spice Up #34546

merged 3 commits into from Feb 10, 2018

Conversation

samdroid-apps
Copy link
Contributor

Motivation for this change

Spice Up is a nice presentations app: https://medium.com/elementaryos/appcenter-spotlight-spice-up-65b7c169b3bd

It required also updating the dependency granite derivation. The only other user of granite is pantheon.pantheon-terminal, which was also tested.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Upstream has moved to GitHub, as the elementary.io page [1] now links to
the GitHub repository.

The only current dependant derivation is Pantheon Terminal
(pantheon.pantheon-terminal), which continues to work.

[1]: https://elementary.io/open-source
, intltool
, autoreconfHook
, pkgconfig
, libqalculate
Copy link
Contributor

Choose a reason for hiding this comment

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

¿Qué?

patches = [ ./0001-Remove-environment-dependant-CMake-configuration.patch ];

# Add extra packages to the VAPI path
# There is no environment variable, so we must edit the CMakeLists.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

Does not XDG_DATA_DIRS work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it does. I totally forgot that nix-build removes the environment variables

};

cmakeFlags = "-DINTROSPECTION_GIRDIR=share/gir-1.0/ -DINTROSPECTION_TYPELIBDIR=lib/girepository-1.0";
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also please change this into an array, when at it.

gnome3.gnome_themes_standard
];

enableParallelBuilding = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

CMake builds in parallel by default: #32271


enableParallelBuilding = true;

meta = with stdenv.lib; {
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing license.

Date: Sat, 3 Feb 2018 13:16:16 +1100
Subject: [PATCH] Remove environment dependant CMake configuration

This is broken by Nix's CMake patching scripts
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have a reference for this? In the setup hook, I only see a borked path replacer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah sorry that was bullshit

'';

nativeBuildInputs = [
intltool
Copy link
Contributor

Choose a reason for hiding this comment

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

gettext should be enough.

done
'';

nativeBuildInputs = [
Copy link
Contributor

Choose a reason for hiding this comment

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

XMLLINT not set and xmllint not found in path; skipping xml preprocessing.

adding libxml2 would be nice.

buildInputs = [perl cmake vala gobjectIntrospection glib gtk3 gnome3.libgee gettext];
nativeBuildInputs = [ vala pkgconfig cmake perl ];
buildInputs = [ gobjectIntrospection glib gtk3 gnome3.libgee gettext ];

meta = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe also add with stdenv.lib to clean it up a little.

nativeBuildInputs = [ pkgconfig ];
buildInputs = [perl cmake vala gobjectIntrospection glib gtk3 gnome3.libgee gettext];
nativeBuildInputs = [ vala pkgconfig cmake perl ];
buildInputs = [ gobjectIntrospection glib gtk3 gnome3.libgee gettext ];
Copy link
Contributor

Choose a reason for hiding this comment

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

gettext and gobjectIntrospection are only needed during build.

pkgconfig
wrapGAppsHook
vala
cmake
Copy link
Contributor

Choose a reason for hiding this comment

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

cmake should be used along with ninja for faster builds.

@samdroid-apps
Copy link
Contributor Author

Thanks for the review @jtojnar - I've force-pushed an update

nativeBuildInputs = [
vala
pkgconfig
cmake
Copy link
Contributor

Choose a reason for hiding this comment

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

Ninja here as well.

Date: Sat, 3 Feb 2018 13:16:16 +1100
Subject: [PATCH] Remove environment dependant CMake configuration

This is broken as nix unsets the $USER environment variable
Copy link
Contributor

Choose a reason for hiding this comment

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

Would setting the variable fix this? We should also set patch upstream, would quoting the variables work?


# Add extra packages to the VAPI path
# There is no environment variable, so we must edit the CMakeLists.txt
postPatch = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Err, so when testing without removing the postPatch, it is broken.

So vala uses the this function to lookup vapis in the path. It calls g_get_system_data_dirs (). That uses XDG spec:

$XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be **seperated with a colon ':'. **

So it was just broken because of a colon (whereas nix seems to default to space separated).

* move build time dependencies into nativeBuildInputs
* convert cmakeFlags to an array
* use `with` in the meta section
* add `ninja`
@samdroid-apps
Copy link
Contributor Author

@jtojnar thanks for the review again... this should fix your review issues. But it seems to break the icons; I'm not sure if that is inherited from my system environment or if that is an issue with the package.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 9, 2018

Some icons (e.g. document-export-symbolic) do not seem to be available outside of elementary icon theme.

LGTM otherwise.

@Mic92 Mic92 merged commit fdc9312 into NixOS:master Feb 10, 2018
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

4 participants