(define-module (infiniteadaptability packages nitter)
#:use-module (gnu)
+ #:use-module (gnu packages certs)
+ #:use-module (gnu packages nim)
+ #:use-module (gnu packages tls)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module ((guix search-paths)
+ #:select ($SSL_CERT_DIR $SSL_CERT_FILE))
#:export (nitter))
+(define jester
+ (origin
+ (method git-fetch)
+ (file-name "jester-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/dom96/jester.git")
+ (commit "baca3f")))
+ (sha256 (base32 "0i8rxsbp5yd9dasis650vqppika43mzfsls4fc7cz8k5j8xpd6zc"))))
+
+(define karax
+ (origin
+ (method git-fetch)
+ (file-name "karax-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/karaxnim/karax")
+ (commit "5cf360c")))
+ (sha256 (base32 "1fh0jcjlw0vfqmr5dmhk436g569qvcpml9f981x28wmvm1511z2c"))))
+
+(define sass
+ (origin
+ (method git-fetch)
+ (file-name "sass-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/dom96/sass")
+ (commit "7dfdd03")))
+ (sha256 (base32 "19d78787k97l5cis81800hxa9qjr0yzjshlzdp727gh6pn8kc8fj"))))
+
+(define nimcrypto
+ (origin
+ (method git-fetch)
+ (file-name "nimcrypto-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/cheatfate/nimcrypto")
+ (commit "a079df9")))
+ (sha256 (base32 "1dmdmgb6b9m5f8dyxk781nnd61dsk3hdxqks7idk9ncnpj9fng65"))))
+
+(define markdown
+ (origin
+ (method git-fetch)
+ (file-name "markdown-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/soasme/nim-markdown")
+ (commit "158efe3")))
+ (sha256 (base32 "1701q0i8yd9rrjraf5fzgcvilwnwgw3wyzzfwpr2drmn3x9pd8fj"))))
+
+(define packedjson
+ (origin
+ (method git-fetch)
+ (file-name "packedjson-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/Araq/packedjson")
+ (commit "9e6fbb6")))
+ (sha256 (base32 "09yxshkfpacgl6x8f77snjcwz37r519vh7rrnqrnh5npvgk3h24j"))))
+
+(define supersnappy
+ (origin
+ (method git-fetch)
+ (file-name "supersnappy-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/guzba/supersnappy")
+ (commit "6c94198")))
+ (sha256 (base32 "0gxy7ijm4d2i4dkb64wwq51gns0i2d3d3rrd9cra7fyiahaph4xi"))))
+
+(define redpool
+ (origin
+ (method git-fetch)
+ (file-name "redpool-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/zedeus/redpool")
+ (commit "8b7c1db")))
+ (sha256 (base32 "10xh5fhwnahnq1nf6j69vvnbi55kixa0ari630gr6cdx80arvbs6"))))
+
+(define nimredis
+ (origin
+ (method git-fetch)
+ (file-name "nimredis-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/zedeus/redis")
+ (commit "d0a0e6f")))
+ (sha256 (base32 "166kzflb3wgwvqnv9flyynp8b35xby617lxmk0yas8i4m6vjl00f"))))
+
+(define zippy
+ (origin
+ (method git-fetch)
+ (file-name "zippy-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/guzba/zippy")
+ (commit "ca5989a")))
+ (sha256 (base32 "0rk31ispck48ilvzs0lxpp7z6y238a7d7dh7lmlfwi5i7hx13la6"))))
+
+(define flatty
+ (origin
+ (method git-fetch)
+ (file-name "flatty-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/treeform/flatty")
+ (commit "e668085")))
+ (sha256 (base32 "0886lk20rg1pq56jsz1jjd8vrdz46lgdaxvp97az06mcawhbabbz"))))
+
+(define jsony
+ (origin
+ (method git-fetch)
+ (file-name "jsony-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/treeform/jsony")
+ (commit "1de1f08")))
+ (sha256 (base32 "0rj205cs3v6g80h8ys9flbdq4wyd1csmkwdxv0lz21972zcsrcfh"))))
+
+(define oauth
+ (origin
+ (method git-fetch)
+ (file-name "oauth-checkout")
+ (uri
+ (git-reference
+ (url "https://github.com/CORDEA/oauth")
+ (commit "b8c163b")))
+ (sha256 (base32 "0k5slyzjngbdr6g0b0dykhqmaf8r8n2klbkg2gpid4ckm8hg62v5"))))
+
(define nitter
- (let ((version "1.0.0")
+ (let ((version "0.1.0")
(commit "e40c61a6ae76431c570951cc4925f38523b00a82")
(revision 0))
(package
(url "https://github.com/zedeus/nitter")
(commit commit)))
(sha256
- (base32 "10ysy0zmlxl1wxgb07gkjw4b16vc6ikqzlizqicia43af7kyr34g"))
+ (base32 "1xqgrbycdg8c25py630d18414kj0jgnj46sqaxl0zrh2gcvjiv30"))
(file-name (string-append "nitter-" version "-checkout"))))
- (build-system )))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'copy-deps:www
+ (lambda _
+ (copy-recursively #$(this-package-input "jester-checkout") "dist/jester"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "karax-checkout") "dist/karax"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "sass-checkout") "dist/sass"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "nimcrypto-checkout") "dist/nimcrypto"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "markdown-checkout") "dist/markdown"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "packedjson-checkout") "dist/packedjson"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "supersnappy-checkout") "dist/supersnappy"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "redpool-checkout") "dist/redpool"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "nimredis-checkout") "dist/nimredis"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "zippy-checkout") "dist/zippy"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "flatty-checkout") "dist/flatty"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "jsony-checkout") "dist/jsony"
+ #:keep-permissions? #f)
+ (copy-recursively #$(this-package-input "oauth-checkout") "dist/oauth"
+ #:keep-permissions? #f)))
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((nim (assoc-ref inputs "nim"))
+ (nimble (string-append nim "/bin/nimble")))
+ (setenv "HOME" "./cache-home")
+ (mkdir-p "./cache-home")
+ (invoke nimble "build" "--offline" "-d:danger" "--mm:refc" "--verbose")
+ (invoke nimble "scss")
+ (invoke nimble "md")))))))
+ (inputs (list jester karax sass nimcrypto markdown packedjson supersnappy redpool nimredis zippy flatty jsony oauth nss-certs nim))
+ (home-page "https://github.com/zedeus/nitter")
+ (synopsis
+ "A free and open source alternative Twitter front-end focused on privacy and performance.")
+ (description
+ "A free and open source alternative Twitter front-end focused on privacy and performance.
+Inspired by the Invidious project.
+
+ No JavaScript or ads
+ All requests go through the backend, client never talks to Twitter
+ Prevents Twitter from tracking your IP or JavaScript fingerprint
+ Uses Twitter's unofficial API (no developer account required)
+ Lightweight (for @nim_lang, 60KB vs 784KB from twitter.com)
+ RSS feeds
+ Themes
+ Mobile support (responsive design)
+ AGPLv3 licensed, no proprietary instances permitted")
+ (license license:agpl3))))