unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#51923] [PATCH] gnu: Add megapixels.
@ 2021-11-17 16:07 phodina via Guix-patches via
  2021-11-17 17:47 ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-11-17 16:07 UTC (permalink / raw)
  To: 51923

Hi,

this adds support for the camera on PinePhone.

Also when I run lint it errors:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: remote-refs: unbound variable

The problem is in the updater not handling the url https://git.sr.ht/~martijnbraam/megapixels.

* gnu/packages/gnome.scm (megapixels): New variable.

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 19520f335a..7d53784533 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -1137,6 +1137,42 @@ freedesktop.org desktop notification specification.")
     (home-page "https://wiki.gnome.org/Projects/NotificationDaemon")
     (license license:gpl2+)))

+(define-public megapixels
+  (package
+    (name "megapixels")
+    (version "1.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.sr.ht/~martijnbraam/megapixels")
+             (commit version)))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0dagp1sh5whnnllrydk7ijjid0hmvcbdm8kkzq2g168khdfn80jm"))))
+    (build-system meson-build-system)
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("gtk:bin"
+                      ,gtk "bin")       ; for gtk-update-icon-cache
+                     ("glib:bin"
+                      ,glib "bin")      ; glib-compile-schemas, etc.
+                     ("desktop-file-utils"
+                      ,desktop-file-utils) ; for update-desktop-database
+                     ("zbar" ,zbar)
+                     ("libtiff" ,libtiff)
+                     ("cmake" ,cmake)))
+    (inputs `(("libhandy" ,libhandy)
+              ("perl-image-exiftool" ,perl-image-exiftool)
+              ("imagemagick" ,imagemagick)
+              ("libraw" ,libraw)
+              ("gtk" ,gtk)))
+    (synopsis "Camera application")
+    (description "This package provides camera application that knows
+how to deal with the media request api.")
+    (home-page "https://git.sr.ht/~martijnbraam/megapixels")
+    (license license:gpl3+)))
+
 (define-public mm-common
   (package
     (name "mm-common")

base-commit: b7b982228a7256afcb83d0b05a098139c2e1a644
--
2.33.0




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#51923] [PATCH] gnu: Add megapixels.
  2021-11-17 16:07 [bug#51923] [PATCH] gnu: Add megapixels phodina via Guix-patches via
@ 2021-11-17 17:47 ` Tobias Geerinckx-Rice via Guix-patches via
  2021-11-29 11:02   ` [bug#51923] [PATCH v2] " phodina via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-11-17 17:47 UTC (permalink / raw)
  To: phodina; +Cc: 51923

Petr,

'Nother quickie.

On 2021-11-17 17:07, phodina via Guix-patches via wrote:
> The problem is in the updater not handling the url
> https://git.sr.ht/~martijnbraam/megapixels.

Good thing 'he development and maintainership of Megapixels has been 
moved to gitlab.com/postmarketos/megapixels' then :-)

Could you update the URL and try again?  If you want you can report 
and/or investigate Guix's apparent failure to deal with sr.ht 
separately.

> +       (file-name (string-append name "-" version ".tar.gz"))
                                                      ^^^^^^^^^
Use git-file-name here for convenience and to reduce the chances of such 
paste-os.

> +    (native-inputs `(("pkg-config" ,pkg-config)
> +                     ("gtk:bin"
> +                      ,gtk "bin")       ; for gtk-update-icon-cache
> +                     ("glib:bin"
> +                      ,glib "bin")      ; glib-compile-schemas, etc.
> +                     ("desktop-file-utils"
> +                      ,desktop-file-utils) ; for 
> update-desktop-database
> +                     ("zbar" ,zbar)
> +                     ("libtiff" ,libtiff)
> +                     ("cmake" ,cmake)))

Please add a newline after native-inputs so you don't have to split 
inputs over 2 lines like this.  Since we're here anyway, order these 
alphabetically.

> +    (inputs `(("libhandy" ,libhandy)
> +              ("perl-image-exiftool" ,perl-image-exiftool)
> +              ("imagemagick" ,imagemagick)
> +              ("libraw" ,libraw)
> +              ("gtk" ,gtk)))

Same newline.

> +    (synopsis "Camera application")

So... ignoring the redundant 'application', this is a one-word synopsis. 
  This seems to be for mobile devices, so 'Camera applications for mobile 
devices', I guess.

> +    (description "This package provides camera application that knows
> +how to deal with the media request api.")

Whose obscure 'media request API'?  Why does that matter?  Etc.

This seems (more?) pertinent:

- Megapixels only captures raw frames and stores .dng files.
- It captures a 5 frame burst and saves it to a temporary location.
- It runs a (customisable? dunno) postprocessing script to generate the 
final JPEG file and saves it to the Pictures directory.
- It uses OpenGL to debayer the raw sensor data for the preview.

Etc.  Descriptions should not be 1-2 lines long.

> +    (home-page "https://git.sr.ht/~martijnbraam/megapixels")

Also update to GitLab?

I'll build this later today, but I don't expect to find any issues with 
the package :-)

Kind regards,

T G-R

Sent from a Web browser.  Excuse or enjoy my brevity.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#51923] [PATCH v2] gnu: Add megapixels.
  2021-11-17 17:47 ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-11-29 11:02   ` phodina via Guix-patches via
  2021-11-29 14:39     ` Tobias Geerinckx-Rice via Guix-patches via
  2023-01-04  0:42     ` Maxim Cournoyer
  0 siblings, 2 replies; 7+ messages in thread
From: phodina via Guix-patches via @ 2021-11-29 11:02 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: 51923

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Hi Tobias,

thanks for the review. Please see the attached updated patch.

Have you had time to test it?

Petr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v2-0001-gnu-Add-megapixels.patch --]
[-- Type: text/x-patch; name=v2-0001-gnu-Add-megapixels.patch, Size: 3002 bytes --]

From c27ef7829f5f3c3198118751729583acd8eb05c6 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 3 Oct 2021 23:16:11 +0200
Subject: [PATCH v2] gnu: Add megapixels.

* gnu/packages/gnome.scm (megapixels): New variable.

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 19520f335a..a868ac462a 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -63,6 +63,7 @@
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1137,6 +1138,57 @@ freedesktop.org desktop notification specification.")
     (home-page "https://wiki.gnome.org/Projects/NotificationDaemon")
     (license license:gpl2+)))
 
+(define-public megapixels
+  (package
+    (name "megapixels")
+    (version "1.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "http://gitlab.com/postmarketos/megapixels")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0dagp1sh5whnnllrydk7ijjid0hmvcbdm8kkzq2g168khdfn80jm"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((out (assoc-ref %outputs "out"))
+                   (paths (map
+                           (lambda (input)
+                             (string-append (assoc-ref inputs input) "/bin"))
+                           '("coreutils" "imagemagick"))))
+               (wrap-program
+                   (string-append out "/share/megapixels/postprocess.sh")
+                 `("PATH" prefix ,paths))))))))
+    (native-inputs
+     `(("cmake" ,cmake)
+       ("coreutils" ,coreutils)
+       ("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
+       ("glib:bin" ,glib "bin")         ; glib-compile-schemas, etc.
+       ("gtk:bin" ,gtk "bin")           ; for gtk-update-icon-cache
+       ("imagemagick" ,imagemagick)
+       ("libtiff" ,libtiff)
+       ("pkg-config" ,pkg-config)
+       ("zbar" ,zbar)))
+    (inputs
+     `(("gtk" ,gtk)
+       ("imagemagick" ,imagemagick)
+       ("libhandy" ,libhandy)
+       ("libraw" ,libraw)
+       ("perl-image-exiftool" ,perl-image-exiftool)))
+    (synopsis "Camera applications for mobile devices")
+    (description "This package provides camera application for mobile devices
+that captures a 5 frame burst of raw frames that are later postprocessed and
+saved as jpg files.")
+    (home-page "http://gitlab.com/postmarketos/megapixels")
+    (license license:gpl3+)))
+
 (define-public mm-common
   (package
     (name "mm-common")

base-commit: b7b982228a7256afcb83d0b05a098139c2e1a644
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#51923] [PATCH v2] gnu: Add megapixels.
  2021-11-29 11:02   ` [bug#51923] [PATCH v2] " phodina via Guix-patches via
@ 2021-11-29 14:39     ` Tobias Geerinckx-Rice via Guix-patches via
  2021-12-10 14:24       ` [bug#51923] [PATCH] " Ludovic Courtès
  2023-01-04  0:42     ` Maxim Cournoyer
  1 sibling, 1 reply; 7+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2021-11-29 14:39 UTC (permalink / raw)
  To: phodina; +Cc: 51923

Petr,

phodina 写道:
> thanks for the review. Please see the attached updated patch.

Thanks!

‘a camera application’; ‘JPEG files’; but that can be tweaked by 
the final committer.

> Have you had time to test it?

Can I?  Does it run on real (& x86) computers?  How?

I assumed that it didn't.  That's why I suggested adding ‘for 
mobile devices’.  I don't own any.

λ 
/gnu/store/dn1780g27gcshqfmxilvc96kg0x72x6h-megapixels-1.3.0/bin/megapixels
Renderdoc not found
Could not read device name from device tree
Could not find any config file
λ

(And the ‘--help’ option is broken.  :-/)

Kind regards,

T G-R




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#51923] [PATCH] gnu: Add megapixels.
  2021-11-29 14:39     ` Tobias Geerinckx-Rice via Guix-patches via
@ 2021-12-10 14:24       ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2021-12-10 14:24 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: phodina, 51923

Hi Tobias,

What do you think are the next steps for this patch?

TIA!

Ludo’.

Tobias Geerinckx-Rice <me@tobias.gr> skribis:

> Petr,
>
> phodina 写道:
>> thanks for the review. Please see the attached updated patch.
>
> Thanks!
>
> ‘a camera application’; ‘JPEG files’; but that can be tweaked by the
> final committer.
>
>> Have you had time to test it?
>
> Can I?  Does it run on real (& x86) computers?  How?
>
> I assumed that it didn't.  That's why I suggested adding ‘for mobile
> devices’.  I don't own any.
>
> λ
> /gnu/store/dn1780g27gcshqfmxilvc96kg0x72x6h-megapixels-1.3.0/bin/megapixels
> Renderdoc not found
> Could not read device name from device tree
> Could not find any config file
> λ
>
> (And the ‘--help’ option is broken.  :-/)
>
> Kind regards,
>
> T G-R




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#51923] [PATCH] gnu: Add megapixels.
  2021-11-29 11:02   ` [bug#51923] [PATCH v2] " phodina via Guix-patches via
  2021-11-29 14:39     ` Tobias Geerinckx-Rice via Guix-patches via
@ 2023-01-04  0:42     ` Maxim Cournoyer
  2023-01-04  1:25       ` phodina via Guix-patches via
  1 sibling, 1 reply; 7+ messages in thread
From: Maxim Cournoyer @ 2023-01-04  0:42 UTC (permalink / raw)
  To: phodina; +Cc: Tobias Geerinckx-Rice, 51923

Hi Petr,

phodina <phodina@protonmail.com> writes:

> Hi Tobias,
>
> thanks for the review. Please see the attached updated patch.
>
> Have you had time to test it?

I wanted to try it out, but it doesn't apply cleanly anymore.  Would you
mind submitting a rebased patch?

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#51923] [PATCH] gnu: Add megapixels.
  2023-01-04  0:42     ` Maxim Cournoyer
@ 2023-01-04  1:25       ` phodina via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: phodina via Guix-patches via @ 2023-01-04  1:25 UTC (permalink / raw)
  To: maxim.cournoyer; +Cc: me, 51923

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]

Hi Maxim,

it's indeed quite old and I'm working on Pine64 devices so I'll try to send an updated patch soon.

----
Petr

-------- Original Message --------
On Jan 4, 2023, 1:42 AM, Maxim Cournoyer wrote:

> Hi Petr,
>
> phodina <phodina@protonmail.com> writes:
>
>> Hi Tobias,
>>
>> thanks for the review. Please see the attached updated patch.
>>
>> Have you had time to test it?
>
> I wanted to try it out, but it doesn't apply cleanly anymore. Would you
> mind submitting a rebased patch?
>
> --
> Thanks,
> Maxim

[-- Attachment #2: Type: text/html, Size: 749 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-01-04  1:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 16:07 [bug#51923] [PATCH] gnu: Add megapixels phodina via Guix-patches via
2021-11-17 17:47 ` Tobias Geerinckx-Rice via Guix-patches via
2021-11-29 11:02   ` [bug#51923] [PATCH v2] " phodina via Guix-patches via
2021-11-29 14:39     ` Tobias Geerinckx-Rice via Guix-patches via
2021-12-10 14:24       ` [bug#51923] [PATCH] " Ludovic Courtès
2023-01-04  0:42     ` Maxim Cournoyer
2023-01-04  1:25       ` phodina via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).