Re: [PATCH] gnu: Add php-hello-world.

2017-01-04 Thread Ludovic Courtès
Hi Hartmut,

Hartmut Goebel  skribis:

> Am 31.12.2016 um 12:16 schrieb Ludovic Courtès:
>> after all.  However, as a distro, I think we should refrain from
>> providing packages unrelated to Guix/Guile that have no upstream.
>
> So this package will not happen, since *I* will not spend my time to
> create such a project. As a consequences, there will be not "php-fpm" OS
> example.

Now I just realize you posted php-fpm for review on Dec. 8 and nobody
replied.  Please feel entitled to ping people if you don’t get feedback
after a week or so.  Otherwise, without bad faith from anyone, it just
falls into the cracks.

Clearly I had no idea there was a connection between the “php-fpm”
service and php-hello-world.

> I already spent quite some time on this topic, so this is quite
> disencouraging. :-(

Please don’t be discouraged.  I (and others) spend this amount of time
on a dozen of topics in parallel, as you might have seen from the
mailing list.

Cheers,
Ludo’.



Re: [PATCH] gnu: Add php-hello-world.

2016-12-31 Thread Hartmut Goebel
Am 31.12.2016 um 12:16 schrieb Ludovic Courtès:
> after all.  However, as a distro, I think we should refrain from
> providing packages unrelated to Guix/Guile that have no upstream.

So this package will not happen, since *I* will not spend my time to
create such a project. As a consequences, there will be not "php-fpm" OS
example.

I already spent quite some time on this topic, so this is quite
disencouraging. :-(

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH] gnu: Add php-hello-world.

2016-12-31 Thread Ludovic Courtès
Hello,

Hartmut Goebel  skribis:

> Am 29.12.2016 um 18:44 schrieb Ludovic Courtès:
>> Given the popularity of PHP, I would expect tutorials and examples to
>> abound already, no?
>>
>> You can of course roll your own and Guix could distribute it, that’s
>> fine.  I’m just surprised we even have to do that in the first place.
>
> I was surprised, too. Otherwise I'd not write a own package.
>
> But I see no benefit of putting a project to github, just do not have a
> "home grown" package at guix. IMHO implementing this is just a waste of
> time.

I can understand why you’d feel this way, it’s just a few lines of code
after all.  However, as a distro, I think we should refrain from
providing packages unrelated to Guix/Guile that have no upstream.

Ludo’.



Re: [PATCH] gnu: Add php-hello-world.

2016-12-29 Thread Hartmut Goebel
Am 29.12.2016 um 18:44 schrieb Ludovic Courtès:
> Given the popularity of PHP, I would expect tutorials and examples to
> abound already, no?
>
> You can of course roll your own and Guix could distribute it, that’s
> fine.  I’m just surprised we even have to do that in the first place.

I was surprised, too. Otherwise I'd not write a own package.

But I see no benefit of putting a project to github, just do not have a
"home grown" package at guix. IMHO implementing this is just a waste of
time.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH] gnu: Add php-hello-world.

2016-12-29 Thread Ludovic Courtès
Hi Hartmut!

Hartmut Goebel  skribis:

> Am 21.12.2016 um 17:38 schrieb Ludovic Courtès:
>> For other tools we provide what upstream provides.  For example, Qt
>> comes with examples, which we provide in the ‘qt’ package (IIRC).
>
> The php source package does not provide any example. I also searched the
> internet for some hello-world-package, but did not find one.
>
> If you know of one, feel free to replace this one.
>
> If you dislike "home-made" packages so much, I can set up a
> "php-hello-world" project at github. But what should be the benefit?

Given the popularity of PHP, I would expect tutorials and examples to
abound already, no?

You can of course roll your own and Guix could distribute it, that’s
fine.  I’m just surprised we even have to do that in the first place.

Thoughts?

Ludo’.



Re: [PATCH] gnu: Add php-hello-world.

2016-12-22 Thread Hartmut Goebel
Am 21.12.2016 um 17:38 schrieb Ludovic Courtès:
> For other tools we provide what upstream provides.  For example, Qt
> comes with examples, which we provide in the ‘qt’ package (IIRC).

The php source package does not provide any example. I also searched the
internet for some hello-world-package, but did not find one.

If you know of one, feel free to replace this one.

If you dislike "home-made" packages so much, I can set up a
"php-hello-world" project at github. But what should be the benefit?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: [PATCH] gnu: Add php-hello-world.

2016-12-21 Thread Ludovic Courtès
Hi Hartmut!

Hartmut Goebel  skribis:

> Am 08.12.2016 um 18:45 schrieb Hartmut Goebel:
>> * gnu/packages/php.scm (php-hello-world): New variable.
>
> This is useful for testing setups and providing examples.

I agree… but does it belong in a home-made package?

For other tools we provide what upstream provides.  For example, Qt
comes with examples, which we provide in the ‘qt’ package (IIRC).

I think it would be best to stick to that policy.  WDYT?

Thanks,
Ludo’.



Re: [PATCH] gnu: Add php-hello-world.

2016-12-08 Thread Hartmut Goebel
Am 08.12.2016 um 18:45 schrieb Hartmut Goebel:
> * gnu/packages/php.scm (php-hello-world): New variable.

This is useful for testing setups and providing examples.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




[PATCH] gnu: Add php-hello-world.

2016-12-08 Thread Hartmut Goebel
* gnu/packages/php.scm (php-hello-world): New variable.
---
 gnu/packages/php.scm | 37 +
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm
index 9ccbede..f860f88 100644
--- a/gnu/packages/php.scm
+++ b/gnu/packages/php.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Julien Lepiller 
 ;;; Copyright © 2016 Marius Bakke 
+;;; Copyright © 2016 Hartmut Goebel 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -48,6 +49,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:use-module ((guix licenses) #:prefix license:))
 
 ;; This fixes PHP bugs 73155 and 73159. Remove when gd
@@ -332,3 +334,38 @@ systems, web content management systems and web 
frameworks." )
   license:lgpl2.1+  ; 
ext/bcmath/libbcmath
   license:bsd-2 ; 
ext/fileinfo/libmagic
   license:expat ; ext/date/lib
+
+(define-public php-hello-world
+  (package
+(name "php-hello-world")
+(version "0.1")
+(source #f)
+(build-system trivial-build-system)
+(arguments
+ `(#:modules ((guix build utils))
+   #:builder
+   (begin
+ (use-modules (guix build utils))
+ (let* ((out   (assoc-ref %outputs "out"))
+(php   (assoc-ref %build-inputs "php"))
+(index.php (string-append out "/index.php")))
+   (mkdir-p out)
+   (call-with-output-file index.php
+ (lambda (p)
+   (format p "
+ PHP test page: Hello, Guix!
+ 
+ Hello, Guix!'; ?>
+ Today is: 
+ 
+~%")))
+   (chmod index.php #o555)
+(inputs
+ `(("php" ,php)))
+(synopsis "Hello, PHP world: An example PHP package")
+(description
+ "PHP Hello World creates a simple HTML page saying \"Hello, Guix!\" and
+the current date.  It serves as an example to be used in Guix PHP packages or
+services.")
+(home-page "http://php.net/manual/en/tutorial.firstpage.php";)
+(license license:gpl3+)))
-- 
2.7.4