* [bug#34325] Add xmagnify, a tiny screen magnifier for X11
@ 2019-02-05 0:20 Andrew Miloradovsky
2019-02-05 6:13 ` [bug#34325] A better patch Andrew Miloradovsky
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Miloradovsky @ 2019-02-05 0:20 UTC (permalink / raw)
To: 34325
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Sorry, I wasn't able to thoroughly test it or lint, because I couldn't
make Guix install it from the checked out tree, but it works on my machine.
Neither the instructions from here worked for that
- - https://www.gnu.org/software/guix/manual/en/html_node/Contributing.html
Nor from here
- -
https://www.gnu.org/software/guix/blog/2018/a-packaging-tutorial-for-guix/
Could only install it via `guix package -f ~/path/to/file.scm -i
package-name`.
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEkYid79R7hu2s1S0QNVwlkcVwbIsFAlxY1rAACgkQNVwlkcVw
bItzOw//fAYH+Wux2vt7prJtlKlAlc4OifTV4vrnzKZBtKYx1DzlCANTPriJc23L
KIAoCAs772WlVjuwFrRTZyr+QF34JeOptmBDxSpzmysKWAKsbI2BqlOlEHDcECva
0EMIRAAne3YdcHV3FsVvZQiw5z3cKu1H7UD+Bn6nDbtrgWnb9kmzVAeRPC+AAwdJ
7NtC5i5zwmPRJGqsLmDjol2/bqF1lIK0GGUWB7BfetzSUbfVsKCO4IiBj8FZrIu8
PiLzBI4T91ubIFQNUTxiYy4vMmNKGwibg4pW6iJHfgMK/He+HETxyiRKml5rOSiW
WNQH2nTPBt5r4AmfUILMrrpoFOdjihieHM6g2bwcsXceSaJCi2mrrp8qL9EikuJ7
nFulRYIjBc8QRhc5o+ZJF8ehafX8uGdKywtPvu12ioiy8OoSVPQm8FFdATYTSdZ4
WUiRHTPCV0yQ/q0sxQ30R5eqKZRc5Rf0wFqdIC/HOl+GKV7jDHsvyz1NA4AJHwjj
Jk9WhE15c05+8QoevADXTJXxICLr3xE7brbqxVhKws5O2aMJzjGJSkcrMeWD8Hmz
c/hkzC4q08oFj/2HEfqPA/W6eC/v2hAPz+OOb/vtLVYjIspB6DesZtuiceHstPit
7pPHodBKMy8X4CQBSX1Wz9DehEW3psQI/oZukQ8flznIsMhgii0=
=LGAC
-----END PGP SIGNATURE-----
[-- Attachment #2: 0001-gnu-Add-xmagnify.patch --]
[-- Type: text/plain, Size: 2167 bytes --]
From e986df8668c011b0a84827fab44ce674a0dd695a Mon Sep 17 00:00:00 2001
From: Andrew Miloradovsky <andrew@interpretmath.pw>
Date: Mon, 4 Feb 2019 23:28:23 +0000
Subject: [PATCH] gnu: Add xmagnify
Tiny screen magnifier for X11
* gnu/packages/accessibility.scm (xmagnify): New variable.
---
gnu/packages/accessibility.scm | 37 ++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/accessibility.scm b/gnu/packages/accessibility.scm
index d399f98f0..63a01d5f2 100644
--- a/gnu/packages/accessibility.scm
+++ b/gnu/packages/accessibility.scm
@@ -122,3 +122,40 @@ available to help to click.")
It works for both single pedal devices and three pedal devices. All supported
devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
(license license:expat))))
+
+(define-public xmagnify
+ (let ((commit "56da280173e9d0bd7b3769e07ba485cb4db35869")
+ (revision "0.1.0"))
+ (package
+ (name "xmagnify")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/amiloradovsky/magnify.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
+ (inputs `(("libX11" ,libx11)
+ ("xproto" ,xproto)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags '("CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute* '("Makefile") (("/usr") (assoc-ref %outputs "out")))
+ #t)))))
+ (home-page "https://gitlab.com/amiloradovsky/magnify")
+ (synopsis "Tiny screen magnifier for X11")
+ (description
+ "Magnifies a screen region by an integer positive factor and
+draws the result on a window. Useful as an accessibility tool, which
+works with every X Window System based GUI (depends only on libX11);
+or as an assistant for graphic designers, who need to select
+individual pixels.")
+ (license license:gpl2+))))
--
2.19.2
[-- Attachment #3: 0001-gnu-Add-xmagnify.patch.sig --]
[-- Type: application/octet-stream, Size: 566 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#34325] A better patch
2019-02-05 0:20 [bug#34325] Add xmagnify, a tiny screen magnifier for X11 Andrew Miloradovsky
@ 2019-02-05 6:13 ` Andrew Miloradovsky
2019-02-05 9:15 ` bug#34325: " Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Miloradovsky @ 2019-02-05 6:13 UTC (permalink / raw)
To: 34325
[-- Attachment #1.1.1: Type: text/plain, Size: 88 bytes --]
OK. Managed to build `pre-inst-env` and run `guix lint`, fixed couple
minor issues.
[-- Attachment #1.1.2: 0001-gnu-Add-xmagnify.patch --]
[-- Type: text/plain, Size: 2394 bytes --]
From 2267b26f8d38fb40e58d62e3e6fcdaff01001384 Mon Sep 17 00:00:00 2001
From: Andrew Miloradovsky <andrew@interpretmath.pw>
Date: Mon, 4 Feb 2019 23:28:23 +0000
Subject: [PATCH] gnu: Add xmagnify
Tiny screen magnifier for X11
* gnu/packages/accessibility.scm (xmagnify): New variable.
---
gnu/packages/accessibility.scm | 39 ++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/accessibility.scm b/gnu/packages/accessibility.scm
index d399f98f0..44711cdc3 100644
--- a/gnu/packages/accessibility.scm
+++ b/gnu/packages/accessibility.scm
@@ -122,3 +122,42 @@ available to help to click.")
It works for both single pedal devices and three pedal devices. All supported
devices have vendorId:productId = 0c45:7403 or 0c45:7404.")
(license license:expat))))
+
+(define-public xmagnify
+ (let ((commit "56da280173e9d0bd7b3769e07ba485cb4db35869")
+ (revision "0.1.0"))
+ (package
+ (name "xmagnify")
+ (version "0.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/amiloradovsky/magnify.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
+ (inputs `(("libX11" ,libx11)
+ ("xproto" ,xproto)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:make-flags '("CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute*
+ '("Makefile") (("/usr")
+ (assoc-ref %outputs "out")))
+ #t)))))
+ (home-page "https://gitlab.com/amiloradovsky/magnify")
+ (synopsis "Tiny screen magnifier for X11")
+ (description
+ "Magnifies a screen region by an integer positive factor and
+draws the result on a window. Useful as an accessibility tool, which
+works with every X Window System based GUI (depends only on libX11);
+or as an assistant for graphic designers, who need to select
+individual pixels.")
+ (license license:gpl2+))))
--
2.19.2
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#34325: A better patch
2019-02-05 6:13 ` [bug#34325] A better patch Andrew Miloradovsky
@ 2019-02-05 9:15 ` Ricardo Wurmus
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2019-02-05 9:15 UTC (permalink / raw)
To: Andrew Miloradovsky; +Cc: 34325-done
Hi Andrew,
> OK. Managed to build `pre-inst-env` and run `guix lint`, fixed couple
> minor issues.
>
> From 2267b26f8d38fb40e58d62e3e6fcdaff01001384 Mon Sep 17 00:00:00 2001
> From: Andrew Miloradovsky <andrew@interpretmath.pw>
> Date: Mon, 4 Feb 2019 23:28:23 +0000
> Subject: [PATCH] gnu: Add xmagnify
>
> Tiny screen magnifier for X11
>
> * gnu/packages/accessibility.scm (xmagnify): New variable.
Thank you very much for your patch. For a first patch this is near
perfect, congratulations!
> +(define-public xmagnify
> + (let ((commit "56da280173e9d0bd7b3769e07ba485cb4db35869")
> + (revision "0.1.0"))
The “revision” variable is used internally to ensure that the version
string increases monotonically. Git commit hashes are random, so a
future commit could end up lower in a sorted list that an older commit.
That’s why we put a “revision” string before the commit hash. The
revision usually starts at 1 and is incremented each time the commit
hash is updated.
In this case we can do without this because the last commit is also the
tag “0.1.0”, which we can use directly.
> + (package
> + (name "xmagnify")
> + (version "0.1.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://gitlab.com/amiloradovsky/magnify.git")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1ngnp5f5zl3v35vhbdyjpymy6mwrs0476fm5nd7dzkba7n841jdh"))))
> + (inputs `(("libX11" ,libx11)
> + ("xproto" ,xproto)))
xproto does not seem to be needed.
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f
> + #:make-flags '("CC=gcc")
> + #:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + (lambda _
> + (substitute*
> + '("Makefile") (("/usr")
> + (assoc-ref %outputs "out")))
> + #t)))))
You can specify the “prefix” variable instead of patching the Makefile.
> + (home-page "https://gitlab.com/amiloradovsky/magnify")
> + (synopsis "Tiny screen magnifier for X11")
> + (description
> + "Magnifies a screen region by an integer positive factor and
> +draws the result on a window. Useful as an accessibility tool, which
> +works with every X Window System based GUI (depends only on libX11);
> +or as an assistant for graphic designers, who need to select
> +individual pixels.")
Here we should use complete sentences.
> + (license license:gpl2+))))
This is a dual license, which should be noted in a comment.
I pushed the patch to the master branch with commit 16bb27f28 after
performing these changes and adding a copyright line for you.
Thanks again!
--
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-05 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-05 0:20 [bug#34325] Add xmagnify, a tiny screen magnifier for X11 Andrew Miloradovsky
2019-02-05 6:13 ` [bug#34325] A better patch Andrew Miloradovsky
2019-02-05 9:15 ` bug#34325: " Ricardo Wurmus
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).