diff --git a/nongnu/packages/anonsurf-parrot.scm b/nongnu/packages/anonsurf-parrot.scm new file mode 100644 index 00000000..8f472ab0 --- /dev/null +++ b/nongnu/packages/anonsurf-parrot.scm @@ -0,0 +1,29 @@ +(define-module (my-packages anonsurf) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system gnu)) + +(define-public anonsurf + (package + (name "anonsurf") + (version version) ;; Insert the appropriate version number + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ParrotSec/anonsurf") + (commit version))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + hash)))) ;; Update SHA256 hash + (build-system gnu-build-system) + (arguments `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'pre-configure + (lambda _ + (invoke "make") + #t))))) + (home-page "https://github.com/ParrotSec/anonsurf") + (synopsis "Parrot AnonSurf Module") + (description "AnonSurf is a script designed to start TOR and set the iptables properly to prevent traffic from passing outside the TOR network.") + (license license:license))) ;; Update the license if different diff --git a/nongnu/packages/brave.scm b/nongnu/packages/brave.scm new file mode 100644 index 00000000..ed9abf89 --- /dev/null +++ b/nongnu/packages/brave.scm @@ -0,0 +1,56 @@ +(use-modules (ice-9 popen) + (ice-9 rdelim)) + +(define (get-hash path) + (let* ((hash-command (string-append "guix hash -rx '" path "'")) + (hash-pipe (open-input-pipe hash-command)) + (hash (read-line hash-pipe))) + (close-pipe hash-pipe) + hash)) + +(define version "1.61.120") +(define url (string-append "https://github.com/brave/brave-browser/archive/refs/tags/v" version ".tar.gz")) +(define file-path (string-append "/tmp/" version ".tar.gz")) + +;; Download file +(system (string-append "wget -O " file-path " " url)) + +(define-module (my-packages brave) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:)) + +;; Calculate hash +(define hash (get-hash file-path)) + +(define-public brave + (package + (name "brave") + (version version) + (source (origin + (method url-fetch) + (uri url) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 (base32 hash)))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'pre-configure + (lambda _ + (mkdir "build") + (invoke "npm" "install") + (invoke "npm" "run" "init") + (invoke "npm" "run" "build") + (invoke "npm" "start") + (system* "cp" "-r" "build/*" "/gnu/store") + #t))))) + (inputs + `(("node" ,node) + ("git" ,git) + ("python3" ,python))) + (home-page "https://www.brave.com") + (synopsis "Fast, private and secure browser for PC, Mac and mobile") + (description "An open source browser derived from Chrome that focuses on privacy") + (license license:bsd-3))) ;; Update the license if different