[PATCH] gnu: Add python-tcod.

2022-12-24 Thread Adam Kandur
* gnu/packages/game-development.scm (python-tcod): New variable.
---
 gnu/packages/game-development.scm | 47 +++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/game-development.scm 
b/gnu/packages/game-development.scm
index 8fec474d0b..2746c43a5f 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -64,6 +64,7 @@ (define-module (gnu packages game-development)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages build-tools)
+  #:use-module (gnu packages c)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages check)
   #:use-module (gnu packages curl)
@@ -86,6 +87,7 @@ (define-module (gnu packages game-development)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages lua)
   #:use-module (gnu packages m4)
@@ -97,6 +99,7 @@ (define-module (gnu packages game-development)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
@@ -2604,6 +2607,50 @@ (define-public libtcod
 utilities frequently used in roguelikes.")
 (license license:bsd-3)))
 
+(define-public python-tcod
+  ;; named branch is outdated
+  (let ((commit "d3419a5b4593c7df1580427fc07616d798c85856")
+(revision "1"))
+(package
+  (name "python-tcod")
+  (version "13.9.1")
+  (source
+   (origin
+ (method git-fetch)
+ (uri (git-reference
+   (url "https://github.com/libtcod/python-tcod;)
+   (commit commit)
+   (recursive? #true)))
+ (file-name (git-file-name name version))
+ (sha256
+  (base32
+   "1b0ligrswvz307bbx5jp8wnnqz52v5s4gcgakxy4i3jvccalm2if"
+  (build-system python-build-system)
+  ;; tests fail for a strange reason
+  ;; "ERROR docs/conf.py - FileNotFoundError",
+  ;; but this file is in the checkout
+  (arguments
+   '(#:tests? #f))
+  (native-inputs
+   (list sdl2
+ python-pcpp
+ python-pycparser
+ python-requests
+ python-pytest-runner
+ python-pytest-benchmark
+ python-pytest-cov))
+  (propagated-inputs
+   (list python-numpy
+ python-typing-extensions
+ python-cffi))
+  (home-page "https://github.com/libtcod/python-tcod;)
+  (synopsis
+   "This library is a Python cffi port of libtcod")
+  (description
+   "A high-performance Python port of libtcod.
+Includes the libtcodpy module for backwards compatibility with older 
projects.")
+  (license license:bsd-2
+
 (define-public warsow-qfusion
   ;; As of 2020-04-09, the latest stable version 2.1.0 is deprecated.
   ;; The 2.5 beta as published on the homepage is commit
-- 
2.38.1




Example Nginx config from Guix manual does not work

2022-12-24 Thread Adam Kandur

Hi guix!(service nginx-service-type    (nginx-configuration   
  (server-blocks  (list (nginx-server-configuration   
  (server-name '("www.example.com")) (root 
"/srv/http/www.example.com")) produce this nginx configuser nginx nginx;pid 
/var/run/nginx/pid;error_log /var/log/nginx/error.log info;events { }http {    client_body_temp_path 
/var/run/nginx/client_body_temp;    proxy_temp_path /var/run/nginx/proxy_temp;    fastcgi_temp_path 
/var/run/nginx/fastcgi_temp;    uwsgi_temp_path /var/run/nginx/uwsgi_temp;    scgi_temp_path 
/var/run/nginx/scgi_temp;    access_log /var/log/nginx/access.log;    include 
/gnu/store/dngffa0df8zsxlbi630656688zhly6p5-nginx-1.23.2/share/nginx/conf/mime.types;    server {  listen 
80;  listen 443 ssl;  server_name www.example.com ;  root /srv/http/www.example.com;  index 
index.html ;  server_tokens off;    }}Which will not work because it asks to listen on 443 with ssl, 
which is not possible because no certificates are provided. Removing the line "listen 443 ssl;" 
solves this problem.

trying to write my own herd service

2022-11-04 Thread Adam Kandur
Hi guix!
I tried to write my own herd service, that's what i did
```
(define (my-daemon-shepherd-service _)
  (list (shepherd-service
 (documentation "")
 (provision '(go-github-com-KefirTheAutomator-daemon))
 (requirement '(networking))
 (start #~(make-forkexec-constructor
   (list
(string-append
#$go-github-com-KefirTheAutomator-daemon "/bin/daemon")
" -pidFile=/var/run/my-daemon.pid"
" -logFile=/var/log/my-daemon.log")))
 (stop #~(make-kill-destructor)

(define my-daemon-service-type
  (service-type (name 'my-daemon)
(extensions
 (list (service-extension shepherd-root-service-type
  my-daemon-shepherd-service)))
(default-value #f)
(description "")))
```
(go-github-com-KefirTheAutomator-daemon is my dummy daemon that just
creates a process and writes to it's log file).

This was pulled from my channel, but when I am trying to start the
services, it turns of and disables
```
user@workstation ~$ sudo herd status go-github-com-KefirTheAutomator-daemon
Status of go-github-com-KefirTheAutomator-daemon:
  It is stopped.
  It is disabled.
  Provides (go-github-com-KefirTheAutomator-daemon).
  Requires (networking).
  Conflicts with ().
  Will be respawned.
  Last respawned on Sat Nov 05 02:14:33+0300 2022.

```

Can anyone help me to find out what is wrong, I didn't find any
recommendations on writing herd services?