* [PATCH] gnu: Add laby. @ 2016-02-09 20:27 Jan Nieuwenhuizen 2016-02-09 22:28 ` Christopher Allan Webber 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-09 20:27 UTC (permalink / raw) To: guix-devel [-- Attachment #1: Type: text/plain, Size: 719 bytes --] Hi, And now a real fun package...If you don't know Laby, maybe you want to have a look at it. It's a programming game that my daughters happen to like very much. They started programming with this without knowing they did; they were simply playing a game. My oldest (8 at the time) chose the C language after trying Python and finding how hard it was to get the indentation right (without proper editor support). When I saw how difficult it was for my youngest (5 at the time) to get all the semicolons and parentheses right, I wrote the Scheme mod (based on Guile) and contributed it. So, her first programming was done in Guile Scheme; apparently the easiest syntax of all, if you learn young. Greetings, Jan [-- Attachment #2: 0001-gnu-Add-laby.patch --] [-- Type: text/x-diff, Size: 3756 bytes --] From fcd853a5c9b13019409d69db48f6bac0023b7b30 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Sun, 7 Feb 2016 12:57:40 +0100 Subject: [PATCH] gnu: Add laby. * gnu/packages/games.scm (laby): New variable. * gnu/packages/patches/laby-make-install.patch: New file. --- gnu/packages/games.scm | 30 ++++++++++++++++++++++++++++ gnu/packages/patches/laby-make-install.patch | 25 +++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 gnu/packages/patches/laby-make-install.patch diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7eb0e7a..aee4f69 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -59,6 +60,7 @@ #:use-module (gnu packages mp3) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages xorg) @@ -1891,3 +1893,31 @@ and a game metadata scraper.") (description "The Emilia Pinball Project is a pinball simulator. There are only two levels to play with, but they are very addictive.") (license license:gpl2))) + +(define-public laby + (package + (name "laby") + (version "0.6.4") + (source + (origin (method url-fetch) + (uri (string-append "https://github.com/sgimenez/laby/tarball/laby-" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "113ip48308ps3lsw427xswgx3wdanils43nyal9n4jr6bcx1bj2j")) + (patches (list (search-patch "laby-make-install.patch"))))) + (build-system gnu-build-system) + (inputs + `(("ocaml" ,ocaml) + ("lablgtk" ,lablgtk))) + (arguments + '(#:phases (alist-delete 'configure %standard-phases) + #:tests? #f ; no 'check' target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))))) + (home-page "https://sgimenez.github.io/laby/") + (synopsis "Laby, programming game") + (description "Learn programming, playing with ants and spider webs ;-) +Your robot ant can be programmed in many languages: OCaml, Python, C, C++, +Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced +programmers may also add their own favorite language.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/laby-make-install.patch b/gnu/packages/patches/laby-make-install.patch new file mode 100644 index 0000000..227d781 --- /dev/null +++ b/gnu/packages/patches/laby-make-install.patch @@ -0,0 +1,25 @@ +From e9896b8951f9faf1f76a3b45be6e70d0aeb30a73 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 15 Nov 2014 17:48:18 +0100 +Subject: [PATCH] Add make install. + +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index ca18c1e..65af31b 100644 +--- a/Makefile ++++ b/Makefile +@@ -19,4 +19,9 @@ dist: + @git archive --prefix="$(PROJECT_ARCHIVE)/" HEAD \ + | gzip >_dist/"$(PROJECT_ARCHIVE)".tar.gz + @echo archive stored in "_dist/$(PROJECT_ARCHIVE).tar.gz" ++ ++install: ++ strip laby ++ cp laby /usr/games/laby ++ mkdir -p /usr/share/laby ++ tar -C data -cf - . | tar -C /usr/share/laby -xf- +-- +2.1.4 -- 2.1.4 [-- Attachment #3: Type: text/plain, Size: 156 bytes --] -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-09 20:27 [PATCH] gnu: Add laby Jan Nieuwenhuizen @ 2016-02-09 22:28 ` Christopher Allan Webber 2016-02-11 20:18 ` Efraim Flashner 0 siblings, 1 reply; 20+ messages in thread From: Christopher Allan Webber @ 2016-02-09 22:28 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel Jan Nieuwenhuizen writes: > Hi, > > And now a real fun package...If you don't know Laby, maybe you want to > have a look at it. It's a programming game that my daughters happen to > like very much. They started programming with this without knowing they > did; they were simply playing a game. > > My oldest (8 at the time) chose the C language after trying Python and > finding how hard it was to get the indentation right (without proper > editor support). > > When I saw how difficult it was for my youngest (5 at the time) to get > all the semicolons and parentheses right, I wrote the Scheme mod (based > on Guile) and contributed it. So, her first programming was done in > Guile Scheme; apparently the easiest syntax of all, if you learn young. > > Greetings, Jan Now this looks like a lot of fun! Some of these lines are over 80 characters though.. could you fix that? I tried running this though and the patch it provided didn't seem to apply. I also see it's doing manual cp to /usr/games/laby and etc... but could that really work? Shouldn't it be copying to the output directory in the store instead? Maybe adding your own install step to the build phases would be nicest here? Anyway, would love to see this packaged, and play with it myself! ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-09 22:28 ` Christopher Allan Webber @ 2016-02-11 20:18 ` Efraim Flashner 2016-02-11 22:21 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 20+ messages in thread From: Efraim Flashner @ 2016-02-11 20:18 UTC (permalink / raw) To: Christopher Allan Webber; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 1055 bytes --] On Tue, 09 Feb 2016 14:28:35 -0800 Christopher Allan Webber <cwebber@dustycloud.org> wrote: > Jan Nieuwenhuizen writes: > > [...] > > Now this looks like a lot of fun! > > Some of these lines are over 80 characters though.. could you fix that? > > I tried running this though and the patch it provided didn't seem to > apply. The patch isn't registered in gnu-system.am, so that should be why. > I also see it's doing manual cp to /usr/games/laby and > etc... but could that really work? Shouldn't it be copying to the > output directory in the store instead? > > Maybe adding your own install step to the build phases would be nicest > here? > > Anyway, would love to see this packaged, and play with it myself! > That's all I have to add, other than I'm also looking forward to playing the game. -- Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-11 20:18 ` Efraim Flashner @ 2016-02-11 22:21 ` Jan Nieuwenhuizen 2016-02-12 18:09 ` Andreas Enge ` (2 more replies) 0 siblings, 3 replies; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-11 22:21 UTC (permalink / raw) To: Efraim Flashner; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 349 bytes --] Efraim Flashner writes: > The patch isn't registered in gnu-system.am, so that should be why. Ah... And also, ocaml-findlib was missing and lablgtk did not compile cmxa files, which laby needs. So, three patches to get a running Laby. > That's all I have to add, other than I'm also looking forward to playing the > game. :-) Greetings, Jan [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-gnu-lablgtk-also-build-cmxa-libraries.patch --] [-- Type: text/x-diff, Size: 1295 bytes --] From 0a2531c254a33d49de6ac70cc941c3306592bf34 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Thu, 11 Feb 2016 18:52:15 +0100 Subject: [PATCH 1/3] gnu: lablgtk: also build cmxa libraries. * gnu/packages/ocaml.scm (lablgtk): use "opt" to build *.cmxa files, set OCAMLPATH to find them. --- gnu/packages/ocaml.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 1311b1b..434b9d8 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -455,6 +455,10 @@ provers.") (base32 "1bybn3jafxf4cx25zvn8h2xj9agn1xjbn7j3ywxxqx6az7rfnnwp")))) (build-system gnu-build-system) + (native-search-paths + (list (search-path-specification + (variable "OCAMLPATH") + (files (list (string-append "lib/ocaml")))))) (native-inputs `(("camlp4" ,camlp4) ("ocaml" ,ocaml) @@ -471,6 +475,8 @@ provers.") (arguments `(#:tests? #f ; no check target + ;; opt: also install cmxa files + #:make-flags (list "all" "opt") ;; Occasionally we would get "Error: Unbound module GtkThread" when ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially. #:parallel-build? #f -- 2.1.4 [-- Attachment #3: 0002-gnu-Add-ocaml-findlib.patch --] [-- Type: text/x-diff, Size: 5836 bytes --] From 50daba8389a3cfa0f2d33ddf1abdd7e92065f152 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Thu, 11 Feb 2016 18:53:07 +0100 Subject: [PATCH 2/3] gnu: Add ocaml-findlib. * gnu/packages/ocaml.scm (ocaml-findlib): New variable. * gnu/packages/patches/ocaml-findlib-make-install.patch: New file. * gnu-system.am (dist_patch_DATA): Register it. --- gnu-system.am | 1 + gnu/packages/ocaml.scm | 51 ++++++++++++++++++++++ .../patches/ocaml-findlib-make-install.patch | 11 +++++ 3 files changed, 63 insertions(+) create mode 100644 gnu/packages/patches/ocaml-findlib-make-install.patch diff --git a/gnu-system.am b/gnu-system.am index 3b5f241..0cd2ca3 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -624,6 +624,7 @@ dist_patch_DATA = \ gnu/packages/patches/nvi-assume-preserve-path.patch \ gnu/packages/patches/nvi-dbpagesize-binpower.patch \ gnu/packages/patches/nvi-db4.patch \ + gnu/packages/patches/ocaml-findlib-make-install.patch \ gnu/packages/patches/openexr-missing-samples.patch \ gnu/packages/patches/openimageio-boost-1.60.patch \ gnu/packages/patches/openjpeg-CVE-2015-6581.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 434b9d8..759fdad 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ #:use-module (gnu packages lynx) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages m4) #:use-module (gnu packages ncurses) #:use-module (gnu packages version-control) #:use-module (gnu packages curl)) @@ -619,3 +621,52 @@ a collection of files and directories to be stored on different hosts brought up to date by propagating the changes in each replica to the other.") (license gpl3+))) + +(define-public ocaml-findlib + (package + (name "ocaml-findlib") + (version "1.6.1") + (source (origin + (method url-fetch) + (uri (string-append "http://download.camlcity.org/download/" + "findlib" "-" version ".tar.gz")) + (sha256 + (base32 + "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721")) + (patches + (list (search-patch "ocaml-findlib-make-install.patch"))))) + (build-system gnu-build-system) + (inputs + `(("camlp4" ,camlp4) + ("m4" ,m4) + ("ocaml" ,ocaml))) + (arguments + `(#:tests? #f ; no test suite + #:parallel-build? #f + #:make-flags (list "all" "opt") + #:phases (modify-phases %standard-phases + (replace + 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (system* + "./configure" + "-bindir" (string-append out "/bin") + "-config" (string-append out "/etc/ocamfind.conf") + "-mandir" (string-append out "/share/man") + "-sitelib" (string-append out "/lib/ocaml/site-lib") + "-with-toolbox"))))))) + (home-page "http://projects.camlcity.org/projects/findlib.html") + (synopsis "Management tool for OCaml libraries") + (description + "The \"findlib\" library provides a scheme to manage reusable software +components (packages), and includes tools that support this scheme. Packages +are collections of OCaml modules for which metainformation can be stored. The +packages are kept in the filesystem hierarchy, but with strict directory +structure. The library contains functions to look the directory up that +stores a package, to query metainformation about a package, and to retrieve +dependency information about multiple packages. There is also a tool that +allows the user to enter queries on the command-line. In order to simplify +compilation and linkage, there are new frontends of the various OCaml +compilers that can directly deal with packages.") + (license x11))) diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch new file mode 100644 index 0000000..a559a6a --- /dev/null +++ b/gnu/packages/patches/ocaml-findlib-make-install.patch @@ -0,0 +1,11 @@ +--- findlib-1.5.3/src/findlib/Makefile 2014-09-16 13:21:46.000000000 +0200 ++++ findlib-1.5.3/src/findlib/Makefile.new 2014-10-01 14:30:54.141082521 +0200 +@@ -89,7 +89,7 @@ + install: all + mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" + mkdir -p "$(prefix)$(OCAMLFIND_BIN)" +- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" ++ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)" + files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ + cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" + f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ -- 2.1.4 [-- Attachment #4: 0003-gnu-Add-laby.patch --] [-- Type: text/x-diff, Size: 6456 bytes --] From b805b9099cd4051e2d664ed43df9f1c497497599 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Sun, 7 Feb 2016 12:57:40 +0100 Subject: [PATCH 3/3] gnu: Add laby. * gnu/packages/games.scm (laby): New variable. * gnu/packages/patches/laby-make-install.patch: New file. * gnu/packages/patches/laby-make-png.patch: New file. * gnu-system.am (dist_patch_DATA): Register them. --- gnu-system.am | 2 ++ gnu/packages/games.scm | 45 ++++++++++++++++++++++++++++ gnu/packages/patches/laby-make-install.patch | 25 ++++++++++++++++ gnu/packages/patches/laby-make-png.patch | 27 +++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 gnu/packages/patches/laby-make-install.patch create mode 100644 gnu/packages/patches/laby-make-png.patch diff --git a/gnu-system.am b/gnu-system.am index 0cd2ca3..59fb975 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -539,6 +539,8 @@ dist_patch_DATA = \ gnu/packages/patches/jasper-CVE-2016-1867.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ + gnu/packages/patches/laby-make-png.patch \ + gnu/packages/patches/laby-make-install.patch \ gnu/packages/patches/ldc-disable-tests.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/liba52-enable-pic.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7eb0e7a..aa74665 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,9 +57,11 @@ #:use-module (gnu packages libcanberra) #:use-module (gnu packages libunwind) #:use-module (gnu packages haskell) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages mp3) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages xorg) @@ -1891,3 +1894,45 @@ and a game metadata scraper.") (description "The Emilia Pinball Project is a pinball simulator. There are only two levels to play with, but they are very addictive.") (license license:gpl2))) + +(define-public laby + (package + (name "laby") + (version "0.6.4") + (source + (origin (method url-fetch) + (uri (string-append + "https://github.com/sgimenez/laby/tarball/" + name "-" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "113ip48308ps3lsw427xswgx3wdanils43nyal9n4jr6bcx1bj2j")) + (patches (list (search-patch "laby-make-install.patch") + (search-patch "laby-make-png.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("imagemagick" ,imagemagick))) + (inputs + `(("lablgtk" ,lablgtk) + ("ocaml" ,ocaml) + ("ocaml-findlib" ,ocaml-findlib))) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + (add-before + 'build 'setenv + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((lablgtk (assoc-ref inputs "lablgtk"))) + (setenv "LD_LIBRARY_PATH" + (string-append lablgtk "/lib/ocaml/stublibs")))))) + #:tests? #f ; no 'check' target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "all" "png"))) + (home-page "https://sgimenez.github.io/laby/") + (synopsis "Programming game") + (description "Learn programming, playing with ants and spider webs ;-) +Your robot ant can be programmed in many languages: OCaml, Python, C, C++, +Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced +programmers may also add their own favorite language.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/laby-make-install.patch b/gnu/packages/patches/laby-make-install.patch new file mode 100644 index 0000000..3e956be --- /dev/null +++ b/gnu/packages/patches/laby-make-install.patch @@ -0,0 +1,25 @@ +From e9896b8951f9faf1f76a3b45be6e70d0aeb30a73 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 15 Nov 2014 17:48:18 +0100 +Subject: [PATCH] Add make install. + +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index ca18c1e..65af31b 100644 +--- a/Makefile 2016-02-09 21:34:01.883660009 +0100 ++++ b/Makefile 2016-02-09 21:34:30.672150679 +0100 +@@ -19,3 +19,11 @@ + @git archive --prefix="$(PROJECT_ARCHIVE)/" HEAD \ + | gzip >_dist/"$(PROJECT_ARCHIVE)".tar.gz + @echo archive stored in "_dist/$(PROJECT_ARCHIVE).tar.gz" ++ ++PREFIX=/usr/local ++install: ++ strip laby ++ mkdir -p $(PREFIX)/bin ++ cp laby $(PREFIX)/bin/laby ++ mkdir -p $(PREFIX)/share/laby ++ tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- diff --git a/gnu/packages/patches/laby-make-png.patch b/gnu/packages/patches/laby-make-png.patch new file mode 100644 index 0000000..6851e4a --- /dev/null +++ b/gnu/packages/patches/laby-make-png.patch @@ -0,0 +1,27 @@ +From 6d3c05e25f2b5f231abf5bb4af4bc0b06455b0e4 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Thu, 11 Feb 2016 18:30:19 +0100 +Subject: [PATCH] Add make png. + +--- + Makefile | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Makefile b/Makefile +index 5d9d733..f54d09b 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,3 +27,10 @@ install: + cp laby $(PREFIX)/bin/laby + mkdir -p $(PREFIX)/share/laby + tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- ++ ++SVG:=$(wildcard data/tiles/*.svg) ++PNG:=$(SVG:%.svg=%.png) ++png: $(PNG) ++ ++%.png: %.svg ++ convert $^ $@ +-- +2.1.4 + -- 2.1.4 [-- Attachment #5: Type: text/plain, Size: 156 bytes --] -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-11 22:21 ` Jan Nieuwenhuizen @ 2016-02-12 18:09 ` Andreas Enge 2016-02-13 8:11 ` Jan Nieuwenhuizen 2016-02-12 18:13 ` Andreas Enge 2016-02-12 18:17 ` Andreas Enge 2 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-02-12 18:09 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel Hello, On Thu, Feb 11, 2016 at 11:21:30PM +0100, Jan Nieuwenhuizen wrote: > Ah... And also, ocaml-findlib was missing and lablgtk did not compile > cmxa files, which laby needs. So, three patches to get a running Laby. > + (native-search-paths > + (list (search-path-specification > + (variable "OCAMLPATH") > + (files (list (string-append "lib/ocaml")))))) I have doubts about this search path. Normally, a search path is registered with the program that needs it; for instance, gcc declares a LIBRARY_PATH, and then whenever a program is installed that provides libraries, these are added to the environment variable. So I suppose the search path declaration should really be in the ocaml package, and if lablgtk provides files matching the pattern, they will be added and available for laby. What do you think? If yes, this should be split into two patches. (There are still minor things, like a missing copyright line, indentation and so on; if you modify your patches anyway, you might widh to have a second look.) Andreas ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-12 18:09 ` Andreas Enge @ 2016-02-13 8:11 ` Jan Nieuwenhuizen 2016-02-13 8:43 ` Andreas Enge 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-13 8:11 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 789 bytes --] Andreas Enge writes: >> + (native-search-paths >> + (list (search-path-specification >> + (variable "OCAMLPATH") >> + (files (list (string-append "lib/ocaml")))))) > > I have doubts about this search path. Normally, a search path is registered > with the program that needs it; for instance, gcc declares a LIBRARY_PATH, > and then whenever a program is installed that provides libraries, these are > added to the environment variable. > What do you think? If yes, this should be split into two patches. Ah yes, that makes sense. > So I suppose the search path declaration should really be in the ocaml > package, and if lablgtk provides files matching the pattern, they will be > added and available for laby. Nice! New patch set attached. Greetings, Jan [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-gnu-Update-ocaml-set-search-path.patch --] [-- Type: text/x-diff, Size: 912 bytes --] From 73199e0de318a6b9c80060fe21f8d0667cb34df7 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Sat, 13 Feb 2016 08:42:34 +0100 Subject: [PATCH 1/3] gnu: Update ocaml: set search path. * gnu/packages/ocaml.scm (ocaml): Set OCAMLPATH for libraries like lablgtk. --- gnu/packages/ocaml.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 3baccf4..a584006 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -62,6 +62,10 @@ (base32 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3")))) (build-system gnu-build-system) + (native-search-paths + (list (search-path-specification + (variable "OCAMLPATH") + (files (list (string-append "lib/ocaml")))))) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config))) -- 2.1.4 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #3: 0002-gnu-Update-lablgtk-also-build-cmxa-libraries.patch --] [-- Type: text/x-diff, Size: 868 bytes --] From 9ff710f10bce9bf21b7b4b2f0703511c44343371 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Thu, 11 Feb 2016 18:52:15 +0100 Subject: [PATCH 2/3] gnu: Update lablgtk: also build cmxa libraries. * gnu/packages/ocaml.scm (lablgtk): Use "opt" to build *.cmxa files. --- gnu/packages/ocaml.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index a584006..8fc5c8a 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -477,6 +477,8 @@ provers.") (arguments `(#:tests? #f ; no check target + ;; opt: also install cmxa files + #:make-flags (list "all" "opt") ;; Occasionally we would get "Error: Unbound module GtkThread" when ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially. #:parallel-build? #f -- 2.1.4 [-- Attachment #4: 0003-gnu-Add-laby.patch --] [-- Type: text/x-diff, Size: 6435 bytes --] From a1b9a3a164a2c743066c6fdf59c5970980579ff4 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Sun, 7 Feb 2016 12:57:40 +0100 Subject: [PATCH 3/3] gnu: Add laby. * gnu/packages/patches/laby-make-install.patch: New file. * gnu/packages/patches/laby-make-png.patch: New file. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/games.scm (laby): New variable. --- gnu-system.am | 2 ++ gnu/packages/games.scm | 45 ++++++++++++++++++++++++++++ gnu/packages/patches/laby-make-install.patch | 25 ++++++++++++++++ gnu/packages/patches/laby-make-png.patch | 27 +++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 gnu/packages/patches/laby-make-install.patch create mode 100644 gnu/packages/patches/laby-make-png.patch diff --git a/gnu-system.am b/gnu-system.am index eba7c4e..19f1244 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -540,6 +540,8 @@ dist_patch_DATA = \ gnu/packages/patches/jasper-CVE-2016-1867.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ + gnu/packages/patches/laby-make-png.patch \ + gnu/packages/patches/laby-make-install.patch \ gnu/packages/patches/ldc-disable-tests.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/liba52-enable-pic.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7eb0e7a..aa74665 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,9 +57,11 @@ #:use-module (gnu packages libcanberra) #:use-module (gnu packages libunwind) #:use-module (gnu packages haskell) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages mp3) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages xorg) @@ -1891,3 +1894,45 @@ and a game metadata scraper.") (description "The Emilia Pinball Project is a pinball simulator. There are only two levels to play with, but they are very addictive.") (license license:gpl2))) + +(define-public laby + (package + (name "laby") + (version "0.6.4") + (source + (origin (method url-fetch) + (uri (string-append + "https://github.com/sgimenez/laby/tarball/" + name "-" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "113ip48308ps3lsw427xswgx3wdanils43nyal9n4jr6bcx1bj2j")) + (patches (list (search-patch "laby-make-install.patch") + (search-patch "laby-make-png.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("imagemagick" ,imagemagick))) + (inputs + `(("lablgtk" ,lablgtk) + ("ocaml" ,ocaml) + ("ocaml-findlib" ,ocaml-findlib))) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + (add-before + 'build 'setenv + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((lablgtk (assoc-ref inputs "lablgtk"))) + (setenv "LD_LIBRARY_PATH" + (string-append lablgtk "/lib/ocaml/stublibs")))))) + #:tests? #f ; no 'check' target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "all" "png"))) + (home-page "https://sgimenez.github.io/laby/") + (synopsis "Programming game") + (description "Learn programming, playing with ants and spider webs ;-) +Your robot ant can be programmed in many languages: OCaml, Python, C, C++, +Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced +programmers may also add their own favorite language.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/laby-make-install.patch b/gnu/packages/patches/laby-make-install.patch new file mode 100644 index 0000000..3e956be --- /dev/null +++ b/gnu/packages/patches/laby-make-install.patch @@ -0,0 +1,25 @@ +From e9896b8951f9faf1f76a3b45be6e70d0aeb30a73 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 15 Nov 2014 17:48:18 +0100 +Subject: [PATCH] Add make install. + +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index ca18c1e..65af31b 100644 +--- a/Makefile 2016-02-09 21:34:01.883660009 +0100 ++++ b/Makefile 2016-02-09 21:34:30.672150679 +0100 +@@ -19,3 +19,11 @@ + @git archive --prefix="$(PROJECT_ARCHIVE)/" HEAD \ + | gzip >_dist/"$(PROJECT_ARCHIVE)".tar.gz + @echo archive stored in "_dist/$(PROJECT_ARCHIVE).tar.gz" ++ ++PREFIX=/usr/local ++install: ++ strip laby ++ mkdir -p $(PREFIX)/bin ++ cp laby $(PREFIX)/bin/laby ++ mkdir -p $(PREFIX)/share/laby ++ tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- diff --git a/gnu/packages/patches/laby-make-png.patch b/gnu/packages/patches/laby-make-png.patch new file mode 100644 index 0000000..6851e4a --- /dev/null +++ b/gnu/packages/patches/laby-make-png.patch @@ -0,0 +1,27 @@ +From 6d3c05e25f2b5f231abf5bb4af4bc0b06455b0e4 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Thu, 11 Feb 2016 18:30:19 +0100 +Subject: [PATCH] Add make png. + +--- + Makefile | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Makefile b/Makefile +index 5d9d733..f54d09b 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,3 +27,10 @@ install: + cp laby $(PREFIX)/bin/laby + mkdir -p $(PREFIX)/share/laby + tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- ++ ++SVG:=$(wildcard data/tiles/*.svg) ++PNG:=$(SVG:%.svg=%.png) ++png: $(PNG) ++ ++%.png: %.svg ++ convert $^ $@ +-- +2.1.4 + -- 2.1.4 [-- Attachment #5: Type: text/plain, Size: 153 bytes --] -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-13 8:11 ` Jan Nieuwenhuizen @ 2016-02-13 8:43 ` Andreas Enge 2016-02-13 14:09 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-02-13 8:43 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel On Sat, Feb 13, 2016 at 09:11:17AM +0100, Jan Nieuwenhuizen wrote: > Nice! New patch set attached. Very good, I pushed the first two. Concerning the commit message, it should read "gnu: ocaml: ..." in case a package is modified. > Subject: [PATCH 3/3] gnu: Add laby. > * gnu/packages/patches/laby-make-install.patch: New file. > * gnu/packages/patches/laby-make-png.patch: New file. > * gnu-system.am (dist_patch_DATA): Add them. > * gnu/packages/games.scm (laby): New variable. Here I would not use a patch. The policy is not totally clear (and not written up), but if an additional phase for installation is needed, I would do it in a custom phase on the scheme side instead of patching the makefile. See, for instance, the tinyxml package in xml.scm. Maybe it would also warrant an upstream bug report? Similarly for the make-png patch. Is this an upstream bug? Andreas PS: The game starts and shows the maze, it looks quite nice! PPS: You do not happen to use unison? I think your previous patches would allow to build it with gtk support, and unlike me, you seem to know what you are doing... ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-13 8:43 ` Andreas Enge @ 2016-02-13 14:09 ` Jan Nieuwenhuizen 2016-02-13 14:16 ` Andreas Enge 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-13 14:09 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel Andreas Enge writes: > Very good, I pushed the first two. Concerning the commit message, it should > read "gnu: ocaml: ..." in case a package is modified. Ah okay...and Yay, thanks! >> Subject: [PATCH 3/3] gnu: Add laby. >> * gnu/packages/patches/laby-make-install.patch: New file. >> * gnu/packages/patches/laby-make-png.patch: New file. >> * gnu-system.am (dist_patch_DATA): Add them. >> * gnu/packages/games.scm (laby): New variable. > > Here I would not use a patch. The policy is not totally clear (and not > written up), but if an additional phase for installation is needed, I > would do it in a custom phase on the scheme side instead of patching the > makefile. See, for instance, the tinyxml package in xml.scm. Yes, I see. Good to know, thanks. > Maybe it would also warrant an upstream bug report? Yes, I have sent the patches upstream. > Similarly for the make-png patch. Is this an upstream bug? I think it's a problem with Guix's ocaml or gtk not rendering svg images; so I wanted to first `see if png works' and then figure out what's going on...So this could be temporary, depending on the availability of svg rendering, not sure what to do here. So...please advise. Greetings, Jan > PS: The game starts and shows the maze, it looks quite nice! :-) Laby looks for programming languages installed and offer only those that are available. So while it does not depend on guile, gcc, ocaml etc..., those packages make it more functional. > PPS: You do not happen to use unison? I think your previous patches would > allow to build it with gtk support, and unlike me, you seem to know > what you are doing... No, I have used SparkleShare until it became obvious there won't be a headless version and I reverted to plain git. I'll have a look. Does it use git for a backend? -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-13 14:09 ` Jan Nieuwenhuizen @ 2016-02-13 14:16 ` Andreas Enge 2016-02-13 20:58 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-02-13 14:16 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel On Sat, Feb 13, 2016 at 03:09:59PM +0100, Jan Nieuwenhuizen wrote: > I think it's a problem with Guix's ocaml or gtk not rendering svg > images; so I wanted to first `see if png works' and then figure out > what's going on...So this could be temporary, depending on the > availability of svg rendering, not sure what to do here. > So...please advise. Since there is no terrible hurry, I would suggest to examine the svg rendering issue first; if you do not find a solution in reasonable time, we can still push the png patch. > > PPS: You do not happen to use unison? > No, I have used SparkleShare until it became obvious there won't be a > headless version and I reverted to plain git. I'll have a look. Does > it use git for a backend? No, it just synchronises and does not allow to roll back. On the other hand, it also works well with binary files (for instance, for synchronising films from one machine to another, I would not want them to take space forever in a git repository). It is essentially a two-way rsync. Andreas ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-13 14:16 ` Andreas Enge @ 2016-02-13 20:58 ` Jan Nieuwenhuizen 2016-03-06 19:27 ` Andreas Enge 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-13 20:58 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel Andreas Enge writes: > Since there is no terrible hurry, I would suggest to examine the svg rendering > issue first; if you do not find a solution in reasonable time, we can still > push the png patch. Sure. > No, it just synchronises and does not allow to roll back. On the other hand, > it also works well with binary files (for instance, for synchronising films > from one machine to another, I would not want them to take space forever > in a git repository). It is essentially a two-way rsync. I had a try...it needs a 2GB texlive download to build... I'm currently stuck at File "/tmp/nix-build-unison-2.48.3.drv-0/unison-2.48.3-checkout/src/uigtk.ml", line 67, characters 10-23: Error: Unbound module Gdk Makefile.OCaml:434: recipe for target 'uigtk.cmx' failed make[1]: *** [uigtk.cmx] Error 2 trying the patch below... Greetings, Jan $ git diff diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 4b5ac61..78e7ea2 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -565,6 +565,8 @@ libpanel, librsvg and quartz.") (build-system gnu-build-system) (outputs '("out" "doc")) ; 1.9 MiB of documentation + (inputs `(("gtk" ,gtk+-2) + ("lablgtk" ,lablgtk))) (native-inputs `(("ocaml" ,ocaml) ;; For documentation @@ -579,6 +581,7 @@ libpanel, librsvg and quartz.") #:tests? #f ; Tests require writing to $HOME. ; If some $HOME is provided, they fail with the message ; "Fatal error: Skipping some tests -- remove me!" + #:make-flags '("UISTYLE=gtk" "OCAMLOPT=ocamlopt.opt") #:phases (modify-phases %standard-phases (delete 'configure) 21:57:32 janneke@drakenvlieg:~/src/guix -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-13 20:58 ` Jan Nieuwenhuizen @ 2016-03-06 19:27 ` Andreas Enge 2016-03-06 22:01 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-03-06 19:27 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel Hi Jan, I am afraid that my digression on unison has made us forget laby. If I remember well, you had a package more or less ready? Could you maybe send the patch again? Andreas ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-03-06 19:27 ` Andreas Enge @ 2016-03-06 22:01 ` Jan Nieuwenhuizen 2016-08-10 15:10 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-03-06 22:01 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 762 bytes --] Andreas Enge writes: > I am afraid that my digression on unison has made us forget laby. If I > remember well, you had a package more or less ready? Could you maybe > send the patch again? Thanks for the ping. It was hanging on gdkpixbuf svg image loading. That does not work for me. I added a workaround patch to generate pngs. Then I looked into gtk+-2 and librsvg... I thought the svg loading problem in gtk+-2 was something that I introduced, but it turns out that no svg images load at all for me. (I ran guix's emacs and turned-on emacs's toolbar.) So, I am kind of stuck and am waiting for more insight into the svg problem. Meanwhile, find what works for me attached. I intend to get rid of the png patch again when svg works. Greetings, Jan [-- Attachment #2: 0001-gnu-Add-laby.patch --] [-- Type: text/x-diff, Size: 6431 bytes --] From 1ba0936f1bce648d13c0c7da40f545431aac2388 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Sun, 7 Feb 2016 12:57:40 +0100 Subject: [PATCH] gnu: Add laby. * gnu/packages/patches/laby-make-install.patch: New file. * gnu/packages/patches/laby-make-png.patch: New file. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/games.scm (laby): New variable. --- gnu-system.am | 2 ++ gnu/packages/games.scm | 45 ++++++++++++++++++++++++++++ gnu/packages/patches/laby-make-install.patch | 25 ++++++++++++++++ gnu/packages/patches/laby-make-png.patch | 27 +++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 gnu/packages/patches/laby-make-install.patch create mode 100644 gnu/packages/patches/laby-make-png.patch diff --git a/gnu-system.am b/gnu-system.am index fd9795e..f3b5504 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -541,6 +541,8 @@ dist_patch_DATA = \ gnu/packages/patches/jasper-CVE-2016-1867.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ + gnu/packages/patches/laby-make-png.patch \ + gnu/packages/patches/laby-make-install.patch \ gnu/packages/patches/ldc-disable-tests.patch \ gnu/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ gnu/packages/patches/liba52-enable-pic.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 7eb0e7a..aa74665 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,9 +57,11 @@ #:use-module (gnu packages libcanberra) #:use-module (gnu packages libunwind) #:use-module (gnu packages haskell) + #:use-module (gnu packages imagemagick) #:use-module (gnu packages mp3) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages xorg) @@ -1891,3 +1894,45 @@ and a game metadata scraper.") (description "The Emilia Pinball Project is a pinball simulator. There are only two levels to play with, but they are very addictive.") (license license:gpl2))) + +(define-public laby + (package + (name "laby") + (version "0.6.4") + (source + (origin (method url-fetch) + (uri (string-append + "https://github.com/sgimenez/laby/tarball/" + name "-" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "113ip48308ps3lsw427xswgx3wdanils43nyal9n4jr6bcx1bj2j")) + (patches (list (search-patch "laby-make-install.patch") + (search-patch "laby-make-png.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("imagemagick" ,imagemagick))) + (inputs + `(("lablgtk" ,lablgtk) + ("ocaml" ,ocaml) + ("ocaml-findlib" ,ocaml-findlib))) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + (add-before + 'build 'setenv + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((lablgtk (assoc-ref inputs "lablgtk"))) + (setenv "LD_LIBRARY_PATH" + (string-append lablgtk "/lib/ocaml/stublibs")))))) + #:tests? #f ; no 'check' target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "all" "png"))) + (home-page "https://sgimenez.github.io/laby/") + (synopsis "Programming game") + (description "Learn programming, playing with ants and spider webs ;-) +Your robot ant can be programmed in many languages: OCaml, Python, C, C++, +Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced +programmers may also add their own favorite language.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/laby-make-install.patch b/gnu/packages/patches/laby-make-install.patch new file mode 100644 index 0000000..3e956be --- /dev/null +++ b/gnu/packages/patches/laby-make-install.patch @@ -0,0 +1,25 @@ +From e9896b8951f9faf1f76a3b45be6e70d0aeb30a73 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 15 Nov 2014 17:48:18 +0100 +Subject: [PATCH] Add make install. + +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index ca18c1e..65af31b 100644 +--- a/Makefile 2016-02-09 21:34:01.883660009 +0100 ++++ b/Makefile 2016-02-09 21:34:30.672150679 +0100 +@@ -19,3 +19,11 @@ + @git archive --prefix="$(PROJECT_ARCHIVE)/" HEAD \ + | gzip >_dist/"$(PROJECT_ARCHIVE)".tar.gz + @echo archive stored in "_dist/$(PROJECT_ARCHIVE).tar.gz" ++ ++PREFIX=/usr/local ++install: ++ strip laby ++ mkdir -p $(PREFIX)/bin ++ cp laby $(PREFIX)/bin/laby ++ mkdir -p $(PREFIX)/share/laby ++ tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- diff --git a/gnu/packages/patches/laby-make-png.patch b/gnu/packages/patches/laby-make-png.patch new file mode 100644 index 0000000..6851e4a --- /dev/null +++ b/gnu/packages/patches/laby-make-png.patch @@ -0,0 +1,27 @@ +From 6d3c05e25f2b5f231abf5bb4af4bc0b06455b0e4 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Thu, 11 Feb 2016 18:30:19 +0100 +Subject: [PATCH] Add make png. + +--- + Makefile | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Makefile b/Makefile +index 5d9d733..f54d09b 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,3 +27,10 @@ install: + cp laby $(PREFIX)/bin/laby + mkdir -p $(PREFIX)/share/laby + tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- ++ ++SVG:=$(wildcard data/tiles/*.svg) ++PNG:=$(SVG:%.svg=%.png) ++png: $(PNG) ++ ++%.png: %.svg ++ convert $^ $@ +-- +2.1.4 + -- 2.6.3 [-- Attachment #3: Type: text/plain, Size: 154 bytes --] -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-03-06 22:01 ` Jan Nieuwenhuizen @ 2016-08-10 15:10 ` Jan Nieuwenhuizen 2016-08-11 11:50 ` 宋文武 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-08-10 15:10 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 508 bytes --] Jan Nieuwenhuizen writes: Hi! > I thought the svg loading problem in gtk+-2 was something that I > introduced, but it turns out that no svg images load at all for > me. (I ran guix's emacs and turned-on emacs's toolbar.) > > So, I am kind of stuck and am waiting for more insight into the svg > problem. Meanwhile, find what works for me attached. I intend to > get rid of the png patch again when svg works. Gtk now has librsvg working, so Laby works without the ugly png patch hack. Greetings, Jan [-- Attachment #2: 0001-gnu-Add-laby.patch --] [-- Type: text/x-patch, Size: 4901 bytes --] From dcf2cde075cf59481ebfc98db18c6ca709bf5519 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Sun, 7 Feb 2016 12:57:40 +0100 Subject: [PATCH] gnu: Add laby. * gnu/packages/patches/laby-make-install.patch: New file. * gnu/local.mk (dist_patch_DATA): gnu-system.am: Add it. * gnu/packages/games.scm (laby): New variable. --- gnu/local.mk | 1 + gnu/packages/games.scm | 42 ++++++++++++++++++++++++++++ gnu/packages/patches/laby-make-install.patch | 25 +++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 gnu/packages/patches/laby-make-install.patch diff --git a/gnu/local.mk b/gnu/local.mk index c7311a4..9e4af67 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -597,6 +597,7 @@ dist_patch_DATA = \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/khmer-use-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ + %D%/packages/patches/laby-make-install.patch \ %D%/packages/patches/ldc-disable-tests.patch \ %D%/packages/patches/lftp-dont-save-unknown-host-fingerprint.patch \ %D%/packages/patches/liba52-enable-pic.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e467dbe..e243f42 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -22,6 +22,7 @@ ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il" +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -74,6 +75,7 @@ #:use-module (gnu packages image) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages xorg) @@ -2731,3 +2733,43 @@ in a style similar to the original Super Mario games covered under the GNU GPL.") (home-page "https://supertuxproject.org/") (license license:gpl3+))) + +(define-public laby + (package + (name "laby") + (version "0.6.4") + (source + (origin (method url-fetch) + (uri (string-append + "https://github.com/sgimenez/laby/tarball/" + name "-" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "113ip48308ps3lsw427xswgx3wdanils43nyal9n4jr6bcx1bj2j")) + (patches (search-patches "laby-make-install.patch")))) + (build-system gnu-build-system) + (inputs + `(("lablgtk" ,lablgtk) + ("ocaml" ,ocaml) + ("ocaml-findlib" ,ocaml-findlib))) + (arguments + '(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before + 'build 'setenv + (lambda* (#:key inputs #:allow-other-keys) + (let ((lablgtk (assoc-ref inputs "lablgtk"))) + (setenv "LD_LIBRARY_PATH" + (string-append lablgtk "/lib/ocaml/stublibs")))))) + #:tests? #f ; no 'check' target + #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "all"))) + (home-page "https://sgimenez.github.io/laby/") + (synopsis "Programming game") + (description "Learn programming, playing with ants and spider webs ;-) +Your robot ant can be programmed in many languages: OCaml, Python, C, C++, +Java, Ruby, Lua, JavaScript, Pascal, Perl, Scheme, Vala, Prolog. Experienced +programmers may also add their own favorite language.") + (license license:gpl3+))) diff --git a/gnu/packages/patches/laby-make-install.patch b/gnu/packages/patches/laby-make-install.patch new file mode 100644 index 0000000..3e956be --- /dev/null +++ b/gnu/packages/patches/laby-make-install.patch @@ -0,0 +1,25 @@ +From e9896b8951f9faf1f76a3b45be6e70d0aeb30a73 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Sat, 15 Nov 2014 17:48:18 +0100 +Subject: [PATCH] Add make install. + +--- + Makefile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/Makefile b/Makefile +index ca18c1e..65af31b 100644 +--- a/Makefile 2016-02-09 21:34:01.883660009 +0100 ++++ b/Makefile 2016-02-09 21:34:30.672150679 +0100 +@@ -19,3 +19,11 @@ + @git archive --prefix="$(PROJECT_ARCHIVE)/" HEAD \ + | gzip >_dist/"$(PROJECT_ARCHIVE)".tar.gz + @echo archive stored in "_dist/$(PROJECT_ARCHIVE).tar.gz" ++ ++PREFIX=/usr/local ++install: ++ strip laby ++ mkdir -p $(PREFIX)/bin ++ cp laby $(PREFIX)/bin/laby ++ mkdir -p $(PREFIX)/share/laby ++ tar -C data -cf - . | tar -C $(PREFIX)/share/laby -xf- -- 2.9.2 [-- Attachment #3: Type: text/plain, Size: 154 bytes --] -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-08-10 15:10 ` Jan Nieuwenhuizen @ 2016-08-11 11:50 ` 宋文武 0 siblings, 0 replies; 20+ messages in thread From: 宋文武 @ 2016-08-11 11:50 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel Jan Nieuwenhuizen <janneke@gnu.org> writes: > [...] > > Gtk now has librsvg working, so Laby works without the ugly png patch > hack. > > From dcf2cde075cf59481ebfc98db18c6ca709bf5519 Mon Sep 17 00:00:00 2001 > From: Jan Nieuwenhuizen <janneke@gnu.org> > Date: Sun, 7 Feb 2016 12:57:40 +0100 > Subject: [PATCH] gnu: Add laby. Cool, applied, thanks! ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-11 22:21 ` Jan Nieuwenhuizen 2016-02-12 18:09 ` Andreas Enge @ 2016-02-12 18:13 ` Andreas Enge 2016-02-12 20:43 ` Jan Nieuwenhuizen 2016-02-12 18:17 ` Andreas Enge 2 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-02-12 18:13 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel Hello again, I notice that this: > Subject: [PATCH 2/3] gnu: Add ocaml-findlib. is independent, so I also had a look. In fact, it contains the copyright line, so that is already settled! At the top of the patch file, could you add a quick explanation where it comes from and what it is needed for? Is it Guix specific, or an upstream bug? If the latter, does it come from upstream? Otherwise, could you maybe file a bug also upstream? It looks like you are on the best way to becoming the Guix Ocaml specialist! Thanks, Andreas ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-12 18:13 ` Andreas Enge @ 2016-02-12 20:43 ` Jan Nieuwenhuizen 2016-02-13 8:20 ` Andreas Enge 0 siblings, 1 reply; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-12 20:43 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 454 bytes --] Andreas Enge writes: > At the top of the patch file, could you add a quick explanation where it comes > from and what it is needed for? Is it Guix specific, or an upstream > bug? Ah yes it is inpired by the Nix package, it is store-specific. Ocaml wants its "core" libraries all in the same prefix, store won't allow that. When I hit this, I wondered if we have a way to import/convert packages and or what Guix's policy is on that. Greetings, Jan [-- Attachment #2: 0001-gnu-Add-ocaml-findlib.patch --] [-- Type: text/x-diff, Size: 6144 bytes --] From 3a1afac94d0c25556af7a17c6dbb2dde44948831 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen <janneke@gnu.org> Date: Thu, 11 Feb 2016 18:53:07 +0100 Subject: [PATCH] gnu: Add ocaml-findlib. * gnu/packages/ocaml.scm (ocaml-findlib): New variable. * gnu/packages/patches/ocaml-findlib-make-install.patch: New file. * gnu-system.am (dist_patch_DATA): Register it. --- gnu-system.am | 1 + gnu/packages/ocaml.scm | 51 ++++++++++++++++++++++ .../patches/ocaml-findlib-make-install.patch | 20 +++++++++ 3 files changed, 72 insertions(+) create mode 100644 gnu/packages/patches/ocaml-findlib-make-install.patch diff --git a/gnu-system.am b/gnu-system.am index 3b5f241..0cd2ca3 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -624,6 +624,7 @@ dist_patch_DATA = \ gnu/packages/patches/nvi-assume-preserve-path.patch \ gnu/packages/patches/nvi-dbpagesize-binpower.patch \ gnu/packages/patches/nvi-db4.patch \ + gnu/packages/patches/ocaml-findlib-make-install.patch \ gnu/packages/patches/openexr-missing-samples.patch \ gnu/packages/patches/openimageio-boost-1.60.patch \ gnu/packages/patches/openjpeg-CVE-2015-6581.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 434b9d8..759fdad 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com> ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -42,6 +43,7 @@ #:use-module (gnu packages lynx) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages m4) #:use-module (gnu packages ncurses) #:use-module (gnu packages version-control) #:use-module (gnu packages curl)) @@ -619,3 +621,52 @@ a collection of files and directories to be stored on different hosts brought up to date by propagating the changes in each replica to the other.") (license gpl3+))) + +(define-public ocaml-findlib + (package + (name "ocaml-findlib") + (version "1.6.1") + (source (origin + (method url-fetch) + (uri (string-append "http://download.camlcity.org/download/" + "findlib" "-" version ".tar.gz")) + (sha256 + (base32 + "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721")) + (patches + (list (search-patch "ocaml-findlib-make-install.patch"))))) + (build-system gnu-build-system) + (inputs + `(("camlp4" ,camlp4) + ("m4" ,m4) + ("ocaml" ,ocaml))) + (arguments + `(#:tests? #f ; no test suite + #:parallel-build? #f + #:make-flags (list "all" "opt") + #:phases (modify-phases %standard-phases + (replace + 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (system* + "./configure" + "-bindir" (string-append out "/bin") + "-config" (string-append out "/etc/ocamfind.conf") + "-mandir" (string-append out "/share/man") + "-sitelib" (string-append out "/lib/ocaml/site-lib") + "-with-toolbox"))))))) + (home-page "http://projects.camlcity.org/projects/findlib.html") + (synopsis "Management tool for OCaml libraries") + (description + "The \"findlib\" library provides a scheme to manage reusable software +components (packages), and includes tools that support this scheme. Packages +are collections of OCaml modules for which metainformation can be stored. The +packages are kept in the filesystem hierarchy, but with strict directory +structure. The library contains functions to look the directory up that +stores a package, to query metainformation about a package, and to retrieve +dependency information about multiple packages. There is also a tool that +allows the user to enter queries on the command-line. In order to simplify +compilation and linkage, there are new frontends of the various OCaml +compilers that can directly deal with packages.") + (license x11))) diff --git a/gnu/packages/patches/ocaml-findlib-make-install.patch b/gnu/packages/patches/ocaml-findlib-make-install.patch new file mode 100644 index 0000000..238f9ca --- /dev/null +++ b/gnu/packages/patches/ocaml-findlib-make-install.patch @@ -0,0 +1,20 @@ +Ocaml wants to install its "core" libraries in OCAML_CORE_STDLIB. That +does not work in a store-based distribution. + +A solution was already provided by Nix + + https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/ocaml/findlib/install_topfind.patch + +regenerated for Guix. + +--- findlib-1.5.3/src/findlib/Makefile 2014-09-16 13:21:46.000000000 +0200 ++++ findlib-1.5.3/src/findlib/Makefile.new 2014-10-01 14:30:54.141082521 +0200 +@@ -89,7 +89,7 @@ + install: all + mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" + mkdir -p "$(prefix)$(OCAMLFIND_BIN)" +- test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" ++ test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_SITELIB)" + files=`$(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib.cmxa findlib.a findlib.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ + cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" + f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ -- 2.1.4 [-- Attachment #3: Type: text/plain, Size: 151 bytes --] -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-12 20:43 ` Jan Nieuwenhuizen @ 2016-02-13 8:20 ` Andreas Enge 2016-02-13 13:08 ` Jan Nieuwenhuizen 0 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-02-13 8:20 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel On Fri, Feb 12, 2016 at 09:43:47PM +0100, Jan Nieuwenhuizen wrote: > Ah yes it is inpired by the Nix package, it is store-specific. Ocaml > wants its "core" libraries all in the same prefix, store won't allow > that. Okay. > When I hit this, I wondered if we have a way to import/convert packages > and or what Guix's policy is on that. There is a "guix import nix" command; I do not think it will go so far as to also take care of patches, but it will create a template for a scheme object from nixpkgs. "git am" complained about whitespace issues with tabs, but I suppose these are okay in make files :-) > + (inputs > + `(("camlp4" ,camlp4) > + ("m4" ,m4) > + ("ocaml" ,ocaml))) I think all of these should be native-inputs; the first two are not referenced in the result ("guix gc --references /gnu/store/..."), and ocaml is definitely needed during compile time. I moved them and pushed the patch. Thank you very much for your patience! Andreas ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-13 8:20 ` Andreas Enge @ 2016-02-13 13:08 ` Jan Nieuwenhuizen 0 siblings, 0 replies; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-13 13:08 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel Andreas Enge writes: > "git am" complained about whitespace issues with tabs, but I suppose these > are okay in make files :-) :-) >> + (inputs >> + `(("camlp4" ,camlp4) >> + ("m4" ,m4) >> + ("ocaml" ,ocaml))) > > I think all of these should be native-inputs; the first two are not referenced > in the result ("guix gc --references /gnu/store/..."), and ocaml is definitely > needed during compile time. I moved them and pushed the patch. Thanks! guix gc --reference is useful next to lint. Greetings, Jan -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-11 22:21 ` Jan Nieuwenhuizen 2016-02-12 18:09 ` Andreas Enge 2016-02-12 18:13 ` Andreas Enge @ 2016-02-12 18:17 ` Andreas Enge 2016-02-12 18:30 ` Jan Nieuwenhuizen 2 siblings, 1 reply; 20+ messages in thread From: Andreas Enge @ 2016-02-12 18:17 UTC (permalink / raw) To: Jan Nieuwenhuizen; +Cc: guix-devel On Thu, Feb 11, 2016 at 11:21:30PM +0100, Jan Nieuwenhuizen wrote: > + #:phases (modify-phases %standard-phases > + (replace > + 'configure > + (lambda* (#:key inputs outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + (system* > + "./configure" > + "-bindir" (string-append out "/bin") > + "-config" (string-append out "/etc/ocamfind.conf") > + "-mandir" (string-append out "/share/man") > + "-sitelib" (string-append out "/lib/ocaml/site-lib") > + "-with-toolbox"))))))) Ah, one more thing: This could potentially be a list of configure flags, see for instance font-adobe100dpi. These are added to our standard configure flags. Some build systems choke on "--enable-fast-install" and need an explicit call to "./configure" then. If this is the case, please add a comment such as ;; do not pass "--enable-fast-install", which makes the ;; configure process fail Thanks, Andreas ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] gnu: Add laby. 2016-02-12 18:17 ` Andreas Enge @ 2016-02-12 18:30 ` Jan Nieuwenhuizen 0 siblings, 0 replies; 20+ messages in thread From: Jan Nieuwenhuizen @ 2016-02-12 18:30 UTC (permalink / raw) To: Andreas Enge; +Cc: guix-devel Andreas Enge writes: >> + (system* >> + "./configure" >> + "-bindir" (string-append out "/bin") >> + "-config" (string-append out "/etc/ocamfind.conf") >> + "-mandir" (string-append out "/share/man") >> + "-sitelib" (string-append out "/lib/ocaml/site-lib") >> + "-with-toolbox"))))))) > > Ah, one more thing: This could potentially be a list of configure flags, > see for instance font-adobe100dpi. These are added to our standard configure > flags. Some build systems choke on "--enable-fast-install" and need an > explicit call to "./configure" then. If this is the case, please add a > comment such as > ;; do not pass "--enable-fast-install", which makes the > ;; configure process fail This is a custom configure. It takes single-dashed flags and it chokes on all standard flags as well as on CONFIG_SHELL et al. I would be happy to use something like #:configure-flags but I could use help because I do not see how to do that. Greetings, Jan -- Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.nl ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2016-08-11 11:50 UTC | newest] Thread overview: 20+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-09 20:27 [PATCH] gnu: Add laby Jan Nieuwenhuizen 2016-02-09 22:28 ` Christopher Allan Webber 2016-02-11 20:18 ` Efraim Flashner 2016-02-11 22:21 ` Jan Nieuwenhuizen 2016-02-12 18:09 ` Andreas Enge 2016-02-13 8:11 ` Jan Nieuwenhuizen 2016-02-13 8:43 ` Andreas Enge 2016-02-13 14:09 ` Jan Nieuwenhuizen 2016-02-13 14:16 ` Andreas Enge 2016-02-13 20:58 ` Jan Nieuwenhuizen 2016-03-06 19:27 ` Andreas Enge 2016-03-06 22:01 ` Jan Nieuwenhuizen 2016-08-10 15:10 ` Jan Nieuwenhuizen 2016-08-11 11:50 ` 宋文武 2016-02-12 18:13 ` Andreas Enge 2016-02-12 20:43 ` Jan Nieuwenhuizen 2016-02-13 8:20 ` Andreas Enge 2016-02-13 13:08 ` Jan Nieuwenhuizen 2016-02-12 18:17 ` Andreas Enge 2016-02-12 18:30 ` Jan Nieuwenhuizen
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.