Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6c9580f1896c
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 01083f116d9b
Choose a head ref
  • 6 commits
  • 13 files changed
  • 2 contributors

Commits on Oct 31, 2020

  1. Copy the full SHA
    0cf43ed View commit details

Commits on Nov 1, 2020

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f269e31 View commit details

Commits on Nov 15, 2020

  1. paperwork: 1.3.1 -> 2.0

    symphorien committed Nov 15, 2020
    Copy the full SHA
    74b9066 View commit details
  2. Copy the full SHA
    3c9707d View commit details
  3. paperwork: 2.0 -> 2.0.1

    symphorien committed Nov 15, 2020
    Copy the full SHA
    0c38b12 View commit details

Commits on Nov 20, 2020

  1. Merge pull request #102235 from symphorien/paperwork2

    Paperwork 2.0
    symphorien authored Nov 20, 2020
    Copy the full SHA
    01083f1 View commit details
7 changes: 7 additions & 0 deletions nixos/doc/manual/release-notes/rl-2103.xml
Original file line number Diff line number Diff line change
@@ -126,6 +126,13 @@
to <literal>/run/pdns-recursor</literal> to match upstream.
</para>
</listitem>
<listitem>
<para>
Paperwork was updated to version 2. The on-disk format slightly changed,
and it is not possible to downgrade from Paperwork 2 back to Paperwork
1.3. Back your documents up before upgrading. See <link xlink:href="https://forum.openpaper.work/t/paperwork-2-0/112/5">this thread</link> for more details.
</para>
</listitem>
<listitem>
<para>
PowerDNS has been updated from <literal>4.2.x</literal> to <literal>4.3.x</literal>. Please
48 changes: 0 additions & 48 deletions pkgs/applications/office/paperwork/backend.nix

This file was deleted.

42 changes: 42 additions & 0 deletions pkgs/applications/office/paperwork/openpaperwork-core.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ buildPythonPackage, lib, fetchFromGitLab

, isPy3k, isPyPy

, distro, setuptools

, pkgs
}:

buildPythonPackage rec {
pname = "openpaperwork-core";
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;

sourceRoot = "source/openpaperwork-core";

# Python 2.x is not supported.
disabled = !isPy3k && !isPyPy;

patchPhase = ''
echo 'version = "${version}"' > src/openpaperwork_core/_version.py
chmod a+w -R ..
patchShebangs ../tools
'';

propagatedBuildInputs = [
distro
setuptools
];

nativeBuildInputs = [ pkgs.gettext pkgs.which ];

preBuild = ''
make l10n_compile
'';

meta = {
description = "Backend part of Paperwork (Python API, no UI)";
homepage = "https://openpaper.work/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aszlig symphorien ];
};
}
52 changes: 52 additions & 0 deletions pkgs/applications/office/paperwork/openpaperwork-gtk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{ buildPythonPackage
, lib
, fetchFromGitLab

, isPy3k
, isPyPy

, openpaperwork-core
, pillow
, pygobject3
, distro

, pkgs
}:

buildPythonPackage rec {
pname = "openpaperwork-gtk";
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;

sourceRoot = "source/openpaperwork-gtk";

# Python 2.x is not supported.
disabled = !isPy3k && !isPyPy;

patchPhase = ''
echo 'version = "${version}"' > src/openpaperwork_gtk/_version.py
chmod a+w -R ..
patchShebangs ../tools
'';

nativeBuildInputs = [ pkgs.gettext pkgs.which ];
preBuild = ''
make l10n_compile
'';

propagatedBuildInputs = [
pillow
pygobject3
pkgs.poppler_gi
pkgs.gtk3
distro
pkgs.pango
openpaperwork-core
];

meta = {
description = "Reusable GTK components of Paperwork";
homepage = "https://openpaper.work/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aszlig symphorien ];
};
}
77 changes: 77 additions & 0 deletions pkgs/applications/office/paperwork/paperwork-backend.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{ buildPythonPackage
, lib
, fetchFromGitLab

, isPy3k
, isPyPy

, pyenchant
, simplebayes
, pypillowfight
, pycountry
, whoosh
, termcolor
, python-Levenshtein
, pygobject3
, pyocr
, natsort
, libinsane
, distro
, openpaperwork-core
, openpaperwork-gtk
, psutil

, pkgs
}:

buildPythonPackage rec {
pname = "paperwork-backend";
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;

sourceRoot = "source/paperwork-backend";

# Python 2.x is not supported.
disabled = !isPy3k && !isPyPy;

patchPhase = ''
echo 'version = "${version}"' > src/paperwork_backend/_version.py
chmod a+w -R ..
patchShebangs ../tools
'';

propagatedBuildInputs = [
pyenchant
simplebayes
pypillowfight
pycountry
whoosh
termcolor
python-Levenshtein
libinsane
pygobject3
pyocr
natsort
pkgs.poppler_gi
pkgs.gtk3
distro
openpaperwork-core
];

preCheck = ''
export HOME=$(mktemp -d)
'';

nativeBuildInputs = [ pkgs.gettext pkgs.which ];
preBuild = ''
make l10n_compile
'';

checkInputs = [ openpaperwork-gtk psutil ];

meta = {
description = "Backend part of Paperwork (Python API, no UI)";
homepage = "https://openpaper.work/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aszlig symphorien ];
};
}
Original file line number Diff line number Diff line change
@@ -10,83 +10,86 @@
, dbus
, libnotify
, wrapGAppsHook
, fetchFromGitLab
, which
, gettext
, gobject-introspection
}:

python3Packages.buildPythonApplication rec {
inherit (python3Packages.paperwork-backend) version src;
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src;
pname = "paperwork";

sourceRoot = "source/paperwork-gtk";

# Patch out a few paths that assume that we're using the FHS:
postPatch = ''
themeDir="$(echo "${gnome3.adwaita-icon-theme}/share/icons/"*)"
sed -i -e "s,/usr/share/icons/gnome,$themeDir," src/paperwork/deps.py
chmod a+w -R ..
patchShebangs ../tools
sed -i -e 's,sys\.prefix,"",g' \
src/paperwork/frontend/aboutdialog/__init__.py \
src/paperwork/frontend/mainwindow/__init__.py \
setup.py
export HOME=$(mktemp -d)
sed -i -e '/^UI_FILES_DIRS = \[/,/^\]$/ {
c UI_FILES_DIRS = ["'"$out/share/paperwork"'"]
}' src/paperwork/frontend/util/__init__.py
sed -i -e '/^LOCALE_PATHS = \[/,/^\]$/ {
c LOCALE_PATHS = ["'"$out/share"'"]
}' src/paperwork/paperwork.py
sed -i -e 's/"icon"/"icon-name"/g' \
src/paperwork/frontend/mainwindow/mainwindow.glade
sed -i -e 's/"logo"/"logo-icon-name"/g' \
src/paperwork/frontend/aboutdialog/aboutdialog.glade
cat - ../AUTHORS.py > src/paperwork/_version.py <<EOF
cat - ../AUTHORS.py > src/paperwork_gtk/_version.py <<EOF
# -*- coding: utf-8 -*-
version = "${version}"
authors_code=""
EOF
'';

preBuild = ''
make l10n_compile
'';

ASPELL_CONF = "dict-dir ${buildEnv {
name = "aspell-all-dicts";
paths = lib.collect lib.isDerivation aspellDicts;
}}/lib/aspell";

postInstall = ''
# paperwork-shell needs to be re-wrapped with access to paperwork
cp ${python3Packages.paperwork-backend}/bin/.paperwork-shell-wrapped $out/bin/paperwork-shell
cp ${python3Packages.paperwork-shell}/bin/.paperwork-cli-wrapped $out/bin/paperwork-cli
# install desktop files and icons
XDG_DATA_HOME=$out/share $out/bin/paperwork-shell install
XDG_DATA_HOME=$out/share $out/bin/paperwork-gtk install --user
'';

checkInputs = [ xvfb_run dbus.daemon ] ++ (with python3Packages; [ paperwork-backend ]);
checkInputs = [ xvfb_run dbus.daemon ];

nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
(lib.getBin gettext)
which
];

buildInputs = [
gnome3.adwaita-icon-theme
libnotify
librsvg
gtk3
cairo
];

dontWrapGApps = true;

preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';

# A few parts of chkdeps need to have a display and a dbus session, so we not
# only need to run a virtual X server + dbus but also have a large enough
# resolution, because the Cairo test tries to draw a 200x200 window.
preCheck = ''
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
paperwork-shell chkdeps paperwork
$out/bin/paperwork-gtk chkdeps
'';

propagatedBuildInputs = with python3Packages; [
paperwork-backend
paperwork-shell
openpaperwork-gtk
openpaperwork-core
pypillowfight
gtk3
cairo
pyxdg
dateutil
setuptools
Loading