aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-09-02 17:28:04 -0400
committerKyle Meyer <kyle@kyleam.com>2019-09-02 17:28:04 -0400
commit8b67bbea54df8e0e0de7ce577050c2b7f6ca1db6 (patch)
treeef20999ad5557884ad276f13401b08d1fd0b43fe
parenteedea8ce4780eb541d71ba8695a865e805c85631 (diff)
downloadguix-packages-8b67bbea54df8e0e0de7ce577050c2b7f6ca1db6.tar.gz
Add tojson
-rw-r--r--km-packages/misc.scm74
1 files changed, 74 insertions, 0 deletions
diff --git a/km-packages/misc.scm b/km-packages/misc.scm
new file mode 100644
index 0000000..5642e95
--- /dev/null
+++ b/km-packages/misc.scm
@@ -0,0 +1,74 @@
+;;; misc.scm --- miscellaneous Guix packages
+;;;
+;;; Copyright © 2019 Kyle Meyer <kyle@kyleam.com>
+;;;
+;;; This file is NOT part of GNU Guix.
+;;;
+;;; This program is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation, either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; This program is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with this program. If not, see
+;;; <https://www.gnu.org/licenses/>.
+
+(define-module (km-packages misc)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
+ #:use-module (guix build utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix packages)
+ #:use-module (guix utils))
+
+(define-public tojson
+ (package
+ (name "tojson")
+ (version "0.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append "https://github.com/woky/tojson"))
+ (commit (string-append "v" version))))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "18qpwqp1aymlacnaa01kk26zrhdwrypbkrk1i3f182d8h15fghcd"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (install-file "tojson" bin))
+ #t))
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (path (getenv "PYTHONPATH")))
+ (wrap-program (string-append out "/bin/tojson")
+ `("PYTHONPATH" ":" prefix (,path))))
+ #t)))))
+ (inputs
+ `(("python" ,python)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page "https://github.com/woky/tojson")
+ (synopsis "todo")
+ (description "todo")
+ (license license:gpl3)))