From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:40796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqwpo-0004Vv-K7 for guix-patches@gnu.org; Tue, 05 Feb 2019 04:16:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqwpn-00085B-I3 for guix-patches@gnu.org; Tue, 05 Feb 2019 04:16:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60764) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqwpn-00084h-6L for guix-patches@gnu.org; Tue, 05 Feb 2019 04:16:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqwpm-0003LD-Kg for guix-patches@gnu.org; Tue, 05 Feb 2019 04:16:02 -0500 Subject: bug#34325: A better patch Resent-To: guix-patches@gnu.org Resent-Message-ID: References: <8ebcda0b-9ce1-6c2a-e9d6-5c19f9109e90@interpretmath.pw> <709c5237-4465-4cb6-03a8-473b02b086f4@interpretmath.pw> From: Ricardo Wurmus In-reply-to: <709c5237-4465-4cb6-03a8-473b02b086f4@interpretmath.pw> Date: Tue, 05 Feb 2019 10:15:05 +0100 Message-ID: <8736p2iokm.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Andrew Miloradovsky Cc: 34325-done@debbugs.gnu.org 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 > 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 =E2=80=9Crevision=E2=80=9D variable is used internally to ensure that t= he 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=E2=80=99s why we put a =E2=80=9Crevision=E2=80=9D string before the co= mmit 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 =E2=80=9C0.1.0=E2=80=9D, 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=3Dgcc") > + #:phases > + (modify-phases %standard-phases > + (replace 'configure > + (lambda _ > + (substitute* > + '("Makefile") (("/usr") > + (assoc-ref %outputs "o= ut"))) > + #t))))) You can specify the =E2=80=9Cprefix=E2=80=9D variable instead of patching t= he 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