diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-11-30 20:01:09 +0100 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-11-30 21:17:26 +0100 |
commit | 65c110e27a8ce3889d0efecc36b43316265a2d8a (patch) | |
tree | e6f54cab0528fe90ed03b8680aff3dc9bc1a382e /gnu | |
parent | 09191e37cd2ab3c4799b90a1756644bbf4be6aab (diff) |
gnu: Add ziptime.
* gnu/packages/compression.scm (ziptime): New public variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/compression.scm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 1d643cdff8..79300bbb92 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -1606,6 +1606,55 @@ recreates the stored directory structure by default.") (license (license:non-copyleft "file://LICENSE" "See LICENSE in the distribution.")))) +(define-public ziptime + (let ((commit "2a5bc9dfbf7c6a80e5f7cb4dd05b4036741478bc") + (revision "0")) + (package + (name "ziptime") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://android.googlesource.com/platform/build") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hrn61b3a97dlc4iqc28rwx8k8zf7ycbwzqqp93vj34zy5a541kn")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no test suite + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-directory + (lambda _ + (chdir "tools/ziptime"))) + (delete 'configure) ; nothing to configure + (replace 'build + ;; There is no Makefile, only an ‘Android.bp’ file. Ignore it. + (lambda _ + (let ((c++ ,(cxx-for-target))) + (apply invoke c++ "-O2" "-o" "ziptime" + (find-files "." "\\.cpp$"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append out "/share/doc/" ,name "-" ,version))) + (install-file "ziptime" bin) + (install-file "README.txt" doc))))))) + ;; There is no separate home page for this tiny bundled build tool. + (home-page (string-append "https://android.googlesource.com/platform/build/" + "+/master/tools/ziptime/README.txt")) + (synopsis "Normalize @file{.zip} archive header timestamps") + (description + "Ziptime helps make @file{.zip} archives reproducible by replacing +timestamps in the file header with a fixed time (1 January 2008). + +``Extra fields'' are not changed, so you'll need to use the @code{-X} option to +@command{zip} to prevent it from storing the ``universal time'' field.") + (license license:asl2.0)))) + (define-public zziplib (package (name "zziplib") |