add uqm
more/packages/games.scm
430 | 430 | (synopsis "") | |
431 | 431 | (description "") | |
432 | 432 | (license (license:non-copyleft "COPYING")))) | |
433 | + | ||
434 | + | (define-public uqm | |
435 | + | (package | |
436 | + | (name "uqm") | |
437 | + | (version "0.7.0") | |
438 | + | (source (origin | |
439 | + | (method url-fetch) | |
440 | + | (uri (string-append "mirror://sourceforge/sc2/UQM/0.7/uqm-" | |
441 | + | version "-1-source.tgz")) | |
442 | + | (sha256 | |
443 | + | (base32 | |
444 | + | "1rr8s25qsbqqbp3qsm2ndv11iqaxh72fc6fd8xdf80vb56piaq0k")))) | |
445 | + | (build-system gnu-build-system) | |
446 | + | (arguments | |
447 | + | `(#:tests? #f; no tests | |
448 | + | #:phases | |
449 | + | (modify-phases %standard-phases | |
450 | + | (delete 'configure) | |
451 | + | (replace 'build | |
452 | + | (lambda* (#:key outputs inputs #:allow-other-keys) | |
453 | + | ;; Configuration can only happen interactively, so change default | |
454 | + | ;; values instead. | |
455 | + | (substitute* "build/unix/build.config" | |
456 | + | (("/usr/local/games") (assoc-ref outputs "out"))) | |
457 | + | (substitute* "build.sh" | |
458 | + | (("/bin/sh") (which "sh"))) | |
459 | + | (setenv "CFLAGS" | |
460 | + | (string-append | |
461 | + | "-I" (assoc-ref inputs "sdl-image") "/include/SDL" | |
462 | + | " -I" (assoc-ref inputs "glu") "/include" | |
463 | + | " -O3 -DNDEBUG")) | |
464 | + | (chmod "build/unix/build_collect" #x755) | |
465 | + | (setenv "MAKE_VERBOSE" "1") | |
466 | + | (invoke (which "sh") "build.sh" "uqm") | |
467 | + | #t)) | |
468 | + | (replace 'install | |
469 | + | (lambda* (#:key outputs inputs #:allow-other-keys) | |
470 | + | ;; Configuration can only happen interactively, so change default | |
471 | + | ;; values instead. | |
472 | + | (invoke (which "sh") "build/unix/build.sh" "uqm" "install") | |
473 | + | (mkdir-p (string-append (assoc-ref outputs "out") | |
474 | + | "/share/uqm/content/packages")) | |
475 | + | (copy-file (assoc-ref inputs "uqm-content") | |
476 | + | (string-append (assoc-ref outputs "out") | |
477 | + | "/share/uqm/content/packages/uqm-" | |
478 | + | ,version "-content.uqm")) | |
479 | + | #t))))) | |
480 | + | (inputs | |
481 | + | `(("libmikmod" ,libmikmod) | |
482 | + | ("libvorbis" ,libvorbis) | |
483 | + | ("glu" ,glu) | |
484 | + | ("sdl" ,sdl) | |
485 | + | ("sdl-image" ,sdl-image) | |
486 | + | ("uqm-content" | |
487 | + | ,(origin | |
488 | + | (method url-fetch) | |
489 | + | (uri (string-append "mirror://sourceforge/sc2/UQM/0.7/uqm-" | |
490 | + | version "-content.uqm")) | |
491 | + | (sha256 | |
492 | + | (base32 | |
493 | + | "1gx39ns698hyczd4nx73mr0z86bbi4q3h8sw3pxjh1lzla5xpxmq")))))) | |
494 | + | (native-inputs | |
495 | + | `(("pkg-config" ,pkg-config))) | |
496 | + | (home-page "http://sc2.sourceforge.net") | |
497 | + | (synopsis "") | |
498 | + | (description "") | |
499 | + | (license license:gpl2+))) |