From patchwork Mon Jun 15 21:22:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 22738 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 62F2227BBE3; Mon, 15 Jun 2020 22:36:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id A79AD27BBE1 for ; Mon, 15 Jun 2020 22:36:44 +0100 (BST) Received: from localhost ([::1]:39238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkwma-0004Rl-1l for patchwork@mira.cbaines.net; Mon, 15 Jun 2020 17:36:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkwZL-00063E-4o for guix-patches@gnu.org; Mon, 15 Jun 2020 17:23:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkwZK-000741-PV for guix-patches@gnu.org; Mon, 15 Jun 2020 17:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jkwZK-0001xw-LH for guix-patches@gnu.org; Mon, 15 Jun 2020 17:23:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41883] [PATCH] gnu: Add phockup. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Jun 2020 21:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41883 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41883@debbugs.gnu.org Cc: Arun Isaac X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15922561577507 (code B ref -1); Mon, 15 Jun 2020 21:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jun 2020 21:22:37 +0000 Received: from localhost ([127.0.0.1]:47607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkwYm-0001wt-1I for submit@debbugs.gnu.org; Mon, 15 Jun 2020 17:22:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:38946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkwYj-0001wm-Ll for submit@debbugs.gnu.org; Mon, 15 Jun 2020 17:22:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkwYi-0004mg-58 for guix-patches@gnu.org; Mon, 15 Jun 2020 17:22:25 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:34998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkwYd-0006y7-Gi for guix-patches@gnu.org; Mon, 15 Jun 2020 17:22:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=uoopRYNsItHSemfMj7ZvA2Kc25KusWWjPlviU/sQZB0=; b=p9jhyHnS4DncFz1dYoZTu8695p 5FFOwAaTtzB/UBBhL9YnCwTmV0ELCGdKGiodtNt/RYiRPwYm1J1GLx9d1odzmlwvk9xS23XP/SodU i3PIYHX/Rog7UK9C3vVReNmNQmOk10F33Ub2BEouTPcbsOwRs4PuXKLh8ImriLClVoTU=; Received: from [192.168.2.1] (helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jkwYX-001ROX-1x; Tue, 16 Jun 2020 02:52:13 +0530 From: Arun Isaac Date: Tue, 16 Jun 2020 02:52:10 +0530 Message-Id: <20200615212211.11806-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/15 14:40:32 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/image.scm (phockup): New variable. --- gnu/packages/image.scm | 55 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 393ee7e08b..b22eeedb30 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2016 Eric Bavier -;;; Copyright © 2016, 2017 Arun Isaac +;;; Copyright © 2016, 2017, 2020 Arun Isaac ;;; Copyright © 2016, 2017 Kei Kebreau ;;; Copyright © 2017 Nikita ;;; Copyright © 2017,2019,2020 Hartmut Goebel @@ -87,6 +87,7 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix build-system scons) @@ -2120,3 +2121,55 @@ It can create and edit indexed palette or 24bit RGB images, offers basic painting and palette manipulation tools. It also handles JPEG, JPEG2000, GIF, TIFF, WEBP, BMP, PNG, XPM formats.") (license license:gpl3+))) + +(define-public phockup + (package + (name "phockup") + (version "1.5.9") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ivandokov/phockup") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13ajj0xch7yfqaaxbw0awxs0fz17n1rxir4gqh2wcgxjysqk1j2y")))) + (build-system copy-build-system) + (arguments + `(#:install-plan '(("src" "share/phockup/") + ("phockup.py" "share/phockup/")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'configure + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (list "src/dependency.py" "src/exif.py") + (("exiftool") + (string-append (assoc-ref inputs "perl-image-exiftool") + "/bin/exiftool"))) + #t)) + (add-before 'install 'check + (lambda _ + (invoke "pytest"))) + (add-after 'install 'install-bin + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir (string-append out "/bin")) + (symlink (string-append out "/share/phockup/phockup.py") + (string-append out "/bin/phockup"))) + #t))))) + (inputs + `(("perl-image-exiftool" ,perl-image-exiftool) + ("python" ,python))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-mock" ,python-pytest-mock))) + (home-page "https://github.com/ivandokov/phockup") + (synopsis "Organize photos and videos in folders") + (description "Phockup is a media sorting tool that uses creation date and +time information in photos and videos to organize them into folders by year, +month and day. All files which are not images or videos or those which do not +have creation date information will be placed in a folder called +@file{unknown}.") + (license license:expat)))