From b47ea056eca64d5962fd9ce71041785b830db280 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sun, 31 Dec 2023 00:13:38 +0300 Subject: [PATCH] binary-build: delete binary-unpack & format with guix-devel-mode --- activitywatch.scm | 97 +++++++++++++++++++++++----------------------- bottom.scm | 1 + difftastic-bin.scm | 65 ++++++++++++++++--------------- hugo-extended.scm | 1 + jless.scm | 5 ++- micromamba.scm | 65 ++++++++++++++++--------------- nushell-bin.scm | 1 + starship.scm | 1 + texlab.scm | 1 + 9 files changed, 124 insertions(+), 113 deletions(-) diff --git a/activitywatch.scm b/activitywatch.scm index 4420944..6030098 100644 --- a/activitywatch.scm +++ b/activitywatch.scm @@ -7,55 +7,56 @@ (define-public activitywatch (package - (name "activitywatch-bin") - (version "0.11.0") - (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/ActivityWatch/activitywatch/releases/download/v" - version - "/activitywatch-v" - version - "-linux-x86_64.zip")) - (sha256 - (base32 - "1w62s9y8z6yn2mv55npsg1rfi2az4lim62v4awxwq1xzx4249pi0")))) - (build-system binary-build-system) - (arguments - `(#:validate-runpath? #f - #:install-plan - `(("." "/usr/share/activitywatch")) - #:patchelf-plan - `(("aw-qt" ("zlib")) - ("aw-server/aw-server" ("zlib")) - ("aw-server-rust/aw-server-rust" ("zlib")) - ("aw-watcher-afk/aw-watcher-afk" ("zlib")) - ("aw-watcher-window/aw-watcher-window" ("zlib"))) - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-symlink - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (string-append (assoc-ref outputs "out")))) - (mkdir (string-append out "/bin")) - (symlink (string-append out "/usr/share/activitywatch/aw-server/aw-server") - (string-append out "/bin/aw-server")) - (symlink (string-append out "/usr/share/activitywatch/aw-server-rust/aw-server-rust") - (string-append out "/bin/aw-server-rust")) - (symlink (string-append out "/usr/share/activitywatch/aw-watcher-afk/aw-watcher-afk") - (string-append out "/bin/aw-watcher-afk")) - (symlink (string-append out "/usr/share/activitywatch/aw-watcher-window/aw-watcher-window") - (string-append out "/bin/aw-watcher-window")) - #t)))))) - (inputs - `(("zlib" ,zlib))) - (native-inputs - `(("unzip" ,unzip))) - (synopsis "ActivityWatch is an app that automatically tracks how you spend time on your devices.") - (description "ActivityWatch is an app that automatically tracks how you spend time on your devices. + (name "activitywatch-bin") + (version "0.11.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/ActivityWatch/activitywatch/releases/download/v" + version + "/activitywatch-v" + version + "-linux-x86_64.zip")) + (sha256 + (base32 + "1w62s9y8z6yn2mv55npsg1rfi2az4lim62v4awxwq1xzx4249pi0")))) + (build-system binary-build-system) + (arguments + `(#:validate-runpath? #f + #:install-plan + `(("." "/usr/share/activitywatch")) + #:patchelf-plan + `(("aw-qt" ("zlib")) + ("aw-server/aw-server" ("zlib")) + ("aw-server-rust/aw-server-rust" ("zlib")) + ("aw-watcher-afk/aw-watcher-afk" ("zlib")) + ("aw-watcher-window/aw-watcher-window" ("zlib"))) + #:phases + (modify-phases %standard-phases + (delete 'binary-unpack) + (add-after 'install 'install-symlink + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (string-append (assoc-ref outputs "out")))) + (mkdir (string-append out "/bin")) + (symlink (string-append out "/usr/share/activitywatch/aw-server/aw-server") + (string-append out "/bin/aw-server")) + (symlink (string-append out "/usr/share/activitywatch/aw-server-rust/aw-server-rust") + (string-append out "/bin/aw-server-rust")) + (symlink (string-append out "/usr/share/activitywatch/aw-watcher-afk/aw-watcher-afk") + (string-append out "/bin/aw-watcher-afk")) + (symlink (string-append out "/usr/share/activitywatch/aw-watcher-window/aw-watcher-window") + (string-append out "/bin/aw-watcher-window")) + #t)))))) + (inputs + `(("zlib" ,zlib))) + (native-inputs + `(("unzip" ,unzip))) + (synopsis "ActivityWatch is an app that automatically tracks how you spend time on your devices.") + (description "ActivityWatch is an app that automatically tracks how you spend time on your devices. It is open source, privacy-first, cross-platform, and a great alternative to services like RescueTime, ManicTime, and WakaTime. It can be used to keep track of your productivity, time spent on different projects, bad screen habits, or just to understand how you spend your time.") - (home-page "https://activitywatch.net/") - (license license:mpl2.0))) + (home-page "https://activitywatch.net/") + (license license:mpl2.0))) diff --git a/bottom.scm b/bottom.scm index 100f299..1acac74 100644 --- a/bottom.scm +++ b/bottom.scm @@ -25,6 +25,7 @@ (arguments `(#:phases (modify-phases %standard-phases + (delete 'binary-unpack) (replace 'unpack (lambda* (#:key inputs #:allow-other-keys) (invoke "tar" "xvzf" (assoc-ref inputs "source"))))) diff --git a/difftastic-bin.scm b/difftastic-bin.scm index d8f76a7..f022447 100644 --- a/difftastic-bin.scm +++ b/difftastic-bin.scm @@ -18,36 +18,37 @@ (define-public difftastic-bin (package - (name "difftastic-bin") - (version "0.53.1") - (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/Wilfred/difftastic/releases/download/" version "/" - "difft-x86_64-unknown-linux-gnu.tar.gz")) - (sha256 - (base32 - "08hx8ljm67zjmnz3mrhisgzqiz5fnd856jqgsppl2i7x4vgzw9by")))) - (build-system binary-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'unpack - (lambda* (#:key inputs #:allow-other-keys) - (invoke "tar" "xvzf" (assoc-ref inputs "source"))))) - #:install-plan - `(("difft" "/bin/")) - #:patchelf-plan - `(("difft" ("glibc" "libgccjit" "libstdc++"))))) - (inputs - `(("curl" ,curl) - ("libgccjit" ,libgccjit) - ("libstdc++" ,libstdc++) - ("glibc" ,glibc) - ("zlib" ,zlib))) - (synopsis "Difftastic is a structural diff tool that compares files based on their syntax.") - (description "Difftastic is a CLI diff tool that compares files based on their syntax, not line-by-line. Difftastic produces accurate diffs that are easier for humans to read. + (name "difftastic-bin") + (version "0.53.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/Wilfred/difftastic/releases/download/" version "/" + "difft-x86_64-unknown-linux-gnu.tar.gz")) + (sha256 + (base32 + "08hx8ljm67zjmnz3mrhisgzqiz5fnd856jqgsppl2i7x4vgzw9by")))) + (build-system binary-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'binary-unpack) + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "xvzf" (assoc-ref inputs "source"))))) + #:install-plan + `(("difft" "/bin/")) + #:patchelf-plan + `(("difft" ("glibc" "libgccjit" "libstdc++"))))) + (inputs + `(("curl" ,curl) + ("libgccjit" ,libgccjit) + ("libstdc++" ,libstdc++) + ("glibc" ,glibc) + ("zlib" ,zlib))) + (synopsis "Difftastic is a structural diff tool that compares files based on their syntax.") + (description "Difftastic is a CLI diff tool that compares files based on their syntax, not line-by-line. Difftastic produces accurate diffs that are easier for humans to read. @itemize @item Understand what actually changed. Difftastic parses your code with tree-sitter. Unlike a line-oriented text diff, difftastic understands that the inner expression hasn't changed here. @@ -55,5 +56,5 @@ @item Visualise wrapping changes. Have you added a wrapper? Difftastic can match the delimiters exactly. @item Real line numbers. Do you know how to read @@ -5,6 +5,7 @@ syntax? Difftastic shows the actual line numbers from your files, both before and after. @end itemize") - (home-page "https://difftastic.wilfred.me.uk/") - (license license:expat))) + (home-page "https://difftastic.wilfred.me.uk/") + (license license:expat))) diff --git a/hugo-extended.scm b/hugo-extended.scm index a1be490..36a7867 100644 --- a/hugo-extended.scm +++ b/hugo-extended.scm @@ -38,6 +38,7 @@ `(("hugo" ("libgccjit" "libstdc++"))) #:phases (modify-phases %standard-phases + (delete 'binary-unpack) (replace 'unpack (lambda* (#:key inputs #:allow-other-keys) (invoke "tar" "-xvzf" (assoc-ref inputs "source"))))))) diff --git a/jless.scm b/jless.scm index 08f1b1d..e627156 100644 --- a/jless.scm +++ b/jless.scm @@ -24,7 +24,10 @@ "0fb9f66qc8shrsv1lffsdq78hc9cb6bddhml5zhv5bcm9pds7q2l")))) (build-system binary-build-system) (arguments - `(#:install-plan + `(#:phases + (modify-phases %standard-phases + (delete 'binary-unpack)) + #:install-plan `(("jless" "/bin/")) #:patchelf-plan `(("jless" ("glibc" "libxcb" "libgccjit"))))) diff --git a/micromamba.scm b/micromamba.scm index 391e20f..92a2420 100644 --- a/micromamba.scm +++ b/micromamba.scm @@ -9,35 +9,36 @@ (define-public micromamba-bin (package - (name "micromamba-bin") - (version "1.4.4-0") - (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/mamba-org/micromamba-releases/releases/download/" - version - "/micromamba-linux-64.tar.bz2")) - (sha256 - (base32 - "11k91i9b0b1whzdp0my2kh2ad6g93s38rl4as2n417x085rk3mwa")))) - (build-system binary-build-system) - (arguments - `(#:install-plan - `(("bin" "/") - ("info" "/share/")) - #:patchelf-plan - `(("bin/micromamba" ("glibc"))) - #:phases - (modify-phases %standard-phases - (replace 'unpack - (lambda* (#:key inputs #:allow-other-keys) - (invoke "tar" "-xvf" (assoc-ref inputs "source"))))))) - (inputs - `(("glibc" ,glibc))) - (native-inputs - `(("gzip" ,gzip))) - (synopsis "micromamba is a tiny version of the mamba package manager.") - (description "micromamba is a tiny version of the mamba package manager. It is a statically linked C++ executable with a separate command line interface. It does not need a base environment and does not come with a default version of Python.") - (home-page "https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html") - (license license:bsd-3))) + (name "micromamba-bin") + (version "1.4.4-0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/mamba-org/micromamba-releases/releases/download/" + version + "/micromamba-linux-64.tar.bz2")) + (sha256 + (base32 + "11k91i9b0b1whzdp0my2kh2ad6g93s38rl4as2n417x085rk3mwa")))) + (build-system binary-build-system) + (arguments + `(#:install-plan + `(("bin" "/") + ("info" "/share/")) + #:patchelf-plan + `(("bin/micromamba" ("glibc"))) + #:phases + (modify-phases %standard-phases + (delete 'binary-unpack) + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "-xvf" (assoc-ref inputs "source"))))))) + (inputs + `(("glibc" ,glibc))) + (native-inputs + `(("gzip" ,gzip))) + (synopsis "micromamba is a tiny version of the mamba package manager.") + (description "micromamba is a tiny version of the mamba package manager. It is a statically linked C++ executable with a separate command line interface. It does not need a base environment and does not come with a default version of Python.") + (home-page "https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html") + (license license:bsd-3))) diff --git a/nushell-bin.scm b/nushell-bin.scm index 19f3d1c..07ded24 100644 --- a/nushell-bin.scm +++ b/nushell-bin.scm @@ -29,6 +29,7 @@ (arguments `(#:phases (modify-phases %standard-phases + (delete 'binary-unpack) (replace 'unpack (lambda* (#:key inputs #:allow-other-keys) (mkdir-p "nushell") diff --git a/starship.scm b/starship.scm index 1e79988..163736a 100644 --- a/starship.scm +++ b/starship.scm @@ -29,6 +29,7 @@ `(("starship" ("libgccjit" "glibc"))) #:phases (modify-phases %standard-phases + (delete 'binary-unpack) (replace 'unpack (lambda* (#:key inputs #:allow-other-keys) (invoke "tar" "-xvzf" (assoc-ref inputs "source"))))))) diff --git a/texlab.scm b/texlab.scm index 60bfff7..331ab0f 100644 --- a/texlab.scm +++ b/texlab.scm @@ -28,6 +28,7 @@ `(("texlab" ("libgccjit"))) #:phases (modify-phases %standard-phases + (delete 'binary-unpack) (replace 'unpack (lambda* (#:key inputs #:allow-other-keys) (invoke "tar" "-xvzf" (assoc-ref inputs "source")))))))