binary-build: delete binary-unpack & format with guix-devel-mode

This commit is contained in:
Pavel Korytov 2023-12-31 00:13:38 +03:00
parent 9c0e6d9524
commit b47ea056ec
9 changed files with 124 additions and 113 deletions

View file

@ -7,55 +7,56 @@
(define-public activitywatch (define-public activitywatch
(package (package
(name "activitywatch-bin") (name "activitywatch-bin")
(version "0.11.0") (version "0.11.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://github.com/ActivityWatch/activitywatch/releases/download/v" "https://github.com/ActivityWatch/activitywatch/releases/download/v"
version version
"/activitywatch-v" "/activitywatch-v"
version version
"-linux-x86_64.zip")) "-linux-x86_64.zip"))
(sha256 (sha256
(base32 (base32
"1w62s9y8z6yn2mv55npsg1rfi2az4lim62v4awxwq1xzx4249pi0")))) "1w62s9y8z6yn2mv55npsg1rfi2az4lim62v4awxwq1xzx4249pi0"))))
(build-system binary-build-system) (build-system binary-build-system)
(arguments (arguments
`(#:validate-runpath? #f `(#:validate-runpath? #f
#:install-plan #:install-plan
`(("." "/usr/share/activitywatch")) `(("." "/usr/share/activitywatch"))
#:patchelf-plan #:patchelf-plan
`(("aw-qt" ("zlib")) `(("aw-qt" ("zlib"))
("aw-server/aw-server" ("zlib")) ("aw-server/aw-server" ("zlib"))
("aw-server-rust/aw-server-rust" ("zlib")) ("aw-server-rust/aw-server-rust" ("zlib"))
("aw-watcher-afk/aw-watcher-afk" ("zlib")) ("aw-watcher-afk/aw-watcher-afk" ("zlib"))
("aw-watcher-window/aw-watcher-window" ("zlib"))) ("aw-watcher-window/aw-watcher-window" ("zlib")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'install 'install-symlink (delete 'binary-unpack)
(lambda* (#:key outputs #:allow-other-keys) (add-after 'install 'install-symlink
(let ((out (string-append (assoc-ref outputs "out")))) (lambda* (#:key outputs #:allow-other-keys)
(mkdir (string-append out "/bin")) (let ((out (string-append (assoc-ref outputs "out"))))
(symlink (string-append out "/usr/share/activitywatch/aw-server/aw-server") (mkdir (string-append out "/bin"))
(string-append out "/bin/aw-server")) (symlink (string-append out "/usr/share/activitywatch/aw-server/aw-server")
(symlink (string-append out "/usr/share/activitywatch/aw-server-rust/aw-server-rust") (string-append out "/bin/aw-server"))
(string-append out "/bin/aw-server-rust")) (symlink (string-append out "/usr/share/activitywatch/aw-server-rust/aw-server-rust")
(symlink (string-append out "/usr/share/activitywatch/aw-watcher-afk/aw-watcher-afk") (string-append out "/bin/aw-server-rust"))
(string-append out "/bin/aw-watcher-afk")) (symlink (string-append out "/usr/share/activitywatch/aw-watcher-afk/aw-watcher-afk")
(symlink (string-append out "/usr/share/activitywatch/aw-watcher-window/aw-watcher-window") (string-append out "/bin/aw-watcher-afk"))
(string-append out "/bin/aw-watcher-window")) (symlink (string-append out "/usr/share/activitywatch/aw-watcher-window/aw-watcher-window")
#t)))))) (string-append out "/bin/aw-watcher-window"))
(inputs #t))))))
`(("zlib" ,zlib))) (inputs
(native-inputs `(("zlib" ,zlib)))
`(("unzip" ,unzip))) (native-inputs
(synopsis "ActivityWatch is an app that automatically tracks how you spend time on your devices.") `(("unzip" ,unzip)))
(description "ActivityWatch is an app that automatically tracks how you spend time on your devices. (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 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.") 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/") (home-page "https://activitywatch.net/")
(license license:mpl2.0))) (license license:mpl2.0)))

View file

@ -25,6 +25,7 @@
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'binary-unpack)
(replace 'unpack (replace 'unpack
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(invoke "tar" "xvzf" (assoc-ref inputs "source"))))) (invoke "tar" "xvzf" (assoc-ref inputs "source")))))

View file

@ -18,36 +18,37 @@
(define-public difftastic-bin (define-public difftastic-bin
(package (package
(name "difftastic-bin") (name "difftastic-bin")
(version "0.53.1") (version "0.53.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://github.com/Wilfred/difftastic/releases/download/" version "/" "https://github.com/Wilfred/difftastic/releases/download/" version "/"
"difft-x86_64-unknown-linux-gnu.tar.gz")) "difft-x86_64-unknown-linux-gnu.tar.gz"))
(sha256 (sha256
(base32 (base32
"08hx8ljm67zjmnz3mrhisgzqiz5fnd856jqgsppl2i7x4vgzw9by")))) "08hx8ljm67zjmnz3mrhisgzqiz5fnd856jqgsppl2i7x4vgzw9by"))))
(build-system binary-build-system) (build-system binary-build-system)
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'unpack (delete 'binary-unpack)
(lambda* (#:key inputs #:allow-other-keys) (replace 'unpack
(invoke "tar" "xvzf" (assoc-ref inputs "source"))))) (lambda* (#:key inputs #:allow-other-keys)
#:install-plan (invoke "tar" "xvzf" (assoc-ref inputs "source")))))
`(("difft" "/bin/")) #:install-plan
#:patchelf-plan `(("difft" "/bin/"))
`(("difft" ("glibc" "libgccjit" "libstdc++"))))) #:patchelf-plan
(inputs `(("difft" ("glibc" "libgccjit" "libstdc++")))))
`(("curl" ,curl) (inputs
("libgccjit" ,libgccjit) `(("curl" ,curl)
("libstdc++" ,libstdc++) ("libgccjit" ,libgccjit)
("glibc" ,glibc) ("libstdc++" ,libstdc++)
("zlib" ,zlib))) ("glibc" ,glibc)
(synopsis "Difftastic is a structural diff tool that compares files based on their syntax.") ("zlib" ,zlib)))
(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. (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 @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. @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 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. @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") @end itemize")
(home-page "https://difftastic.wilfred.me.uk/") (home-page "https://difftastic.wilfred.me.uk/")
(license license:expat))) (license license:expat)))

View file

@ -38,6 +38,7 @@
`(("hugo" ("libgccjit" "libstdc++"))) `(("hugo" ("libgccjit" "libstdc++")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'binary-unpack)
(replace 'unpack (replace 'unpack
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(invoke "tar" "-xvzf" (assoc-ref inputs "source"))))))) (invoke "tar" "-xvzf" (assoc-ref inputs "source")))))))

View file

@ -24,7 +24,10 @@
"0fb9f66qc8shrsv1lffsdq78hc9cb6bddhml5zhv5bcm9pds7q2l")))) "0fb9f66qc8shrsv1lffsdq78hc9cb6bddhml5zhv5bcm9pds7q2l"))))
(build-system binary-build-system) (build-system binary-build-system)
(arguments (arguments
`(#:install-plan `(#:phases
(modify-phases %standard-phases
(delete 'binary-unpack))
#:install-plan
`(("jless" "/bin/")) `(("jless" "/bin/"))
#:patchelf-plan #:patchelf-plan
`(("jless" ("glibc" "libxcb" "libgccjit"))))) `(("jless" ("glibc" "libxcb" "libgccjit")))))

View file

@ -9,35 +9,36 @@
(define-public micromamba-bin (define-public micromamba-bin
(package (package
(name "micromamba-bin") (name "micromamba-bin")
(version "1.4.4-0") (version "1.4.4-0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://github.com/mamba-org/micromamba-releases/releases/download/" "https://github.com/mamba-org/micromamba-releases/releases/download/"
version version
"/micromamba-linux-64.tar.bz2")) "/micromamba-linux-64.tar.bz2"))
(sha256 (sha256
(base32 (base32
"11k91i9b0b1whzdp0my2kh2ad6g93s38rl4as2n417x085rk3mwa")))) "11k91i9b0b1whzdp0my2kh2ad6g93s38rl4as2n417x085rk3mwa"))))
(build-system binary-build-system) (build-system binary-build-system)
(arguments (arguments
`(#:install-plan `(#:install-plan
`(("bin" "/") `(("bin" "/")
("info" "/share/")) ("info" "/share/"))
#:patchelf-plan #:patchelf-plan
`(("bin/micromamba" ("glibc"))) `(("bin/micromamba" ("glibc")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'unpack (delete 'binary-unpack)
(lambda* (#:key inputs #:allow-other-keys) (replace 'unpack
(invoke "tar" "-xvf" (assoc-ref inputs "source"))))))) (lambda* (#:key inputs #:allow-other-keys)
(inputs (invoke "tar" "-xvf" (assoc-ref inputs "source")))))))
`(("glibc" ,glibc))) (inputs
(native-inputs `(("glibc" ,glibc)))
`(("gzip" ,gzip))) (native-inputs
(synopsis "micromamba is a tiny version of the mamba package manager.") `(("gzip" ,gzip)))
(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.") (synopsis "micromamba is a tiny version of the mamba package manager.")
(home-page "https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html") (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.")
(license license:bsd-3))) (home-page "https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html")
(license license:bsd-3)))

View file

@ -29,6 +29,7 @@
(arguments (arguments
`(#:phases `(#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'binary-unpack)
(replace 'unpack (replace 'unpack
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "nushell") (mkdir-p "nushell")

View file

@ -29,6 +29,7 @@
`(("starship" ("libgccjit" "glibc"))) `(("starship" ("libgccjit" "glibc")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'binary-unpack)
(replace 'unpack (replace 'unpack
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(invoke "tar" "-xvzf" (assoc-ref inputs "source"))))))) (invoke "tar" "-xvzf" (assoc-ref inputs "source")))))))

View file

@ -28,6 +28,7 @@
`(("texlab" ("libgccjit"))) `(("texlab" ("libgccjit")))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'binary-unpack)
(replace 'unpack (replace 'unpack
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(invoke "tar" "-xvzf" (assoc-ref inputs "source"))))))) (invoke "tar" "-xvzf" (assoc-ref inputs "source")))))))