[PATCH] gnu: Add fortune-mod.

  • Done
  • quality assurance status badge
Details
3 participants
  • Pierre Neidhardt
  • Leo Famulari
  • Ludovic Courtès
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 9 Apr 2018 19:32
(address . guix-patches@gnu.org)
20180409173217.7629-1-ambrevar@gmail.com
* gnu/packages/games.scm (fortune-mod): New variable.
---
gnu/packages/games.scm | 35 +++
gnu/packages/patches/fortune-mod-cmake.patch | 424 +++++++++++++++++++++++++++
2 files changed, 459 insertions(+)
create mode 100644 gnu/packages/patches/fortune-mod-cmake.patch

Toggle diff (475 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5207e08d6..e0e48e8f4 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -4851,3 +4851,38 @@ Strife, Chex Quest, and fan-created games like Harmony, Hacx and Freedoom.")
(license:non-copyleft ; modified dumb
"file://dumb/licence.txt"
"Dumb license, explicitly GPL compatible.")))))
+
+(define-public fortune-mod
+ (package
+ (name "fortune-mod")
+ (version "2.4.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/shlomif/fortune-mod/"
+ "archive/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hnqpkassh7fwg2jgvybr8mw7vzfikbrhb5r22367ilfwxnl9yd2"))
+ (patches (search-patches "fortune-mod-cmake.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f ; TODO: The tests require File::Find::Object Perl module, Test::Differences and Test::RunValgrind (CPAN).
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build-env
+ (lambda* (#:key outputs #:allow-other-keys)
+ (chdir "fortune-mod")))
+ (add-after 'install 'fix-install-directory
+ ;; Move binary from "games/" to "bin/".
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (rename-file (string-append out "/games/fortune")
+ (string-append out "/bin/fortune"))
+ #t))))))
+ (inputs `(("recode" ,recode)))
+ (native-inputs `(("perl" ,perl)))
+ (home-page "http://www.shlomifish.org/open-source/projects/fortune-mod/")
+ (synopsis "The Fortune Cookie program from BSD games")
+ (description "Fortune is a command-line utility which displays a random
+quotation from a collection of quotes.")
+ (license license:gpl2+)))
diff --git a/gnu/packages/patches/fortune-mod-cmake.patch b/gnu/packages/patches/fortune-mod-cmake.patch
new file mode 100644
index 000000000..98439f743
--- /dev/null
+++ b/gnu/packages/patches/fortune-mod-cmake.patch
@@ -0,0 +1,424 @@
+Include missing fortune-mod/cmake/Shlomif_Common.cmake
+
+--- /dev/null
++++ b/fortune-mod/cmake/Shlomif_Common.cmake
+@@ -0,0 +1,417 @@
++# Copyright (c) 2012 Shlomi Fish
++#
++# Permission is hereby granted, free of charge, to any person
++# obtaining a copy of this software and associated documentation
++# files (the "Software"), to deal in the Software without
++# restriction, including without limitation the rights to use,
++# copy, modify, merge, publish, distribute, sublicense, and/or sell
++# copies of the Software, and to permit persons to whom the
++# Software is furnished to do so, subject to the following
++# conditions:
++#
++# The above copyright notice and this permission notice shall be
++# included in all copies or substantial portions of the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++# OTHER DEALINGS IN THE SOFTWARE.
++#
++#
++# (This copyright notice applies only to this file)
++
++include(CheckIncludeFile)
++include(CheckIncludeFiles)
++include(CheckFunctionExists)
++include(CheckCCompilerFlag)
++include(FindPerl)
++IF (NOT PERL_FOUND)
++ MESSAGE ( FATAL_ERROR "perl must be installed")
++ENDIF()
++
++# Taken from http://www.cmake.org/pipermail/cmake/2007-March/013060.html
++MACRO(REPLACE_FUNCTIONS sources)
++ FOREACH(name ${ARGN})
++ STRING(TOUPPER have_${name} SYMBOL_NAME)
++ CHECK_FUNCTION_EXISTS(${name} ${SYMBOL_NAME})
++ IF(NOT ${SYMBOL_NAME})
++ SET(${sources} ${${sources}} ${name}.c)
++ ENDIF()
++ ENDFOREACH()
++ENDMACRO()
++
++MACRO(CHECK_MULTI_INCLUDE_FILES)
++ FOREACH(name ${ARGN})
++ STRING(TOUPPER have_${name} SYMBOL_NAME)
++ STRING(REGEX REPLACE "\\." "_" SYMBOL_NAME ${SYMBOL_NAME})
++ STRING(REGEX REPLACE "/" "_" SYMBOL_NAME ${SYMBOL_NAME})
++ CHECK_INCLUDE_FILE(${name} ${SYMBOL_NAME})
++ ENDFOREACH()
++ENDMACRO()
++
++MACRO(CHECK_MULTI_FUNCTIONS_EXISTS)
++ FOREACH(name ${ARGN})
++ STRING(TOUPPER have_${name} SYMBOL_NAME)
++ CHECK_FUNCTION_EXISTS(${name} ${SYMBOL_NAME})
++ ENDFOREACH()
++ENDMACRO()
++
++MACRO(PREPROCESS_PATH_PERL_WITH_FULL_NAMES TARGET_NAME SOURCE DEST)
++ ADD_CUSTOM_COMMAND(
++ OUTPUT "${DEST}"
++ COMMAND "${PERL_EXECUTABLE}"
++ ARGS "${CMAKE_SOURCE_DIR}/cmake/preprocess-path-perl.pl"
++ "--input" "${SOURCE}"
++ "--output" "${DEST}"
++ "--subst" "WML_VERSION=${VERSION}"
++ "--subst" "WML_CONFIG_ARGS="
++ "--subst" "perlprog=${PERL_EXECUTABLE}"
++ "--subst" "perlvers=${PERL_EXECUTABLE}"
++ "--subst" "built_system=${CMAKE_SYSTEM_NAME}"
++ "--subst" "built_user=${username}"
++ "--subst" "built_date=${date}"
++ "--subst" "prefix=${CMAKE_INSTALL_PREFIX}"
++ "--subst" "bindir=${CMAKE_INSTALL_PREFIX}/bin"
++ "--subst" "libdir=${CMAKE_INSTALL_PREFIX}/${WML_LIB_DIR}"
++ "--subst" "mandir=${CMAKE_INSTALL_PREFIX}/share/man"
++ "--subst" "PATH_PERL=${PERL_EXECUTABLE}"
++ "--subst" "INSTALLPRIVLIB=${CMAKE_INSTALL_PREFIX}/${WML_LIB_DIR}"
++ "--subst" "INSTALLARCHLIB=${CMAKE_INSTALL_PREFIX}/${WML_LIB_DIR}"
++ COMMAND chmod ARGS "a+x" "${DEST}"
++ DEPENDS "${SOURCE}"
++ )
++ # The custom command needs to be assigned to a target.
++ ADD_CUSTOM_TARGET(
++ ${TARGET_NAME} ALL
++ DEPENDS ${DEST}
++ )
++ENDMACRO()
++
++MACRO(PREPROCESS_PATH_PERL TGT BASE_SOURCE BASE_DEST)
++ PREPROCESS_PATH_PERL_WITH_FULL_NAMES ("${TGT}" "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_SOURCE}" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_DEST}")
++ENDMACRO()
++
++# Copies the file from one place to the other.
++# TGT is the name of the makefile target to add.
++# SOURCE is the source path.
++# DEST is the destination path.
++MACRO(ADD_COPY_TARGET TGT SOURCE DEST)
++ ADD_CUSTOM_COMMAND(
++ OUTPUT "${DEST}"
++ DEPENDS "${SOURCE}"
++ COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${SOURCE}" "${DEST}"
++ )
++ # The custom command needs to be assigned to a target.
++ ADD_CUSTOM_TARGET("${TGT}" ALL DEPENDS "${DEST}")
++ENDMACRO()
++
++MACRO(RUN_POD2MAN TARGET_DESTS_VARNAME BASE_SOURCE BASE_DEST SECTION CENTER RELEASE)
++ SET (DEST "${CMAKE_CURRENT_BINARY_DIR}/${BASE_DEST}")
++ IF (POD2MAN_SOURCE_IS_IN_BINARY)
++ SET (SOURCE "${CMAKE_CURRENT_BINARY_DIR}/${BASE_SOURCE}")
++ ELSE ()
++ SET (SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_SOURCE}")
++ ENDIF ()
++ # It is null by default.
++ SET (POD2MAN_SOURCE_IS_IN_BINARY )
++ ADD_CUSTOM_COMMAND(
++ OUTPUT "${DEST}"
++ COMMAND "${PERL_EXECUTABLE}"
++ ARGS "${CMAKE_SOURCE_DIR}/cmake/pod2man-wrapper.pl"
++ "--src" "${SOURCE}"
++ "--dest" "${DEST}"
++ "--section" "${SECTION}"
++ "--center" "${CENTER}"
++ "--release" "${RELEASE}"
++ DEPENDS "${SOURCE}"
++ VERBATIM
++ )
++ # The custom command needs to be assigned to a target.
++ LIST(APPEND "${TARGET_DESTS_VARNAME}" "${DEST}")
++ENDMACRO()
++
++MACRO(SIMPLE_POD2MAN TARGET_NAME SOURCE DEST SECTION)
++ RUN_POD2MAN("${TARGET_NAME}" "${SOURCE}" "${DEST}.${SECTION}"
++ "${SECTION}"
++ "EN Tools" "EN Tools"
++ )
++ENDMACRO()
++
++MACRO(INST_POD2MAN TARGET_NAME SOURCE DEST SECTION)
++ SIMPLE_POD2MAN ("${TARGET_NAME}" "${SOURCE}" "${DEST}" "${SECTION}")
++ INSTALL_MAN ("${CMAKE_CURRENT_BINARY_DIR}/${DEST}.${SECTION}" "${SECTION}")
++ENDMACRO()
++
++MACRO(INST_RENAME_POD2MAN TARGET_NAME SOURCE DEST SECTION INSTNAME)
++ SIMPLE_POD2MAN ("${TARGET_NAME}" "${SOURCE}" "${DEST}" "${SECTION}")
++ INSTALL_RENAME_MAN ("${DEST}.${SECTION}" "${SECTION}" "${INSTNAME}" "${CMAKE_CURRENT_BINARY_DIR}")
++ENDMACRO()
++
++# Finds libm and puts the result in the MATH_LIB_LIST variable.
++# If it cannot find it, it fails with an error.
++MACRO(FIND_LIBM)
++ IF (UNIX)
++ FIND_LIBRARY(LIBM_LIB m)
++ IF(LIBM_LIB STREQUAL "LIBM_LIB-NOTFOUND")
++ MESSAGE(FATAL_ERROR "Cannot find libm")
++ ELSE()
++ SET(MATH_LIB_LIST ${LIBM_LIB})
++ ENDIF()
++ ELSE()
++ SET(MATH_LIB_LIST)
++ ENDIF()
++ENDMACRO(FIND_LIBM)
++
++MACRO(INSTALL_MAN SOURCE SECTION)
++ INSTALL(
++ FILES
++ ${SOURCE}
++ DESTINATION
++ "share/man/man${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(INSTALL_DATA SOURCE)
++ INSTALL(
++ FILES
++ "${SOURCE}"
++ DESTINATION
++ "${WML_DATA_DIR}"
++ )
++ENDMACRO()
++
++MACRO(INSTALL_RENAME_MAN SOURCE SECTION INSTNAME MAN_SOURCE_DIR)
++ INSTALL(
++ FILES
++ "${MAN_SOURCE_DIR}/${SOURCE}"
++ DESTINATION
++ "share/man/man${SECTION}"
++ RENAME
++ "${INSTNAME}.${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(INSTALL_CAT_MAN SOURCE SECTION)
++ INSTALL(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE}"
++ DESTINATION
++ "share/man/cat${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_PERL_PROG_WITHOUT_MAN BASENAME)
++ PREPROCESS_PATH_PERL("preproc_${BASENAME}" "${BASENAME}.src" "${BASENAME}.pl")
++ INSTALL(
++ PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.pl"
++ DESTINATION "${WML_LIBEXE_DIR}"
++ RENAME "wml_aux_${BASENAME}"
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_PERL_PROG BASENAME)
++ DEFINE_WML_AUX_PERL_PROG_WITHOUT_MAN("${BASENAME}")
++ SET (aux_pod_dests )
++ RUN_POD2MAN("aux_pod_dests" "${BASENAME}.src" "${BASENAME}.1" "1" "EN Tools" "En Tools")
++ INSTALL_RENAME_MAN ("${BASENAME}.1" 1 "wml_aux_${BASENAME}" "${CMAKE_CURRENT_BINARY_DIR}")
++ ADD_CUSTOM_TARGET(
++ "pod_${BASENAME}" ALL
++ DEPENDS ${aux_pod_dests}
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_C_PROG_WITHOUT_MAN BASENAME)
++ ADD_EXECUTABLE(${BASENAME} ${ARGN})
++ SET_TARGET_PROPERTIES("${BASENAME}"
++ PROPERTIES OUTPUT_NAME "wml_aux_${BASENAME}"
++ )
++ INSTALL(
++ TARGETS "${BASENAME}"
++ DESTINATION "${WML_LIBEXE_DIR}"
++ )
++ENDMACRO()
++
++MACRO(DEFINE_WML_AUX_C_PROG BASENAME MAN_SOURCE_DIR)
++ DEFINE_WML_AUX_C_PROG_WITHOUT_MAN (${BASENAME} ${ARGN})
++ INSTALL_RENAME_MAN ("${BASENAME}.1" 1 "wml_aux_${BASENAME}" "${MAN_SOURCE_DIR}")
++ENDMACRO()
++
++MACRO(DEFINE_WML_PERL_BACKEND BASENAME DEST_BASENAME)
++ PREPROCESS_PATH_PERL(
++ "${BASENAME}_preproc" "${BASENAME}.src" "${BASENAME}.pl"
++ )
++ SET (perl_backend_pod_tests )
++ INST_RENAME_POD2MAN(
++ "perl_backend_pod_tests" "${BASENAME}.src" "${BASENAME}" "1"
++ "${DEST_BASENAME}"
++ )
++ ADD_CUSTOM_TARGET(
++ "${BASENAME}_pod" ALL
++ DEPENDS ${perl_backend_pod_tests}
++ )
++ INSTALL(
++ PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.pl"
++ DESTINATION "${WML_LIBEXE_DIR}"
++ RENAME "${DEST_BASENAME}"
++ )
++ENDMACRO()
++
++MACRO(CHOMP VAR)
++ STRING(REGEX REPLACE "[\r\n]+$" "" ${VAR} "${${VAR}}")
++ENDMACRO()
++
++MACRO(READ_VERSION_FROM_VER_TXT)
++
++ # Process and extract the version number.
++ FILE( READ "${CMAKE_SOURCE_DIR}/ver.txt" VERSION)
++
++ CHOMP (VERSION)
++
++ STRING (REGEX MATCHALL "([0-9]+)" VERSION_DIGITS "${VERSION}")
++
++ LIST(GET VERSION_DIGITS 0 CPACK_PACKAGE_VERSION_MAJOR)
++ LIST(GET VERSION_DIGITS 1 CPACK_PACKAGE_VERSION_MINOR)
++ LIST(GET VERSION_DIGITS 2 CPACK_PACKAGE_VERSION_PATCH)
++
++ENDMACRO()
++
++MACRO(INSTALL_MAN SOURCE SECTION)
++ INSTALL(
++ FILES
++ ${SOURCE}
++ DESTINATION
++ "share/man/man${SECTION}"
++ )
++ENDMACRO()
++
++MACRO(ADD_GCC_DEBUG_WARNING_FLAGS)
++ ADD_DEFINITIONS(
++ "-Wall"
++ "-Werror=implicit-function-declaration"
++ "-Wold-style-declaration"
++ "-Wmissing-prototypes"
++ "-Wformat-nonliteral"
++ "-Wcast-align"
++ "-Wpointer-arith"
++ "-Wbad-function-cast"
++ "-Wstrict-prototypes"
++ "-Wmissing-declarations"
++ "-Wundef"
++ "-Wnested-externs"
++ "-Wcast-qual"
++ "-Wshadow"
++ "-Wwrite-strings"
++ "-Wunused"
++ "-Wold-style-definition"
++ )
++ENDMACRO()
++
++MACRO(SHLOMIF_PHYS_COPY_FILE FROM TO)
++ FILE (READ "${FROM}" contents)
++ FILE (WRITE "${TO}" "${contents}")
++ENDMACRO()
++
++MACRO(SHLOMIF_COMMON_SETUP private_mod_path)
++ SET (private_mod "Shlomif_Common.cmake")
++ SET (_dest "${private_mod_path}/${private_mod}")
++ IF (NOT EXISTS "${_dest}")
++ SHLOMIF_PHYS_COPY_FILE( "/usr/share/cmake/Modules/${private_mod}" "${_dest}")
++ ENDIF ()
++ENDMACRO()
++
++# Configure paths.
++SET (RELATIVE_DATADIR "share")
++SET (DATADIR "${CMAKE_INSTALL_PREFIX}/${RELATIVE_DATADIR}")
++
++SET (PKGDATADIR_SUBDIR "freecell-solver")
++SET (RELATIVE_PKGDATADIR "${RELATIVE_DATADIR}/${PKGDATADIR_SUBDIR}")
++SET (PKGDATADIR "${DATADIR}/${PKGDATADIR_SUBDIR}")
++
++SET (COMPILER_FLAGS_TO_CHECK "-fvisibility=hidden")
++MACRO(add_flags)
++ LIST(APPEND COMPILER_FLAGS_TO_CHECK ${ARGV})
++ENDMACRO ()
++MACRO(SHLOMIF_ADD_COMMON_C_FLAGS)
++ IF (MSVC)
++ MESSAGE(FATAL_ERROR "Error! You are using Microsoft Visual C++ and Freecell Solver Requires a compiler that supports C99 and some GCC extensions. Possible alternatives are GCC, clang and Intel C++ Compiler")
++ ENDIF ()
++
++ IF (CPU_ARCH)
++ add_flags("-march=${CPU_ARCH}")
++ ENDIF ()
++
++ IF (OPTIMIZATION_OMIT_FRAME_POINTER)
++ add_flags("-fomit-frame-pointer")
++ ENDIF ()
++
++ SET (IS_DEBUG)
++ IF ((CMAKE_BUILD_TYPE STREQUAL debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo))
++ SET (IS_DEBUG 1)
++ # This slows down the program considerably.
++ IF (CMAKE_BUILD_TYPE STREQUAL debug)
++ add_flags("-DDEBUG=1")
++ ENDIF ()
++
++ # Removed these flags because they emitted spurious warnings, which were of
++ # no use to us:
++ # "-Winline"
++ # "-Wfloat-equal"
++
++ IF (${CMAKE_COMPILER_IS_GNUCC})
++ ADD_GCC_DEBUG_WARNING_FLAGS()
++ ENDIF ()
++ ENDIF ()
++
++ IF (${CMAKE_COMPILER_IS_GNUCC})
++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
++ ENDIF ()
++
++ IF (CMAKE_BUILD_TYPE STREQUAL release)
++ add_flags("-flto" "-ffat-lto-objects")
++ ENDIF ()
++
++ENDMACRO()
++
++MACRO(SHLOMIF_FINALIZE_FLAGS)
++ SET (IDX 1)
++ FOREACH (CFLAG_TO_CHECK ${COMPILER_FLAGS_TO_CHECK})
++ SET (FLAG_EXISTS_VAR "FLAG_EXISTS_${IDX}")
++ MATH (EXPR IDX "${IDX} + 1")
++ CHECK_C_COMPILER_FLAG("${CFLAG_TO_CHECK}" ${FLAG_EXISTS_VAR})
++ IF (${FLAG_EXISTS_VAR})
++ ADD_DEFINITIONS(${CFLAG_TO_CHECK})
++ LIST(APPEND MY_LINK_FLAGS "${CFLAG_TO_CHECK}")
++ ENDIF ()
++ ENDFOREACH()
++
++ SET (MY_EXE_FLAGS)
++ FOREACH (CFLAG_TO_CHECK "-fwhole-program")
++ SET (FLAG_EXISTS_VAR "FLAG_EXISTS_${IDX}")
++ MATH (EXPR IDX "${IDX} + 1")
++ CHECK_C_COMPILER_FLAG("${CFLAG_TO_CHECK}" ${FLAG_EXISTS_VAR})
++ IF (${FLAG_EXISTS_VAR})
++ LIST(APPEND MY_EXE_FLAGS "${CFLAG_TO_CHECK}")
++ ENDIF ()
++ ENDFOREACH ()
++ENDMACRO ()
++
++MACRO(CHECK_FOR_PERL_MODULE MODULE)
++ EXECUTE_PROCESS (
++ COMMAND "${PERL_EXECUTABLE}" "-M${MODULE}=" "-e" "exit(0)"
++ RESULT_VARIABLE "RESULT"
++ )
++ IF (NOT RESULT EQUAL 0)
++ MESSAGE(FATAL_ERROR "Your Perl doesn't have the module ${MODULE}. Please install it.")
++ ENDIF ()
++ENDMACRO ()
++
++MACRO(CHECK_FOR_MULTIPLE_PERL_MODULES)
++ FOREACH (MODULE ${ARGV})
++ CHECK_FOR_PERL_MODULE ("${MODULE}")
++ ENDFOREACH ()
++ENDMACRO ()
+--
+2.16.3
--
2.16.3
P
P
Pierre Neidhardt wrote on 9 Apr 2018 19:39
(address . 31114@debbugs.gnu.org)
878t9w9t57.fsf@gmail.com
A few questions:

- Tests need perl-run-valgrind or something like that which is not in
the repo yet. I guess it would be better to add it. Should I do it?
I know nothing about Perl packagin, so if something feels like giving
it a shot...

- A cmake file is deliberately missing from the source (strange
engineering methods...) so I included it as a patch. Not so
convenient. Is it possible to add several sources so that the missing
file gets downloaded from its separate git repository?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrLpTQACgkQm9z0l6S7
zH8XUgf/RjLEnbC+HouT/6TjhTkROq0oFxAlPHBsKyrgxanobRk7btMY9C+LB1Zu
T05vaImPTLWxuYQSohrLILNz/aNAcQ4jWd06oNnqInvSo1fuN2jgaLZyd0HO83cw
Jk3/VvcfzscKidzaBfHuwtc46OvKbl1WeQzI+4ZbMoufHx6LvwR6VDOxxx2X3em6
ldQ2tpGKag5kSb1cTqjhcXQR2GXdtfDAGoa4113F22OowDGC7SQNO5BVrpPZbQKO
DFA0qZ1SUnSYifX7UD0Axd98JHuurFraviodCvQG2cooC0fSvbbdwUYi+ZYRHtpw
R/ov0+ciU4JaYSUVe38FCyxUY3yV7g==
=j/Df
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 9 Apr 2018 22:51
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)(address . 31114@debbugs.gnu.org)
877epggl1x.fsf@gnu.org
Hi,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (7 lines)
> A few questions:
>
> - Tests need perl-run-valgrind or something like that which is not in
> the repo yet. I guess it would be better to add it. Should I do it?
> I know nothing about Perl packagin, so if something feels like giving
> it a shot...

‘guix import cpan’ feels like giving it a shot. :-)

More seriously, if Valgrind testing is optional, it’s OK to leave it out
IMO. The other tests would be nice to have, and the Perl packages are
probably easy to import if you wanted to try, but that shouldn’t be a
blocker IMO.

Toggle quote (5 lines)
> - A cmake file is deliberately missing from the source (strange
> engineering methods...) so I included it as a patch. Not so
> convenient. Is it possible to add several sources so that the missing
> file gets downloaded from its separate git repository?

You can add an ‘origin’ in ‘inputs’. It would be preferable than adding
it as a patch, indeed.

Would you like to give it a try?

Thanks,
Ludo’.
L
L
Leo Famulari wrote on 9 Apr 2018 22:55
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)(address . 31114@debbugs.gnu.org)
20180409205516.GA28883@jasmine.lan
On Mon, Apr 09, 2018 at 11:09:00PM +0530, Pierre Neidhardt wrote:
Toggle quote (5 lines)
> - A cmake file is deliberately missing from the source (strange
> engineering methods...) so I included it as a patch. Not so
> convenient. Is it possible to add several sources so that the missing
> file gets downloaded from its separate git repository?

For an example of how to do that, look at the native-inputs field of the
Git package definition. The Git manpages are downloaded separately for
that package.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlrL0zEACgkQJkb6MLrK
fwiveBAA3rmZR45dAYLE+UymWgMOVUv/6LhmYea0k8uvEIn3OZoM2m5NSi0NIGAt
hAGlZ765GYVeX8YEBv5e5zS8hKDOJ79307W3/oK3/TDq8kcyo03YjdBZ3PvYElwd
IfGV9ZgdhsFbAHfBG61culN9Ym9FIBF7mhH3HLpll2B+fYzxhrtTAMlkg0by7gil
y5fLVOiRnNiZKtBQxVVr0Ru/VTD3psWjkyq61/mBXyP6msu+ODasGW6UkihN/wVj
gO63xEg6GSxuLRjOiMZ5/zVSWUBODoHsI7+GaLoOeXxs5a/FTd67Xj2aHPviMUwL
Fp2Y+ba73HbaqO4fYnZmdxlFQXCuXSNPUDMdkrMByZz0S2ZkFZyuYkNbOQvo43Xm
G4AofPL3aZMEHfQrJn2w2NS7ZtizrXQw+GIw6wnGoKsLL1swLcczQlp50thIaG6C
7Fv+LU6vW7tf+IXKr2aIGN1laBrH+3nJl3Hqb2wejdrqa4azhX59r55ZOJtsdpDM
df/cide3gvnPPft96RilFQFoE+4q9tl5Nd1NQ8bJllsEYHQAQK3w0C75Do3afLDj
OYkirgyEwRmojrUSoBfEdU4qPuSiH0GRlzpb+AtB1NbiPl7HYrzNRot+g/NarDR0
H4UyFfEv+wkOYHyUfWNLErvhVtF2UWztnP2+wPl+OArYNcgXsz4=
=gjLX
-----END PGP SIGNATURE-----


P
P
Pierre Neidhardt wrote on 10 Apr 2018 09:00
(name . Leo Famulari)(address . leo@famulari.name)(address . 31114@debbugs.gnu.org)
87fu43fsv0.fsf@gmail.com
Leo Famulari <leo@famulari.name> writes:

Toggle quote (4 lines)
> For an example of how to do that, look at the native-inputs field of the
> Git package definition. The Git manpages are downloaded separately for
> that package.

Thanks for the hint, it works like a charm!

(add-after 'unpack 'fix-build-env
(lambda* (#:key inputs #:allow-other-keys)
(let* ((cmake-rules (assoc-ref inputs "cmake-rules")))
(copy-file cmake-rules "fortune-mod/cmake/Shlomif_Common.cmake")
(chdir "fortune-mod"))))

One nit: I want to install the file without specifying its destination
name (re-use the source name).
~install-file~ can do that but here ~cmake-rules~ contains the checksum
prefix.

I remember seeing a procedure to trim the checksum prefix from file
names somewhere...

More generally: is there an API reference or is it just the source code?
Development documentation seems a bit scarce...

--
Pierre Neidhardt

You will gain money by a speculation or lottery.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrMYSMACgkQm9z0l6S7
zH9vSQgAiVbyd9ZeMVJThVjVLU4+q3Ma1nLNV18OQF62lc4wNgjMOo9Li+8nzqz8
Jp014+hNdElSpnbjg79l11yt5+ol6e2QccANpLYYjV91RKc/6f62vUEB8GozfOH5
98i+zd6Wi5LdP1ruLlkesaTDadGtnGZ2A2bQI+EU70IrxzWqbHeiNB86eZVJiHcg
mE/HD9wpK+MY00LFzwye1MKtbVMNHLWVFgnbaLohAmVbnmiw1zeZtzFI1lMaA9Xj
IrAwB62CqtFuilnlBbVPuPsZEYPQD78aW/t7J3EW938Vr4BkgSI5XMfQ9UrCDe2m
G53V7ok2FPzJSbhJ3QiMB87rIOJv+g==
=vA52
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 10 Apr 2018 09:05
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 31114@debbugs.gnu.org)
87efjnfsmq.fsf@gmail.com
Wow, my first contact with ~guix import~, this tool is a gem!
Seems to work perfectly.

I've enabled the tests but it fails there:

Can't locate IO/All.pm in @INC (you may need to install the IO::All module) (@INC contains:
/gnu/store/w96mglkim3p2ryb72flhzlsyv618fhk2-perl-5.26.1/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi ... at /tmp/guix-build-fortune-mod-2.4.1.drv-0/fortune-mod-fortune-mod-2.4.1/fortune-mod/tests/t/check-cookies.t line 6.

Is IO::All really missing from Guix?

--
Pierre Neidhardt

If a nation expects to be ignorant and free,
... it expects what never was and never will be.
-- Thomas Jefferson
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrMYk0ACgkQm9z0l6S7
zH9kTAgApvl1nnYcC8VIbs/QtmiWvx2xmy3T+58dEj8Aoi6cbLBVm2vW/DxST/60
rfRMDnxW6EBu4Hb6Az3DBlr1e8sMMY5LIoEGK2O2N8eN7oXjgFA813WhYl5RxpFE
mzQ9tGzJ4xYDdpcM6e+FG8TOoycDw2Ey8CyLQLabJhornkE+aNn28hIauGsh16im
QwQ0epFPVZxFStLQFsrTZAuz86JiVVShPNmw/VTWeOC/hY8RW2USis+MYo21cczz
ClZ2liVGcdQdiADcnBu6N98KsvQuaaVn6nuT3eJjgS5Lx9DyqTNil6Iy7lpfZaov
K0/ykAaNVBYudgimVs+KlfK2Ookv5Q==
=2w6R
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 10 Apr 2018 09:24
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 31114@debbugs.gnu.org)
87d0z7frr7.fsf@gmail.com
Pierre Neidhardt <ambrevar@gmail.com> writes:

Toggle quote (2 lines)
> Is IO::All really missing from Guix?

Turns out that the answer is yes. So I had to build 3 additional Perl
packages before getting the tests to run. Now they fail with:

Error open (<:raw:encoding(UTF-8)) on 'fortune--1.valgrind-log': No such file or directory at /gnu/store/4zvirlvdg6bibcs8pw6al6k57iif8v9n-perl-test-runvalgrind-0.2.0/lib/perl5/site_perl/5.26.1/Test/RunValgrind.pm line 120.

When run manually with

./pre-inst-env guix environment fortune-mod -- make test

all 4 tests pass. Any hint on how to investigate further?

--
Pierre Neidhardt

Support your right to arm bears!!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrMZrwACgkQm9z0l6S7
zH/EQgf/Z6nCDo6bpALbeKF8xPJF3BP2c1fKpVh8h8005vcpWv0BtEsIB0/csg0s
rbtKdg9mx1YjRTI5Foc5sH+f1zZ37dn45vm3CAC4XWs6ubGArCPnxOAXQhV8MIW+
DHdcnSgIoDf1P6g8AI2K8EiMOiP8th8JSgwRhTI9jLcwg01Vj56eSa52zmy//43f
GtTN3DlFPrb15cXw1keWouvtfE/mQR8WMNS1t77Tr3LfYh7Ofnba249OBN9VJd41
zY+qekX+hIsi4kqkDGlgV98F1bZ4eCN9PKo/ujW5DPgNUEUquIqAAIEo8C0R699G
QL8xnSgvY7CIIaypGMpUNa1NGpLqTg==
=G0PZ
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 10 Apr 2018 12:14
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)(address . 31114@debbugs.gnu.org)
87a7ub8j1b.fsf@gnu.org
Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (9 lines)
> Pierre Neidhardt <ambrevar@gmail.com> writes:
>
>> Is IO::All really missing from Guix?
>
> Turns out that the answer is yes. So I had to build 3 additional Perl
> packages before getting the tests to run. Now they fail with:
>
> Error open (<:raw:encoding(UTF-8)) on 'fortune--1.valgrind-log': No such file or directory at /gnu/store/4zvirlvdg6bibcs8pw6al6k57iif8v9n-perl-test-runvalgrind-0.2.0/lib/perl5/site_perl/5.26.1/Test/RunValgrind.pm line 120.

Perhaps you need to add Valgrind to ‘native-inputs’ after all?

Ludo’.
P
P
Pierre Neidhardt wrote on 10 Apr 2018 18:22
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 31114@debbugs.gnu.org)
87efjnowut.fsf@gmail.com
Yup, we need valgrind as a propagated input for perl-test-runvalgrind.

Attached the whole patch set: 3 perl packages and fortune-mod.

--
Pierre Neidhardt

A pencil with no point needs no eraser.
From 2314e654a55ce7cecfeeb4410e92a7490f4128f3 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Tue, 10 Apr 2018 21:00:08 +0530
Subject: [PATCH 1/4] gnu: Add perl-file-readbackwards.

* gnu/packages/perl.scm (perl-file-readbackwards): New variable.
---
gnu/packages/perl.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 50273d31e..e1d029c38 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3501,6 +3502,35 @@ provided base directory and can return files (and/or directories if desired)
matching a regular expression.")
(home-page "http://search.cpan.org/~dopacki/File-List//")))
+(define-public perl-file-readbackwards
+ (package
+ (name "perl-file-readbackwards")
+ (version "1.05")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/U/UR/URI/File-ReadBackwards-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0vldy5q0zyf1cwzwb1gv14f8vg2f21bw96b8wvkw6z2hhypn3cl2"))))
+ (build-system perl-build-system)
+ (home-page
+ "http://search.cpan.org/dist/File-ReadBackwards/")
+ (synopsis "Read a file backwards by lines")
+ (description "This module reads a file backwards line by line. It is
+simple to use, memory efficient and fast. It supports both an object and a
+tied handle interface.
+
+It is intended for processing log and other similar text files which
+typically have their newest entries appended to them. By default files
+are assumed to be plain text and have a line ending appropriate to the
+OS. But you can set the input record separator string on a per file
+basis.")
+ (license #f)))
+
(define-public perl-file-remove
(package
(name "perl-file-remove")
--
2.16.3
From e819b9532883aaf168a2fcc74daa40341dcf8afb Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Tue, 10 Apr 2018 21:01:09 +0530
Subject: [PATCH 2/4] gnu: Add perl-io-all.

* gnu/packages/perl.scm (perl-io-all): New variable.
---
gnu/packages/perl.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index e1d029c38..4bef99dce 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -46,6 +46,7 @@
#:use-module (guix build-system perl)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-web)
#:use-module (gnu packages pkg-config))
@@ -4086,6 +4087,32 @@ This document describes how to use Inline with the C programming language.
It also goes a bit into Perl C internals.")
(license (package-license perl))))
+(define-public perl-io-all
+ (package
+ (name "perl-io-all")
+ (version "0.87")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/F/FR/FREW/IO-All-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0nsd9knlbd7if2v6zwj4q978axq0w5hk8ymp61z14a821hjivqjl"))))
+ (build-system perl-build-system)
+ (propagated-inputs
+ `(("perl-file-mimeinfo" ,perl-file-mimeinfo)
+ ("perl-file-readbackwards" ,perl-file-readbackwards)))
+ (home-page "http://search.cpan.org/dist/IO-All/")
+ (synopsis "IO::All to Larry Wall!")
+ (description "IO::All combines all of the best Perl IO modules into a
+single nifty object oriented interface to greatly simplify your everyday Perl
+IO idioms. It exports a single function called io, which returns a new IO::All
+object. And that object can do it all!")
+ (license perl-license)))
+
(define-public perl-io-captureoutput
(package
(name "perl-io-captureoutput")
--
2.16.3
From a1d5a57a4e55f7aca4033844ff764aa2a0069bf9 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Tue, 10 Apr 2018 21:01:44 +0530
Subject: [PATCH 3/4] gnu: Add perl-test-runvalgrind

* gnu/packages/perl-check.scm (perl-test-runvalgrind): New variable.
---
gnu/packages/perl-check.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/perl-check.scm b/gnu/packages/perl-check.scm
index 1fd725f65..832efc2b7 100644
--- a/gnu/packages/perl-check.scm
+++ b/gnu/packages/perl-check.scm
@@ -12,6 +12,7 @@
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -31,6 +32,7 @@
(define-module (gnu packages perl-check)
#:use-module (guix licenses)
#:use-module (gnu packages)
+ #:use-module (gnu packages valgrind)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system perl)
@@ -1001,6 +1003,33 @@ reported, and the tests skipped.")
(description "Test::Roo provides composable, reusable tests with roles.")
(license asl2.0)))
+(define-public perl-test-runvalgrind
+ (package
+ (name "perl-test-runvalgrind")
+ (version "0.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://cpan/authors/id/S/SH/SHLOMIF/Test-RunValgrind-"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0cfndkn2k9pcx290wcblwmrwh1ybs0grxjlsrp8fbqqbmmjpb53h"))))
+ (build-system perl-build-system)
+ (native-inputs
+ `(("perl-module-build" ,perl-module-build)))
+ (propagated-inputs
+ `(("perl-path-tiny" ,perl-path-tiny)
+ ("perl-test-trap" ,perl-test-trap)
+ ("valgrind" ,valgrind)))
+ (home-page "http://search.cpan.org/dist/Test-RunValgrind/")
+ (synopsis "Tests that an external program is valgrind-clean")
+ (description "Test::RunValgind checks weather Valgrind does not detect
+errors (such as memory leaks) in an arbitrary binary executable.")
+ (license x11)))
+
(define-public perl-test-script
(package
(name "perl-test-script")
--
2.16.3
From d4ab7650cae4e4cf3403a5e03bc68cef15e4109a Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt <ambrevar@gmail.com>
Date: Mon, 9 Apr 2018 23:01:04 +0530
Subject: [PATCH 4/4] gnu: Add fortune-mod.

* gnu/packages/games.scm (fortune-mod): New variable.
---
gnu/packages/games.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5207e08d6..47557a762 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -112,6 +112,7 @@
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages bash)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages perl-check)
#:use-module (gnu packages qt)
#:use-module (gnu packages compression)
#:use-module (gnu packages pulseaudio)
@@ -4851,3 +4852,56 @@ Strife, Chex Quest, and fan-created games like Harmony, Hacx and Freedoom.")
(license:non-copyleft ; modified dumb
"file://dumb/licence.txt"
"Dumb license, explicitly GPL compatible.")))))
+
+(define-public fortune-mod
+ (package
+ (name "fortune-mod")
+ (version "2.4.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/shlomif/fortune-mod/"
+ "archive/" name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hnqpkassh7fwg2jgvybr8mw7vzfikbrhb5r22367ilfwxnl9yd2"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:test-target "check"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build-env
+ (lambda* (#:key inputs #:allow-other-keys)
+ (use-modules (guix build utils))
+ (let* ((cmake-rules (assoc-ref inputs "cmake-rules")))
+ (copy-file cmake-rules
+ (string-append "fortune-mod/cmake/"
+ (strip-store-file-name cmake-rules)))
+ (chdir "fortune-mod"))))
+ (add-after 'install 'fix-install-directory
+ ;; Move binary from "games/" to "bin/".
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (rename-file (string-append out "/games/fortune")
+ (string-append out "/bin/fortune"))
+ #t))))))
+ (inputs `(("recode" ,recode)))
+ (native-inputs
+ `(("perl" ,perl)
+ ;; The following is only needed for tests.
+ ("perl-file-find-object" ,perl-file-find-object)
+ ("perl-test-differences" ,perl-test-differences)
+ ("perl-class-xsaccessor" ,perl-class-xsaccessor)
+ ("perl-io-all" ,perl-io-all)
+ ("perl-test-runvalgrind" ,perl-test-runvalgrind)
+ ("cmake-rules"
+ ,(origin
+ (method url-fetch)
+ (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
+ "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
+ (sha256
+ (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))
+ (home-page "http://www.shlomifish.org/open-source/projects/fortune-mod/")
+ (synopsis "The Fortune Cookie program from BSD games")
+ (description "Fortune is a command-line utility which displays a random
+quotation from a collection of quotes.")
+ (license license:gpl2+)))
--
2.16.3
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrM5KoACgkQm9z0l6S7
zH9jrAf/XdfjTqbRnatLboAbHDqOw7jQ0IasTTA7N6zaZPZMvpIkSNHtlgORu05c
LvXYPfvVLWjn64actBd+2TjLx/V6+oEPlHfz8kmTEYaCeTvG7R6f5m6gAjlZEfk8
bbBOFpfRy76iyVL5bSGPqUHseNJjkb6PSR2/vZSp9iOqpS9HBsPaK3va0aHaIdOZ
kh4qmvEShJoUEETqfNxB02SvjYP0Z0PCDQtvCXCDFuLK4fKDAUeBp7et9Qj0kNPl
FXxWpQIdSEYtJ+9gkrZXSwDjS98TJqyDgcWpRKtcIUn0o58Xdf3x8IlZnresBdFz
uwJu6z0v0yx8ObIYiB5jeMk67VUBFA==
=XNIr
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 18 Apr 2018 22:42
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)
87bmegutzc.fsf@gnu.org
Hello,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (3 lines)
> More generally: is there an API reference or is it just the source code?
> Development documentation seems a bit scarce...

The manual contains an API reference for things like (guix store), (guix
derivations), and (guix monads), but it lacks a reference for (guix
build …) modules.

That said, these modules have docstrings and are fairly small, so
hopefully it’s not that bad. ;-)

Ludo’.
L
L
Ludovic Courtès wrote on 19 Apr 2018 11:56
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)(address . 31114-done@debbugs.gnu.org)
87a7tzmse1.fsf@gnu.org
Hi Pierre,

I’ve applied it all after fixing trivial issues reported by ‘guix lint’.
I was able to get a few fortune cookies already, so thank you. :-)

Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (16 lines)
> + (native-inputs
> + `(("perl" ,perl)
> + ;; The following is only needed for tests.
> + ("perl-file-find-object" ,perl-file-find-object)
> + ("perl-test-differences" ,perl-test-differences)
> + ("perl-class-xsaccessor" ,perl-class-xsaccessor)
> + ("perl-io-all" ,perl-io-all)
> + ("perl-test-runvalgrind" ,perl-test-runvalgrind)
> + ("cmake-rules"
> + ,(origin
> + (method url-fetch)
> + (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
> + "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
> + (sha256
> + (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))

I’m afraid the above URL is referring to the tip of that repository, and
thus that contents may change over time. Could you come up with a
stable URL, i.e., one that includes a commit ID?

TIA!

Ludo’.
Closed
P
P
Pierre Neidhardt wrote on 19 Apr 2018 14:34
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 31114-done@debbugs.gnu.org)
87h8o7iddr.fsf@gmail.com
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (5 lines)
> Hi Pierre,
>
> I’ve applied it all after fixing trivial issues reported by ‘guix lint’.
> I was able to get a few fortune cookies already, so thank you. :-)

I did run `guix lint` if I'm not mistaken, I don't remember any issue.
What were those?

Toggle quote (22 lines)
> Pierre Neidhardt <ambrevar@gmail.com> skribis:
>
>> + (native-inputs
>> + `(("perl" ,perl)
>> + ;; The following is only needed for tests.
>> + ("perl-file-find-object" ,perl-file-find-object)
>> + ("perl-test-differences" ,perl-test-differences)
>> + ("perl-class-xsaccessor" ,perl-class-xsaccessor)
>> + ("perl-io-all" ,perl-io-all)
>> + ("perl-test-runvalgrind" ,perl-test-runvalgrind)
>> + ("cmake-rules"
>> + ,(origin
>> + (method url-fetch)
>> + (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
>> + "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
>> + (sha256
>> + (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))
>
> I’m afraid the above URL is referring to the tip of that repository, and
> thus that contents may change over time. Could you come up with a
> stable URL, i.e., one that includes a commit ID?

Sure, I think


should do.

Out of curiosity, why did you close the bug / merge the patch with the
URL issue mentioned above?

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlrYjMAACgkQm9z0l6S7
zH8gpwf/ZX3dncMqshYuEU6gwh37LnwGvQk3kvvfDfUgOHVyAf3RscRhAVSa2hSm
e4LOHTDjV/IstXd6ph4UXxweHne3KEfqZQRgIN5/cyhFgT3AFBdJAEi2hQJp4fon
1PMJu+OukO2Z1jObBAnyLcrxsfeY9CGOfTgwuPsoOn5fLmfy+4Jq2/e+rxb4U1fa
kXa/X8GoJx4xnO9KUoY0OA4/lO4f7yy+w5U4ba3B11+V31xiaIAZAKr3gXmyftD3
hSxMqgaWL7RLcFa0mnTjOF9xiphpcVsQ5i0dVvCB1gsp87EbEluIRX8mN+4BkO74
mkKOzkpQahiWXBvOVi47hust137dsQ==
=hHfn
-----END PGP SIGNATURE-----

Closed
L
L
Ludovic Courtès wrote on 23 Apr 2018 17:12
(name . Pierre Neidhardt)(address . ambrevar@gmail.com)(address . 31114-done@debbugs.gnu.org)
87tvs2yn17.fsf@gnu.org
Hello,

Pierre Neidhardt <ambrevar@gmail.com> skribis:

Toggle quote (10 lines)
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi Pierre,
>>
>> I’ve applied it all after fixing trivial issues reported by ‘guix lint’.
>> I was able to get a few fortune cookies already, so thank you. :-)
>
> I did run `guix lint` if I'm not mistaken, I don't remember any issue.
> What were those?

I think these were two-spaces-after-end-of-sentence-period in the
synopses/descriptions of the Perl packages, things like that.

Toggle quote (28 lines)
>> Pierre Neidhardt <ambrevar@gmail.com> skribis:
>>
>>> + (native-inputs
>>> + `(("perl" ,perl)
>>> + ;; The following is only needed for tests.
>>> + ("perl-file-find-object" ,perl-file-find-object)
>>> + ("perl-test-differences" ,perl-test-differences)
>>> + ("perl-class-xsaccessor" ,perl-class-xsaccessor)
>>> + ("perl-io-all" ,perl-io-all)
>>> + ("perl-test-runvalgrind" ,perl-test-runvalgrind)
>>> + ("cmake-rules"
>>> + ,(origin
>>> + (method url-fetch)
>>> + (uri (string-append "https://bitbucket.org/shlomif/shlomif-cmake-modules/"
>>> + "raw/default/shlomif-cmake-modules/Shlomif_Common.cmake"))
>>> + (sha256
>>> + (base32 "0kx9s1qqhhzprp1w3b67xmsns0n0v506bg5hgrshxaxpy6lqiwb2"))))))
>>
>> I’m afraid the above URL is referring to the tip of that repository, and
>> thus that contents may change over time. Could you come up with a
>> stable URL, i.e., one that includes a commit ID?
>
> Sure, I think
>
> https://bitbucket.org/shlomif/shlomif-cmake-modules/raw/c505713d7a7cda608f97f01577e5868a711b883e/shlomif-cmake-modules/Shlomif_Common.cmake
>
> should do.

OK, I made the change.

Toggle quote (3 lines)
> Out of curiosity, why did you close the bug / merge the patch with the
> URL issue mentioned above?

I didn’t consider it a showstopper, but I can understand arguments both
ways.

Thank you,
Ludo’.
Closed
?