summaryrefslogtreecommitdiffstats
path: root/findimagedupes.scm
blob: fee8e3ebf2282f658df80cedb0cb58b2ecc20d6c (plain) (blame)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
(define-module (findimagedupes)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix build-system go)
  #:use-module (guix git-download)
  #:use-module (guix build utils)
  #:use-module (guix gexp)
  #:use-module (gnu packages file)
  #:use-module (gnu packages gcc)
  #:use-module (gnu packages golang)
  #:use-module (gnu packages golang-xyz)
  #:use-module (gnu packages image)
  )

(define-public go-gitlab-com-opennota-magicmime
  (package
    (name "go-gitlab-com-opennota-magicmime")
    (version "0.1.2")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://gitlab.com/opennota/magicmime.git")
                     (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0qdm4xhbhspk8dnamlkcdb1zjxaq5yz3s5qzgglkgciwfmz33zwm"))))
    (build-system go-build-system)
    (arguments
      `(#:import-path "gitlab.com/opennota/magicmime"))
    (synopsis "magicmime allows you to discover a file's mimetype by looking for magic numbers in its content.")
    (description
    "magicmime is a Go package which allows you to discover a file's mimetype by looking for magic numbers in its content. It could be used as a supplementary for Go's mime package which only interprets the file extension to detect mimetypes. Internally, it implements libmagic(3) bindings.")
    (home-page "https://gitlab.com/opennota/magicmime/")
    (license asl2.0)))

(define-public go-gitlab-com-opennota-phash
  (package
    (name "go-gitlab-com-opennota-phash")
    (version "3aa12852b3a4d5040ee054aa250770d54fc0a787")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://gitlab.com/opennota/phash.git")
                     (commit "3aa12852b3a4d5040ee054aa250770d54fc0a787")))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0x9glnw50y4686ghkkkqliq5v9yf499dls46mwkgr66jhnbnz4j5"))))
    (build-system go-build-system)
    (arguments
      (list #:import-path "gitlab.com/opennota/phash"
            #:phases #~(modify-phases %standard-phases
                                      (delete 'check))))
    (inputs
      (list 
        libpng
        libheif
        libjpeg-turbo
        libtiff
        gcc
    ))
    (synopsis "phash is a simple Go wrapper around the pHash library.")
    (description "phash is a simple Go wrapper around the pHash library.")
    (home-page "https://gitlab.com/opennota/phash/")
    (license gpl3)))

;(define-public go-github-com-mattn-go-sqlite3-1.14.11
;               (package
;                 (inherit go-github-com-mattn-go-sqlite3)
;                 (name "go-github-com-mattn-go-sqlite3-1.14.11")
;                ))

(define-public findimagedupes
  (package
    (name "findimagedupes")
    (version "bc6c4c310f102eb04a4ac3610e2ca0ae72746bbe")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                     (url "https://gitlab.com/opennota/findimagedupes.git")
                     (commit "bc6c4c310f102eb04a4ac3610e2ca0ae72746bbe")))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "0vz45zysn4dxmlw9fjw0sjsi4wh6b98a2lczxv0rwwxjx77drya7"))))
    (build-system go-build-system)
    (arguments
      (list #:import-path "gitlab.com/opennota/findimagedupes"
            ))
    (inputs
      (list 
        libjpeg-turbo
        libpng
        libtiff
        libheif
        go-gitlab-com-opennota-magicmime
        go-gitlab-com-opennota-phash
        ;go-github-com-mattn-go-sqlite3-1.14.11
        go-github-com-mattn-go-sqlite3
        ))
    (synopsis "finds visually similar or duplicate images.")
    (description "finds duplicate images using the pHash algorithm")
    (home-page "https://gitlab.com/opennota/findimagedupes/")
    (license gpl3)))