Add fdroid server git

Julien LepillerTue Mar 12 18:38:14+0100 2019

234c736

Add fdroid server git

more/packages/android.scm unknown status 1

1+
;;; GNU Guix --- Functional package management for GNU
2+
;;; Copyright ?? 2018 Julien Lepiller <julien@lepiller.eu>
3+
;;;
4+
;;; This file is part of GNU Guix.
5+
;;;
6+
;;; GNU Guix is free software; you can redistribute it and/or modify it
7+
;;; under the terms of the GNU General Public License as published by
8+
;;; the Free Software Foundation; either version 3 of the License, or (at
9+
;;; your option) any later version.
10+
;;;
11+
;;; GNU Guix is distributed in the hope that it will be useful, but
12+
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13+
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14+
;;; GNU General Public License for more details.
15+
;;;
16+
;;; You should have received a copy of the GNU General Public License
17+
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
18+
19+
(define-module (more packages android)
20+
  #:use-module ((guix licenses) #:prefix license:)
21+
  #:use-module (gnu packages)
22+
  #:use-module (guix packages)
23+
  #:use-module (guix download)
24+
  #:use-module (guix git-download)
25+
  #:use-module (guix utils)
26+
  #:use-module (gnu packages android)
27+
  #:use-module (gnu packages xml))
28+
29+
(define-public fdroidserver-git
30+
  (package
31+
    (inherit fdroidserver)
32+
    (name (package-name fdroidserver))
33+
    (version "git")
34+
    (source (origin
35+
              (method git-fetch)
36+
              (uri (git-reference
37+
                     (url "https://gitlab.com/fdroid/fdroidserver.git")
38+
                     (commit "ff578dae30dfa83330862a01a6cbd603330b71e0")))
39+
              (file-name (string-append name "-" version "-source"))
40+
              (sha256
41+
               (base32
42+
                "1ar41806wy0y8szrsv963mj9bkf5jlnwlk75xl9x0mykpnj279j7"))))
43+
    (arguments
44+
     (substitute-keyword-arguments (package-arguments fdroidserver)
45+
       ((#:phases phases)
46+
        `(modify-phases ,phases
47+
           (add-after 'build 'compile-catalog
48+
             (lambda _
49+
               (invoke "python" "setup.py" "compile_catalog")
50+
               #t))
51+
           (add-after 'install 'install-scripts
52+
             (lambda* (#:key outputs #:allow-other-keys)
53+
               (let* ((out (assoc-ref outputs "out"))
54+
                      (site (string-append out "/lib/python3.6/site-packages")))
55+
                 (for-each
56+
                   (lambda (script)
57+
                     (install-file script site))
58+
                   '("gradlew-fdroid" "jenkins-build-all" "jenkins-setup-build-environment"
59+
                     "jenkins-test" "makebuildserver")))
60+
               #t))))))
61+
    (native-inputs
62+
     `(("python-defusedxml" ,python-defusedxml)
63+
       ,@(package-native-inputs fdroidserver)))))