gnu: Add lead-solver.

* gnu/packages/games.scm (lead-solver): New variable.

Change-Id: I5b126d1173e80cab6a588a08887c47d2f981890d
This commit is contained in:
Nicolas Goaziou 2024-08-28 23:43:38 +02:00
parent 77ca6b3108
commit dbc64bef16
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -10259,6 +10259,56 @@ remake of that series or any other game.")
;; released under lgpl2.1+. ;; released under lgpl2.1+.
(license (list license:gpl2 license:cc-by-sa3.0 license:lgpl2.1+)))) (license (list license:gpl2 license:cc-by-sa3.0 license:lgpl2.1+))))
(define-public lead-solver
(package
(name "lead-solver")
(version "1.0.2")
(source (origin
(method url-fetch)
(uri (let ((v (apply string-append (string-split version #\.))))
(string-append
"https://lajollabridge.com/Software/Lead-Solver/"
"leadsolver-" v ".zip")))
(sha256
(base32
"0xsa7r6r5sprgy0pkdm1xj1jwyy6d3qak2ynviy8xplicl99q09f"))
(modules '((guix build utils)
(ice-9 ftw)))
(snippet
#~(begin
;; Remove pre-built executables and cruft relative
;; to other OSes.
(for-each
delete-file-recursively
(scandir "."
(lambda (f)
(not (member f '("." ".." "leadsolver.cpp"))))))
(substitute* "leadsolver.cpp"
(("#include \"dll.h\"") "#include <dll.h>"))))))
(build-system gnu-build-system)
(arguments
(list #:tests? #false ;no tests
#:phases
#~(modify-phases %standard-phases
(delete 'configure) ;no configure script
(replace 'build
(lambda _
(invoke "g++" "leadsolver.cpp" "-ldds" "-o" "leadsolver")))
(replace 'install ;no install phase
(lambda _
(let ((bin (string-append #$output "/bin")))
(install-file "leadsolver" bin)))))))
(native-inputs (list unzip))
(inputs (list dds))
(home-page
"https://lajollabridge.com/Software/Lead-Solver/Lead-Solver-About.htm")
(synopsis "Analyze leads in bridge game")
(description
"Given bridge hands, Lead Solver tallies up how well each card does when
led in terms of average tricks taken for the defense (for matchpoints) and how
often the contract is set (for team play).")
(license license:gpl3)))
(define-public leela-zero (define-public leela-zero
(package (package
(name "leela-zero") (name "leela-zero")