Merge pull request #158048 from symphorien/paperwork-update-script

paperwork: 2.1.0 -> 2.1.1
This commit is contained in:
Guillaume Girol 2022-03-05 14:06:23 +00:00 committed by GitHub
commit 7df33c6be9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 5 deletions

View file

@ -39,5 +39,6 @@ buildPythonPackage rec {
homepage = "https://openpaper.work/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aszlig symphorien ];
platforms = lib.platforms.linux;
};
}

View file

@ -49,5 +49,6 @@ buildPythonPackage rec {
homepage = "https://openpaper.work/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aszlig symphorien ];
platforms = lib.platforms.linux;
};
}

View file

@ -16,6 +16,7 @@
, texlive
, imagemagick
, perlPackages
, writeScript
}:
let
@ -27,12 +28,19 @@ let
imagemagick
perlPackages.Po4a
];
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src sample_documents;
in
python3Packages.buildPythonApplication rec {
inherit (import ./src.nix { inherit fetchFromGitLab; }) version src sample_documents;
inherit src version;
pname = "paperwork";
sample_docs = sample_documents // {
# a trick for the update script
name = "sample_documents";
src = sample_documents;
};
sourceRoot = "source/paperwork-gtk";
# Patch out a few paths that assume that we're using the FHS:
@ -69,7 +77,7 @@ python3Packages.buildPythonApplication rec {
export XDG_DATA_DIRS=$XDG_DATA_DIRS:${gnome.adwaita-icon-theme}/share
# build the user manual
PATH=$out/bin:$PATH PAPERWORK_TEST_DOCUMENTS=${sample_documents} make data
PATH=$out/bin:$PATH PAPERWORK_TEST_DOCUMENTS=${sample_docs} make data
for i in src/paperwork_gtk/model/help/out/*.pdf; do
install -Dt $site/model/help/out $i
done
@ -122,12 +130,20 @@ python3Packages.buildPythonApplication rec {
openpaperwork-core
pypillowfight
pyxdg
python-dateutil
setuptools
];
disallowedRequisites = documentation_deps;
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
version=$(list-git-tags https://gitlab.gnome.org/World/OpenPaperwork/paperwork.git | sed 's/^v//' | sort -V | tail -n1)
update-source-version paperwork "$version" --file=pkgs/applications/office/paperwork/src.nix
docs_version="$(curl https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/raw/$version/paperwork-gtk/src/paperwork_gtk/model/help/screenshot.sh | grep TEST_DOCS_TAG= | cut -d'"' -f2)"
update-source-version paperwork.sample_docs "$docs_version" --file=pkgs/applications/office/paperwork/src.nix --version-key=rev
'';
meta = {
description = "A personal document manager for scanned documents";
homepage = "https://openpaper.work/";

View file

@ -1,13 +1,13 @@
{fetchFromGitLab}:
rec {
version = "2.1.0";
version = "2.1.1";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
repo = "paperwork";
group = "World";
owner = "OpenPaperwork";
rev = version;
sha256 = "0d1cw6k1giqs8ji8h3h97ckb134s8pszgip0nac5hmw0mvqq84xa";
sha256 = "2M2eMP54F3RRDMBuAZ1gBiBoMmTRJaHTUwtTjj4ZU+4=";
};
sample_documents = fetchFromGitLab {
domain = "gitlab.gnome.org";