Merge pull request #169005 from SuperSandro2000/devilutionX

authored by Sandro and committed by GitHub eb004259 b1eef8c0

+98 -20
+1 -1
pkgs/build-support/fetchurl/default.nix
··· 160 ''; 161 162 inherit meta; 163 - inherit passthru; 164 }
··· 160 ''; 161 162 inherit meta; 163 + passthru = { inherit url; } // passthru; 164 }
+53
pkgs/development/libraries/SDL_audiolib/default.nix
···
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , SDL2 6 + , pkg-config 7 + }: 8 + 9 + stdenv.mkDerivation rec { 10 + pname = "SDL_audiolib"; 11 + version = "unstable-2022-04-17"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "realnc"; 15 + repo = "SDL_audiolib"; 16 + rev = "908214606387ef8e49aeacf89ce848fb36f694fc"; 17 + sha256 = "sha256-11KkwIhG1rX7yDFSj92NJRO9L2e7XZGq2gOJ54+sN/A="; 18 + }; 19 + 20 + nativeBuildInputs = [ 21 + cmake 22 + pkg-config 23 + ]; 24 + 25 + buildInputs = [ 26 + SDL2 27 + ]; 28 + 29 + cmakeFlags = [ 30 + "-DUSE_RESAMP_SRC=OFF" 31 + "-DUSE_RESAMP_SOXR=OFF" 32 + "-DUSE_DEC_DRFLAC=OFF" 33 + "-DUSE_DEC_OPENMPT=OFF" 34 + "-DUSE_DEC_XMP=OFF" 35 + "-DUSE_DEC_MODPLUG=OFF" 36 + "-DUSE_DEC_MPG123=OFF" 37 + "-DUSE_DEC_SNDFILE=OFF" 38 + "-DUSE_DEC_LIBVORBIS=OFF" 39 + "-DUSE_DEC_LIBOPUSFILE=OFF" 40 + "-DUSE_DEC_MUSEPACK=OFF" 41 + "-DUSE_DEC_FLUIDSYNTH=OFF" 42 + "-DUSE_DEC_BASSMIDI=OFF" 43 + "-DUSE_DEC_WILDMIDI=OFF" 44 + "-DUSE_DEC_ADLMIDI=OFF" 45 + ]; 46 + 47 + meta = with lib; { 48 + description = "Audio decoding, resampling and mixing library for SDL"; 49 + homepage = "https://github.com/realnc/SDL_audiolib"; 50 + license = licenses.lgpl3Plus; 51 + maintainers = with maintainers; [ SuperSandro2000 ]; 52 + }; 53 + }
+42 -19
pkgs/games/devilutionx/default.nix
··· 3 , fetchFromGitHub 4 , fetchpatch 5 , fetchurl 6 - , fetchzip 7 , cmake 8 , pkg-config 9 , gettext 10 , SDL2 11 , SDL2_image 12 , fmt 13 , libpng ··· 16 17 let 18 # TODO: submit a PR upstream to allow system copies of these libraries where possible 19 asio = fetchurl { 20 url = "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz"; 21 sha256 = "0vhb4cig40mm0a98i74grpmfkcmby8zxg6vqa38dpryxpgvp5fw8"; 22 }; 23 24 - SDL_audiolib = fetchurl { 25 - url = "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz"; 26 - sha256 = "0z4rizncp6gqsy72b3709zc9fr915wgcwnlx1fhhy7mrczsly630"; 27 }; 28 29 - simpleini = fetchzip { 30 - url = "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip"; 31 - sha256 = "07kf1jjbc9v04hsysa6v2wh1m9csf5qz0b1wmlkf9sj00kf47zj7"; 32 }; 33 in 34 35 stdenv.mkDerivation rec { 36 pname = "devilutionx"; 37 - version = "1.3.0"; 38 39 src = fetchFromGitHub { 40 owner = "diasurgical"; 41 repo = "devilutionX"; 42 rev = version; 43 - sha256 = "0acrkqi0pr3cbr5i1a1vfrnxv1n3xmql5d86bm2gywvpdb94xads"; 44 }; 45 46 patches = [ 47 - # allow building with system SDL2_image instead of vendored version 48 - # this patch can be removed on the next release of devilutionx 49 - # see https://github.com/diasurgical/devilutionX/pull/3386 50 (fetchpatch { 51 - url = "https://github.com/diasurgical/devilutionX/commit/41ff03e94c02477bffb2d62764e8624c0e06854d.patch"; 52 - sha256 = "1lrnb9d0dcdyd78rix5rl4p8kkwbnl91llr9fgb86ysm3q58qkvj"; 53 }) 54 ]; 55 ··· 57 substituteInPlace Source/init.cpp --replace "/usr/share/diasurgical/devilutionx/" "${placeholder "out"}/share/diasurgical/devilutionx/" 58 59 # download dependencies ahead of time 60 - substituteInPlace 3rdParty/asio/CMakeLists.txt --replace "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz" "${asio}" 61 - substituteInPlace 3rdParty/SDL_audiolib/CMakeLists.txt --replace "https://github.com/realnc/SDL_audiolib/archive/aa79660eba4467a44f9dcaecf26b0f0a000abfd7.tar.gz" "${SDL_audiolib}" 62 - substituteInPlace 3rdParty/simpleini/CMakeLists.txt --replace "https://github.com/brofield/simpleini/archive/7bca74f6535a37846162383e52071f380c99a43a.zip" "${simpleini}" 63 ''; 64 65 cmakeFlags = [ 66 "-DBINARY_RELEASE=ON" 67 "-DVERSION_NUM=${version}" 68 - "-DPACKET_ENCRYPTION=OFF" # FIXME: build with libsodium 69 - "-DDISABLE_ZERO_TIER=ON" # FIXME: build with libzt 70 ]; 71 72 nativeBuildInputs = [ ··· 77 ]; 78 79 buildInputs = [ 80 fmt 81 libpng 82 SDL2 83 SDL2_image 84 ]; 85
··· 3 , fetchFromGitHub 4 , fetchpatch 5 , fetchurl 6 + , bzip2 7 , cmake 8 , pkg-config 9 , gettext 10 + , libsodium 11 , SDL2 12 + , SDL_audiolib 13 , SDL2_image 14 , fmt 15 , libpng ··· 18 19 let 20 # TODO: submit a PR upstream to allow system copies of these libraries where possible 21 + 22 + # fork with patches, far behind upstream 23 asio = fetchurl { 24 url = "https://github.com/diasurgical/asio/archive/ebeff99f539da23d27c2e8d4bdbc1ee011968644.tar.gz"; 25 sha256 = "0vhb4cig40mm0a98i74grpmfkcmby8zxg6vqa38dpryxpgvp5fw8"; 26 }; 27 28 + # fork with patches, upstream seems to be dead 29 + libmpq = fetchurl { 30 + url = "https://github.com/diasurgical/libmpq/archive/0f10bd1600f406b13932bf5351ba713361262184.tar.gz"; 31 + sha256 = "sha256-7hc/Xtsg8WJIJljLydS7hLZA9lEEHWhsCteyrxK68qE="; 32 + }; 33 + 34 + # not "real" package with pkg-config or cmake file, just collection of source files 35 + libsmackerdec = fetchurl { 36 + url = "https://github.com/diasurgical/libsmackerdec/archive/2997ee0e41e91bb723003bc09234be553b190e38.tar.gz"; 37 + sha256 = "sha256-QMDcIZQ94i4VPVanmSxiGkKgxWx82DP4uE+Q5I2nU+o="; 38 + }; 39 + 40 + # fork with patches, far behind upstream 41 + libzt = fetchFromGitHub { 42 + owner = "diasurgical"; 43 + repo = "libzt"; 44 + fetchSubmodules = true; 45 + rev = "a34ba7f1cc2e41b05badd25d1b01fdc5fd2f4e02"; 46 + sha256 = "sha256-tyIPt+7OTi5W+5X/ixQP1puOKdhrqRZtpwXlWFBFpc8="; 47 }; 48 49 + # missing pkg-config and/or cmake file 50 + simpleini = fetchurl { 51 + url = "https://github.com/brofield/simpleini/archive/9b3ed7ec815997bc8c5b9edf140d6bde653e1458.tar.gz"; 52 + sha256 = "sha256-93kuyp8/ew7okW/6ThJMtLMZsR1YSeFcXu9Y65ELBFE=="; 53 }; 54 in 55 56 stdenv.mkDerivation rec { 57 pname = "devilutionx"; 58 + version = "1.4.0"; 59 60 src = fetchFromGitHub { 61 owner = "diasurgical"; 62 repo = "devilutionX"; 63 rev = version; 64 + sha256 = "sha256-uuIPTdgGpHA8j1M8b+kfnBuiJ5mdS9rckvEfn2h7lmo="; 65 }; 66 67 patches = [ 68 (fetchpatch { 69 + url = "https://github.com/diasurgical/devilutionX/commit/03b22352fc9e1ecb88b20a053c90c04a50717267.patch"; 70 + sha256 = "sha256-5aAwi1NV8P+nLLbEEnlwLGNQCQBb0nQkIVe5tR5Shsw="; 71 }) 72 ]; 73 ··· 75 substituteInPlace Source/init.cpp --replace "/usr/share/diasurgical/devilutionx/" "${placeholder "out"}/share/diasurgical/devilutionx/" 76 77 # download dependencies ahead of time 78 + substituteInPlace 3rdParty/asio/CMakeLists.txt --replace "${asio.url}" "${asio}" 79 + substituteInPlace 3rdParty/libmpq/CMakeLists.txt --replace "${libmpq.url}" "${libmpq}" 80 + substituteInPlace 3rdParty/libsmackerdec/CMakeLists.txt --replace "${libsmackerdec.url}" "${libsmackerdec}" 81 + substituteInPlace 3rdParty/libzt/CMakeLists.txt \ 82 + --replace "GIT_REPOSITORY https://github.com/diasurgical/libzt.git" "" \ 83 + --replace "GIT_TAG ${libzt.rev}" "SOURCE_DIR ${libzt}" 84 + substituteInPlace 3rdParty/simpleini/CMakeLists.txt --replace "${simpleini.url}" "${simpleini}" 85 ''; 86 87 cmakeFlags = [ 88 "-DBINARY_RELEASE=ON" 89 "-DVERSION_NUM=${version}" 90 ]; 91 92 nativeBuildInputs = [ ··· 97 ]; 98 99 buildInputs = [ 100 + bzip2 101 fmt 102 libpng 103 + libsodium 104 SDL2 105 + SDL_audiolib 106 SDL2_image 107 ]; 108
+2
pkgs/top-level/all-packages.nix
··· 20272 libGLU = null; 20273 }); 20274 20275 SDL_sixel = callPackage ../development/libraries/SDL_sixel { }; 20276 20277 SDL_gfx = callPackage ../development/libraries/SDL_gfx { };
··· 20272 libGLU = null; 20273 }); 20274 20275 + SDL_audiolib = callPackage ../development/libraries/SDL_audiolib { }; 20276 + 20277 SDL_sixel = callPackage ../development/libraries/SDL_sixel { }; 20278 20279 SDL_gfx = callPackage ../development/libraries/SDL_gfx { };