all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Jakob L. Kreuze" <zerodaysfordays@sdf.lonestar.org>
Cc: 36410@debbugs.gnu.org
Subject: [bug#36410] [PATCH] gnu: Add screenfetch.
Date: Tue, 2 Jul 2019 10:18:50 +0300	[thread overview]
Message-ID: <20190702071850.GA22794@macbook41> (raw)
In-Reply-To: <8736ju8rrt.fsf@sdf.lonestar.org>

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

On Thu, Jun 27, 2019 at 08:42:14PM -0400, Jakob L. Kreuze wrote:
> * gnu/packages/admin.scm (screenfetch): New variable.
> ---
>  gnu/packages/admin.scm | 47 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
> 
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 3d8c247f57..b920d564e5 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -25,6 +25,7 @@
>  ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
>  ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
>  ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
> +;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -55,6 +56,7 @@
>    #:use-module (guix build-system python)
>    #:use-module (guix build-system trivial)
>    #:use-module (gnu packages)
> +  #:use-module (gnu packages algebra)
>    #:use-module (gnu packages base)
>    #:use-module (gnu packages bash)
>    #:use-module (gnu packages check)
> @@ -2651,6 +2653,51 @@ used in screenshots to show other users what operating system or distribution
>  you are running, what theme or icon set you are using, etc.")
>      (license license:expat)))
>  
> +(define-public screenfetch
> +  ;; first commit supporting current GuixSD
> +  (let ((commit "e3ec82dd464e81e4d10bef218b3016e3044c766c"))
> +    (package
> +      (name "screenfetch")
> +      (version (string-append "3.8.0" "-" (string-take commit 7)))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/KittyKatt/screenFetch")
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                  "1lzs1l5xgj9mn4b59lhkfgqnyiivf8svd1iwjabzrax90rdmxfwj"))))
> +      (build-system trivial-build-system)
> +      (arguments
> +       `(#:modules ((guix build utils))
> +         #:builder
> +         (begin
> +           (use-modules (guix build utils))
> +           (let ((source (assoc-ref %build-inputs "source")))
> +             (mkdir-p (string-append %output "/bin/"))
> +             (mkdir-p (string-append %output "/man/man1/"))
> +             (copy-file (string-append source "/screenfetch-dev")
> +                        (string-append %output "/bin/screenfetch"))
> +             (copy-file (string-append source "/screenfetch.1")
> +                        (string-append %output "/man/man1/screenfetch.1"))

If 'install-file' works here then the above 6 lines can be 2, something
like:
(install-file (string-append source "/screenfetch.1")
              (string-append %output "/man/man1/"))

> +             (substitute* (string-append %output "/bin/screenfetch")
> +               (("/usr/bin/env bash")
> +                (string-append (assoc-ref %build-inputs "bash")
> +                               "/bin/bash")))))))

you can use the patch-shebang function here, should help a bit.

> +      (propagated-inputs
> +       `(("bash" ,bash)
> +         ("bc" ,bc)
> +         ("scrot" ,scrot)
> +         ("xdpyinfo" ,xdpyinfo)
> +         ("xprop" ,xprop)))

Ideally these should wrap the binary rather than being propagated.

> +      (home-page "https://github.com/KittyKatt/screenFetch")
> +      (synopsis "System information script")
> +      (description "Bash screenshot information tool which can be used to
> +generate those nifty terminal theme information and ASCII distribution logos in
> +everyone's screenshots nowadays.")
> +      (license license:gpl3))))
> +
>  (define-public nnn
>    (package
>      (name "nnn")
> -- 
> 2.22.0
> 



-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2019-07-02  7:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  0:42 [bug#36410] [PATCH] gnu: Add screenfetch Jakob L. Kreuze
2019-06-28  5:15 ` swedebugia
2019-06-28 14:00   ` Jakob L. Kreuze
2019-07-02  7:18 ` Efraim Flashner [this message]
2019-07-02 16:07   ` Jakob L. Kreuze
2019-09-05 12:06     ` Efraim Flashner
2019-09-23 16:08       ` bug#36410: " Efraim Flashner
2019-09-28 20:48         ` [bug#36410] " Jakob L. Kreuze
2019-10-05  8:19         ` Jakob L. Kreuze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190702071850.GA22794@macbook41 \
    --to=efraim@flashner.co.il \
    --cc=36410@debbugs.gnu.org \
    --cc=zerodaysfordays@sdf.lonestar.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.