11{
22 lib ,
3+ stdenv ,
4+ fetchFromGitHub ,
5+ fetchurl ,
6+ unzip ,
7+ pkg-config ,
8+ python3 ,
39 SDL2 ,
410 SDL2_image ,
511 enet ,
6- fetchFromGitHub ,
712 freetype ,
813 glpk ,
914 intltool ,
1924 openblas ,
2025 pcre2 ,
2126 physfs ,
22- pkg-config ,
23- python3 ,
24- stdenv ,
2527 suitesparse ,
28+ libyaml ,
29+ cmark ,
30+ dbus ,
2631} :
2732
28- stdenv . mkDerivation rec {
33+ let
34+ lyaml = fetchFromGitHub {
35+ owner = "gvvaughan" ;
36+ repo = "lyaml" ;
37+ tag = "v6.2.8" ;
38+ hash = "sha256-ADLXi38sAs9ifQ4HJoYzgdp/dw0axGmVCtqJjpqWcmQ=" ;
39+ } ;
40+ nativefiledialog-extended = fetchFromGitHub {
41+ owner = "btzy" ;
42+ repo = "nativefiledialog-extended" ;
43+ tag = "v1.2.1" ;
44+ hash = "sha256-GwT42lMZAAKSJpUJE6MYOpSLKUD5o9nSe9lcsoeXgJY=" ;
45+ } ;
46+ nativefiledialog-extended-patch = fetchurl {
47+ url = "https://wrapdb.mesonbuild.com/v2/nativefiledialog-extended_1.2.1-1/get_patch" ;
48+ hash = "sha256-BEouiB2HTVWokrYc9VOqdnjRwPBs+us5obQ/NMqXawk=" ;
49+ } ;
50+ in
51+ stdenv . mkDerivation ( finalAttrs : {
2952 pname = "naev" ;
30- version = "0.11 .5" ;
53+ version = "0.12 .5" ;
3154
3255 src = fetchFromGitHub {
3356 owner = "naev" ;
3457 repo = "naev" ;
35- rev = "v${ version } " ;
36- hash = "sha256-vdPkACgLGSTb9E/HZR5KoXn/fro0iHV7hX9kJim1j/M =" ;
58+ tag = "v${ finalAttrs . version } " ;
59+ hash = "sha256-I+OU3sr+C8HPnJTQ+Cc/EvshzawqikoMg3cp9uQ5dSQ =" ;
3760 fetchSubmodules = true ;
3861 } ;
3962
@@ -54,6 +77,9 @@ stdenv.mkDerivation rec {
5477 pcre2
5578 physfs
5679 suitesparse
80+ libyaml
81+ cmark
82+ dbus
5783 ] ;
5884
5985 nativeBuildInputs = [
@@ -67,6 +93,7 @@ stdenv.mkDerivation rec {
6793 ninja
6894 pkg-config
6995 intltool
96+ unzip
7097 ] ;
7198
7299 mesonFlags = [
@@ -76,13 +103,21 @@ stdenv.mkDerivation rec {
76103 ] ;
77104
78105 postPatch = ''
79- patchShebangs --build dat/outfits/bioship/generate.py utils/build/*.py utils/*.py
106+ patchShebangs --build dat/outfits/bioship/generate.py utils/build/*.py utils/*.py dat/naevpedia/ships/ships.py dat/naevpedia/outfits/outfits.py
80107
81108 # Add a missing include to fix the build against luajit-2.1.1741730670.
82109 # Otherwise the build fails as:
83110 # src/lutf8lib.c:421:22: error: 'INT_MAX' undeclared (first use in this function)
84111 # TODO: drop after 0.12.3 release
85112 sed -i '1i#include <limits.h>' src/lutf8lib.c
113+ cp -r ${ lyaml } subprojects/lyaml-6.2.8
114+ chmod -R +w subprojects/lyaml-6.2.8
115+ cp -r subprojects/packagefiles/lyaml/* subprojects/lyaml-6.2.8
116+ cp -r ${ nativefiledialog-extended } subprojects/nativefiledialog-extended-1.2.1
117+ chmod -R +w subprojects/nativefiledialog-extended-1.2.1
118+ tmp=$(mktemp -d)
119+ unzip ${ nativefiledialog-extended-patch } -d $tmp
120+ cp -r $tmp/*/* subprojects/nativefiledialog-extended-1.2.1
86121 '' ;
87122
88123 meta = {
@@ -93,4 +128,4 @@ stdenv.mkDerivation rec {
93128 maintainers = with lib . maintainers ; [ ralismark ] ;
94129 platforms = lib . platforms . linux ;
95130 } ;
96- }
131+ } )
0 commit comments