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

pantheon.evince: init #140828

Merged
merged 4 commits into from
Oct 17, 2021
Merged

pantheon.evince: init #140828

merged 4 commits into from
Oct 17, 2021

Conversation

bobby285271
Copy link
Member

@bobby285271 bobby285271 commented Oct 7, 2021

Motivation for this change

Related change:

Sorry for not noticing this before GNOME 41 packaging starts, maybe I should draft this for now?

FYI, we will have similar PR for file-roller soon, see:

pantheon.epiphany has already been added in #130380, I will also test the compatibility for that later (update: LGTM)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages 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/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: pantheon The Pantheon desktop environment 8.has: module (update) This PR changes an existing module in `nixos/` labels Oct 7, 2021
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Oct 7, 2021
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 labels Oct 7, 2021
@@ -40,6 +42,7 @@
, supportMultimedia ? true # PDF multimedia
, libgxps
, supportXPS ? true # Open XML Paper Specification via libgxps
, withPantheon ? false
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to build it without?

Copy link
Member

Choose a reason for hiding this comment

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

that's for gnome. see next file

Copy link
Member Author

Choose a reason for hiding this comment

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

I think with withPantheon enabled, evince will only respect dark mode setting from Pantheon and no longer respect gtk-application-prefer-dark-theme from ~/.config/gtk-3.0/settings.ini. Though I guess things will change soon (see this blog post).

@bobby285271
Copy link
Member Author

bobby285271 commented Oct 12, 2021

Rebased and I guess this is ready for review? (just noticed that evince isn't updated in the GNOME 41 PR)

@davidak
Copy link
Member

davidak commented Oct 12, 2021

Result of nixpkgs-review pr 140828 run on x86_64-linux 1

1 package blacklisted:
  • tests.nixos-functions.nixos-test
1 package failed to build:
  • nixos-install-tools
1 package built:
  • pantheon.evince

@davidak
Copy link
Member

davidak commented Oct 12, 2021

The package builds and works.

When i rebuild my system from the PR, tracker package fails. Might be unrelated to this change.

...
ninja: Entering directory `/build/tracker-3.2.0/build'
ninja: no work to do.
checking for jpeg_destroy_decompress in -ljpeg... yes
checking for jpeglib.h... checking how to run the C preprocessor... gcc -E
yes
 1/33 tracker:functional / ontology-rollback                  OK               0.74s
 2/33 tracker:gvdb / gvdb                                     OK               0.03s
 3/33 tracker:common / file-utils                             OK               0.04s
 4/33 tracker:common / utils                                  OK               0.04s
 5/33 tracker:data / crc32                                    OK               0.04s
 6/33 tracker:functional / group-concat                       OK               1.14s
checking for TIFFReadScanline in -ltiff... yes
 7/33 tracker:data / ontology-error                           OK               0.06s
 8/33 tracker:data / sparql-blank                             OK               0.15s
checking for tiffio.h... yes
 9/33 tracker:functional / collation                          OK               1.54s
10/33 tracker:functional+ipc / bus-query-cancellation         OK               1.36s
11/33 tracker:functional / coalesce                           OK               1.67s
12/33 tracker:functional / distance                           OK               1.67s
13/33 tracker:functional / fts-functions                      OK               1.74s
14/33 tracker:functional / sparql-bugs                        OK               1.79s
15/33 tracker:data / ontology-change                          OK               0.89s
16/33 tracker:functional / graph                              OK               1.92s
17/33 tracker:resource / resource                             FAIL             0.21s   killed by signal 6 SIGABRT
>>> MALLOC_PERTURB_=227 LANG=en_US.UTF8 TRACKER_LANGUAGE_STOP_WORDS_DIR=/build/tracker-3.2.0/src/libtracker-common/stop-words /build/tracker-3.2.0/build/tests/libtracker-sparql/tracker-resource-test
 ✀  
stdout:
# random seed: R02S717bb58fb461507f187fa3b23cbfee59
# Testing Tracker resource abstraction
1..6
# Start of libtracker-sparql tests
# Start of tracker-resource tests
ok 1 /libtracker-sparql/tracker-resource/get_empty
Bail out! Tracker:ERROR:../tests/libtracker-sparql/tracker-resource-test.c:61:test_resource_get_set_simple: 'tracker_resource_get_first_double (resource, "http://example.com/1") == 0.6' should be TRUE
stderr:
**
Tracker:ERROR:../tests/libtracker-sparql/tracker-resource-test.c:61:test_resource_get_set_simple: 'tracker_resource_get_first_double (resource, "http://example.com/1") == 0.6' should be TRUE

@jtojnar
Copy link
Member

jtojnar commented Oct 12, 2021

@davidak can you reproduce issue repeatedly? What happens when you try to apply the following patch to tracker:

git clone https://gitlab.gnome.org/GNOME/tracker.git
cd tracker/
git checkout 3.2.0
git apply <(curl -L https://gist.github.com/jtojnar/dfa8212436631ecfd63d2a8f716b7964/raw/45cfb2093c7b5f4fd1f545670e352d6f1e091eb7/tracker-test.patch)
diff --git a/pkgs/development/libraries/tracker/default.nix b/pkgs/development/libraries/tracker/default.nix
index 39ac21b7ad6..ae9b25d3579 100644
--- a/pkgs/development/libraries/tracker/default.nix
+++ b/pkgs/development/libraries/tracker/default.nix
@@ -32,12 +32,9 @@ stdenv.mkDerivation rec {
   pname = "tracker";
   version = "3.2.0";
 
-  outputs = [ "out" "dev" "devdoc" ];
+  outputs = [ "out" "dev" /*"devdoc"*/ ];
 
-  src = fetchurl {
-    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
-    sha256 = "sha256-8RelKHXUpNCceqmT+Mio0GRo1dz7FT642qUesThEUTo=";
-  };
+  src = /home/jtojnar/Projects/tracker;
 
   patches = [
     (substituteAll {
@@ -81,7 +78,7 @@ stdenv.mkDerivation rec {
   ];
 
   mesonFlags = [
-    "-Ddocs=true"
+    "-Ddocs=false"
   ];
 
   doCheck = true;

@davidak
Copy link
Member

davidak commented Oct 12, 2021

can you reproduce issue repeatedly?

yes. happened in 5/5 cases

What happens when you try to apply the following patch to tracker

i get a similar issue

ninja: Entering directory `/build/tracker/build'
ninja: no work to do.
 1/33 tracker:functional / ontology-rollback                  OK               0.80s
 2/33 tracker:gvdb / gvdb                                     OK               0.05s
 3/33 tracker:common / file-utils                             OK               0.02s
 4/33 tracker:functional / fts-functions                      OK               1.14s
 5/33 tracker:common / utils                                  OK               0.06s
 6/33 tracker:functional+ipc / bus-query-cancellation         OK               0.91s
 7/33 tracker:data / crc32                                    OK               0.10s
 8/33 tracker:data / ontology-error                           OK               0.10s
 9/33 tracker:functional / coalesce                           OK               1.33s
10/33 tracker:data / sparql-blank                             OK               0.17s
11/33 tracker:functional / sparql-bugs                        OK               1.50s
12/33 tracker:functional / group-concat                       OK               1.57s
13/33 tracker:functional / collation                          OK               1.47s
14/33 tracker:functional / distance                           OK               1.63s
15/33 tracker:resource / resource                             OK               0.11s
16/33 tracker:functional / graph                              OK               1.72s
17/33 tracker:data / insert-or-replace                        OK               0.55s
18/33 tracker:data / ontology-change                          OK               0.80s
19/33 tracker:fts / fts                                       OK               0.46s
20/33 tracker:functional / query                              OK               2.17s
21/33 tracker:functional / notifier                           OK               2.12s
22/33 tracker:functional / insertion                          OK               2.40s
23/33 tracker:functional / concurrent-query                   OK               2.89s
24/33 tracker:functional / ontology-changes                   OK               2.83s
25/33 tracker:functional / cli                                OK               3.12s
  CC       testhatchbrush.o
26/33 tracker:functional / portal                             OK               4.76s
  CC       testicocodec.o
27/33 tracker:data+slow / ontology                            OK               4.62s
  CC       testimageattributes.o
  CC       testjpegcodec.o
  CC       testlineargradientbrush.o
28/33 tracker:data / service                                  OK               8.46s
copying path '/nix/store/jqi44id9x20jdk8zmj0fp09ksy5h1699-espeak-ng-1.50' from 'https://cache.nixos.org'...
copying path '/nix/store/r024jclj9p55pp9q8i78p744nnxp98ya-speech-dispatcher-0.10.2' from 'https://cache.nixos.org'...
[168/168] Linking target examples/libtracker-sparql/async-connectionn.p/async-connection.c.ory-cancellation.c.oKa src/libtracker-sparql/tracker-sparql-3.0.vapi
running tests
  CC       testmatrix.o
ninja: Entering directory `/build/tracker/build'
ninja: no work to do.
29/33 tracker:data+slow / sparql                              OK              11.70s
 1/33 tracker:functional / ontology-rollback                  OK               0.92s
 2/33 tracker:gvdb / gvdb                                     OK               0.02s
 3/33 tracker:common / file-utils                             OK               0.03s
 4/33 tracker:common / utils                                  OK               0.02s
 5/33 tracker:data / crc32                                    OK               0.07s
 6/33 tracker:functional / group-concat                       OK               1.21s
 7/33 tracker:data / ontology-error                           OK               0.08s
30/33 tracker:sparql / sparql                                 OK               1.11s
 8/33 tracker:functional / fts-functions                      OK               1.35s
 9/33 tracker:functional+ipc / bus-query-cancellation         OK               1.18s
10/33 tracker:functional / distance                           OK               1.44s
11/33 tracker:data / sparql-blank                             OK               0.19s
12/33 tracker:functional / graph                              OK               1.58s
13/33 tracker:functional / coalesce                           OK               1.69s
14/33 tracker:functional / sparql-bugs                        OK               1.89s
15/33 tracker:resource / resource                             FAIL             0.23s   killed by signal 6 SIGABRT
>>> LANG=en_US.UTF8 TRACKER_LANGUAGE_STOP_WORDS_DIR=/build/tracker/src/libtracker-common/stop-words MALLOC_PERTURB_=253 /build/tracker/build/tests/libtracker-sparql/tracker-resource-test
 ✀  
stdout:
# random seed: R02S0b5bae3a7007bd4302d2a267a24b6ce9
# Testing Tracker resource abstraction
1..6
# Start of libtracker-sparql tests
# Start of tracker-resource tests
ok 1 /libtracker-sparql/tracker-resource/get_empty
Bail out! Tracker:ERROR:../tests/libtracker-sparql/tracker-resource-test.c:61:test_resource_get_set_simple: assertion failed (tracker_resource_get_first_double (resource, "http://example.com/1") == 0.6): (0.6 == 0.6)
stderr:
**
Tracker:ERROR:../tests/libtracker-sparql/tracker-resource-test.c:61:test_resource_get_set_simple: assertion failed (tracker_resource_get_first_double (resource, "http://example.com/1") == 0.6): (0.6 == 0.6)

@jtojnar
Copy link
Member

jtojnar commented Oct 13, 2021

Opened an issue upstream: https://gitlab.gnome.org/GNOME/tracker/-/issues/332

@davidak
Copy link
Member

davidak commented Oct 13, 2021

Do we have to wait for it to be fixed to proceed here? Or should the package be downgraded to a version that works? Probably blocks all that depend on GTK3?

@jtojnar
Copy link
Member

jtojnar commented Oct 13, 2021

It should not matter, Hydra can build it just fine. Downgrade will not be possible due to libsoup shenanigans (unless backported).

@davidak
Copy link
Member

davidak commented Oct 16, 2021

Fix was merged.

@bobby285271 can you rebase?

@davidak
Copy link
Member

davidak commented Oct 16, 2021

Just realized i can do it myself in my local branch and it shouldn't matter for the PR.

@davidak
Copy link
Member

davidak commented Oct 16, 2021

@bobby285271 thanks.

The patch fails now. Can you have a look?

patching sources
applying patch /nix/store/8qh017a2pgxqh8m80l52lymb78nmmpsl-dark-style.patch
patching file meson.build
Hunk #1 FAILED at 155.
1 out of 1 hunk FAILED -- saving rejects to file meson.build.rej
patching file shell/ev-application.c
Hunk #1 FAILED at 30.
1 out of 5 hunks FAILED -- saving rejects to file shell/ev-application.c.rej
patching file shell/meson.build
builder for '/nix/store/w7ykjf6jmhya4ybnvbwm9qw8r30mcqc2-evince-41.2.drv' failed with exit code 1

@bobby285271 bobby285271 marked this pull request as draft October 16, 2021 16:51
@bobby285271
Copy link
Member Author

Yeah the patch is for evince 40 and I just noticed that evince 41 is in master now.

It's 0:57 in UTC+8 and I will do this when I wake up :-)

@bobby285271 bobby285271 marked this pull request as ready for review October 17, 2021 02:34
Copy link
Member

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

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

Mostly looks good, just few nits.

pkgs/desktops/gnome/core/evince/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/gnome/core/evince/default.nix Outdated Show resolved Hide resolved
pkgs/desktops/gnome/core/evince/default.nix Show resolved Hide resolved
Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

Change looks good

Builds, works

dark-mode is respected now

@davidak davidak merged commit 249d3f3 into NixOS:master Oct 17, 2021
@bobby285271 bobby285271 deleted the evince branch October 18, 2021 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: pantheon The Pantheon desktop environment 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants