summaryrefslogtreecommitdiff
path: root/modules/ryan-packages/binaries.scm
blob: f05636da858a61de2758e7e47d63177c091ea73e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
(define-module (ryan-packages binaries)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system copy)
  #:use-module (gnu packages base)
  #:use-module (gnu packages bootstrap)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages elf)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages glib))

(define-public superfile-bin
  (package
    (name "superfile-bin")
    (version "1.1.2")
    (source (origin
              (method url-fetch)
              (uri (string-append
                     "https://github.com/yorukot/superfile" "/releases/download/v"
                     version "/superfile-linux-v" version "-amd64.tar.gz"))
              (sha256
                (base32
                  "1hnhkd6ihp0wcrn54ipyki500xmz1kapaj8sykg7ykh1vv8y6hmm"))))
    (build-system copy-build-system)
    (arguments
      (list #:install-plan #~'((#$(string-append
                                    "superfile-linux-v" (package-version this-package) "-amd64/spf")
                                "bin/spf"))
            #:phases
            #~(modify-phases %standard-phases
                             (delete 'strip)
                             (add-after 'install 'patch-elf
                                        (lambda _
                                          (let ((spf (string-append #$output "/bin/spf")))
                                            (invoke "patchelf" "--set-interpreter"
                                                    (string-append #$(this-package-input "glibc")
                                                                   #$(glibc-dynamic-linker))
                                                    spf)
                                            (invoke "patchelf" "--set-rpath"
                                                    (string-append (ungexp (this-package-input "gcc")
                                                                           "lib")
                                                                   "/lib")
                                                                   spf)))))))
    (supported-systems '("x86_64-linux"))
    (native-inputs (list patchelf))
    (inputs (list `(,gcc "lib") glibc))
    (home-page "https://github.com/yorukot/superfile")
    (synopsis "Pretty fancy and modern terminal file manager")
    (description
      "Terminal file-manager written in Go that is modern and extensible.")
    (license license:expat)))

superfile-bin