From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 05cgILhADl9nPQAA0tVLHw (envelope-from ) for ; Tue, 14 Jul 2020 23:33:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id wERxG7hADl8DCwAAbx9fmQ (envelope-from ) for ; Tue, 14 Jul 2020 23:33:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9644A940630 for ; Tue, 14 Jul 2020 23:33:11 +0000 (UTC) Received: from localhost ([::1]:32866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvUQ9-0007pl-HD for larch@yhetil.org; Tue, 14 Jul 2020 19:33:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvUQ2-0007pE-GA for guix-patches@gnu.org; Tue, 14 Jul 2020 19:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvUQ2-0000Gu-6C for guix-patches@gnu.org; Tue, 14 Jul 2020 19:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jvUQ2-0008Jc-3R for guix-patches@gnu.org; Tue, 14 Jul 2020 19:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42357] [PATCH] add package definition for Nextcloud Desktop Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 Jul 2020 23:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tim Magee Cc: 42357@debbugs.gnu.org Received: via spool by 42357-submit@debbugs.gnu.org id=B42357.159476954331893 (code B ref 42357); Tue, 14 Jul 2020 23:33:02 +0000 Received: (at 42357) by debbugs.gnu.org; 14 Jul 2020 23:32:23 +0000 Received: from localhost ([127.0.0.1]:51781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jvUPH-0008IE-Fi for submit@debbugs.gnu.org; Tue, 14 Jul 2020 19:32:23 -0400 Received: from tobias.gr ([80.241.217.52]:50968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jvUPF-0008I4-0g for 42357@debbugs.gnu.org; Tue, 14 Jul 2020 19:32:14 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 4868182d; Tue, 14 Jul 2020 23:32:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=xmxPA5kvrH/zYsp0ArTrF5 qbNFd3DQGI8fZ6SuOnPL8=; b=Ht+rXLEXCErpm8xSwxanddN7M2TWG2uFgKhrZf UhUarUXWIe/Qr4p4JKmyR72zJ/Y1U+d3OsNRDD4c+l8yfwiz3r/GBB+Gghh7OUk/ wXw5A8NOxs1AhK1TvlgaPcIsBdA4xbIFuKcwdW/o9EXa+0D1xj1ecuYkWJ0TI7TX wWTMnVGXAIgq9tH/dz//K52fNAAi2QzNKwDKq6FmSV+JN4+FIChFFgSCbgXcLmya YICPfXLbMGtExDxmPJJiXhCRqlQ0hAVH/T2SKJcwiPkoUF0srqrzFgk5bMFAKEW6 XVIWsQ2UREFqycEDl89AZFsajPo7UD1wH6gxPi5h+NYadq4g== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 616395bd (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 14 Jul 2020 23:32:22 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; References: In-reply-to: Date: Wed, 15 Jul 2020 01:32:10 +0200 Message-ID: <87pn8xk70l.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=tobias.gr header.s=2018 header.b=Ht+rXLEX; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.11 X-TUID: MmII3wHVwn2b --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Tim, Thank you! I hope you enjoyed making your first submitted Guix=20 package. Some things that need to be taken care of before it can be merged: Tim Magee =E5=86=99=E9=81=93=EF=BC=9A > + %D%/packages/patches/nextxcloud-fix-filenames.patch=20 > \ Sneaky typo. ./pre-inst-env won't care but it would break =E2=80=98guix=20 pull=E2=80=99. > --- /dev/null > +++ b/gnu/packages/nextcloud.scm > @@ -0,0 +1,397 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2015, 2016, 2017, 2018, 2019 Efraim Flashner > > +;;; Copyright =C2=A9 2017 Ricardo Wurmus > +;;; Copyright =C2=A9 2018, 2019, 2020 Tobias Geerinckx-Rice=20 > > +;;; Copyright =C2=A9 2018 Ludovic Court=C3=A8s > +;;; Copyright =C2=A9 2018, 2019, 2020 Nicolas Goaziou=20 > > +;;; Copyright =C2=A9 2019 Cl=C3=A9ment Lassieur > +;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka > +;;; Copyright =C2=A9 2020 Tim Magee Humm=E2=80=A6 oh. I guess you first added NextCloud to sync.scm, then decided to put=20 it in its own file (or maybe because I told you so :-). Don't=20 forget to delete all the previous copyright lines (unless you=20 borrowed code from elsewhere), and packages other than=20 nextcloud-desktop. > +(define-module (gnu packages nextcloud) > + #:use-module ((guix licenses) #:prefix license:) [=E2=80=A6] Best to delete this list, start from scratch, copy back only=20 what's needed to build nextcloud-desktop. > +(define-public nextcloud-desktop > + (package > + (name "nextcloud-desktop") > + (version "2.6.5") > + (source > + (origin > + (method url-fetch) > + (uri (string-append "https://github.com/" > + "nextcloud/desktop/archive/v"=20 > version > ".tar.gz")) Avoid GitHub's /archive/ tarballs. They're auto-generated and=20 provide no value over a git checkout. They can also change=20 unexpectedly leading to hash mismatches. This has happened in the=20 past. Instead: =2D-8<---------------cut here---------------start------------->8--- (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/nextcloud/desktop") (commit (string-append "v" version)))) (sha256 (base32 "=E2=80=A6")) (file-name (git-file-name name version)))) =2D-8<---------------cut here---------------end--------------->8--- COMMIT can actually be any supported git ref; here it's a tag=20 which makes updating the package a breeze. > + ;; I cherry picked this patch from Nextcloud > + (patches (search-patches=20 > "nextcloud-fix-filenames.patch")) Please move the comment to the patch file (you can type whatever=20 you want above its first line) and include a link to the exact=20 upstream commit. The patch file itself is missing from this patch, you probably=20 need to =E2=80=98git add=E2=80=99 it, then =E2=80=98git commit --amend=E2= =80=99. > + (modules '((guix build utils))) > + (snippet > + '(begin > + ;; libcrashreporter-qt has its own bundled=20 > dependencies > + (delete-file-recursively=20 > "src/3rdparty/libcrashreporter-qt") > + (delete-file-recursively "src/3rdparty/sqlite3") > + ;; qprogessindicator, qlockedfile, qtokenizer and > + ;; qtsingleapplication have not yet been packaged,=20 > but all are > + ;; explicitly used from the 3rdparty folder during=20 > build. > + #t)))) > + (build-system cmake-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'delete-failing-utility-test ^^^^^^ This is a tab, which is character non grata in Guix Scheme code.=20 I won't point them all out: =E2=80=98guix lint=E2=80=99 should warn you abo= ut=20 them. If you're not using emacs, check out etc/indent-code.el in the=20 Guix source tree. It will indent your code for you using emacs=20 and Guix's style rules. > + ;; "Could not create autostart folder" Nitpick: ;;-comments are sentences, hence capitalised & ending=20 with a full stop. Same for the snippet comments above, but libfoo=20 can remain lowercase there. > + (lambda _ > + (substitute* "test/CMakeLists.txt" > + (("nextcloud_add_test\\(Utility \"\"\\)"=20 > test) > + (string-append "#" test))) > + #t)) > + (add-after 'unpack 'delete-failing-files-test These 2 can be combined into one =E2=80=98skip-failing-tests=E2=80=99 phase= , and=20 even one single substitute* call: =2D-8<---------------cut here---------------start------------->8--- (substitute* "test/CMakeLists.txt" (("nextcloud_add_test\\(Utility \"\"\\)" test) (string-append "#" test)) (("nextcloud_add_test\\(AllFilesDeleted=20 \"syncenginetestutils.h\"\\)" test) (string-append "#" test))) =2D-8<---------------cut here---------------end--------------->8--- > + (delete 'patch-dot-desktop-files)) Please explain why in a comment. > + #:configure-flags '("-DUNIT_TESTING=3DON"))) Thanks for taking the trouble to enable and fix tests! > + (native-inputs > + `(("cmocka" ,cmocka) > + ("perl" ,perl) > + ("pkg-config" ,pkg-config) > + ("qtlinguist" ,qttools))) > + (inputs > + `(("openssl" , openssl) > + ("qtbase" ,qtbase) > + ("qtdeclarative" ,qtdeclarative) > + ("qtkeychain" ,qtkeychain) > +;; ("qtquickcontrols" ,qtquickcontrols) > +;; ("qtquickcontrols2" ,qtquickcontrols2) What's the deal with these 2? If you want to keep them as a=20 warning/promise to others, please elaborate in a comment. > + ("qtwebchannel", qtwebchannel) > + ("qtwebengine" ,qtwebengine) > + ("qtwebkit" ,qtwebkit) > + ("sqlite" ,sqlite) > + ("zlib" ,zlib))) > + (home-page "https://nextcloud.org") > + (synopsis "Folder synchronization with a Nextcloud server") s/folder/file/? Or does it synchronise more than files and=20 directories? > + (description "Use the Nextcloud desktop client to keep your=20 > files > synchronized between your Nextcloud server and your=20 > desktop. Select one We always double-space sentences in Texinfo (like. this.). =E2=80=98guix= =20 lint=E2=80=99 should warn you of this. > or more directories on your local machine and always have access=20 > to your > latest files wherever you are.") > + (license license:gpl2+))) I'm about to fall asleep and will call it a day. I'll actually=20 build the package and double-check the licence tomorrow, if nobody=20 beats me to it. Don't hesitate to holler if I forget. Thanks again for sharing this with us! Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXw5AegAKCRANsP+IT1Vt eQuLAQCgSE+8AtKMV/NnhHX8CaLLufoSiCddnCs213TvbcnMlQEAu9hPPHr/kOkn iS3T5ywt2SnowH0H9UWJoO0s4tWV1AQ= =PCoG -----END PGP SIGNATURE----- --=-=-=--