Merge pull request #158229 from OPNA2608/init/furnace

authored by Sandro and committed by GitHub afe8d598 30e2832f

+103
+99
pkgs/applications/audio/furnace/default.nix
···
··· 1 + { stdenv 2 + , lib 3 + , nix-update-script 4 + , fetchFromGitHub 5 + , fetchpatch 6 + , cmake 7 + , pkg-config 8 + , makeWrapper 9 + , fmt_8 10 + , libsndfile 11 + , SDL2 12 + , zlib 13 + , withJACK ? stdenv.hostPlatform.isUnix 14 + , libjack2 15 + , withGUI ? true 16 + , Cocoa 17 + }: 18 + 19 + stdenv.mkDerivation rec { 20 + pname = "furnace"; 21 + version = "0.5.6"; 22 + 23 + src = fetchFromGitHub { 24 + owner = "tildearrow"; 25 + repo = "furnace"; 26 + rev = "v${version}"; 27 + fetchSubmodules = true; 28 + sha256 = "sha256-BcaPQuDFkAaxFQKwoI6xdSWcyHo5VsqZcwf++JISqRs="; 29 + }; 30 + 31 + patches = [ 32 + (fetchpatch { 33 + name = "0001-furnace-fix-wrong-include-path.patch"; 34 + url = "https://github.com/tildearrow/furnace/commit/456db22f9d9f0ed40d74fe50dde492e69e901fcc.patch"; 35 + sha256 = "17ikb1z9ldm7kdj00m4swsrq1qx94vlzhc6h020x3ryzwnglc8d3"; 36 + }) 37 + ]; 38 + 39 + postPatch = '' 40 + # rtmidi is not used yet 41 + sed -i -e '/add_subdirectory(extern\/rtmidi/d' -e '/DEPENDENCIES_LIBRARIES rtmidi/d' CMakeLists.txt 42 + ''; 43 + 44 + nativeBuildInputs = [ 45 + cmake 46 + pkg-config 47 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 48 + makeWrapper 49 + ]; 50 + 51 + buildInputs = [ 52 + fmt_8 53 + libsndfile 54 + SDL2 55 + zlib 56 + ] ++ lib.optionals withJACK [ 57 + libjack2 58 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 59 + Cocoa 60 + ]; 61 + 62 + cmakeFlags = [ 63 + "-DBUILD_GUI=${if withGUI then "ON" else "OFF"}" 64 + "-DSYSTEM_FMT=ON" 65 + "-DSYSTEM_LIBSNDFILE=ON" 66 + "-DSYSTEM_ZLIB=ON" 67 + "-DSYSTEM_SDL2=ON" 68 + "-DWITH_JACK=${if withJACK then "ON" else "OFF"}" 69 + "-DWARNINGS_ARE_ERRORS=ON" 70 + ]; 71 + 72 + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 73 + # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a 74 + # bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access 75 + # to /usr/bin/hdiutil). So we'll manually assemble & install everything instead. 76 + 77 + mkdir -p $out/{Applications/Furnace.app/Contents/{MacOS,Resources},share/{,doc,licenses}/furnace} 78 + mv $out/{bin,Applications/Furnace.app/Contents/MacOS}/furnace 79 + makeWrapper $out/{Applications/Furnace.app/Contents/MacOS,bin}/furnace 80 + 81 + install -m644 {../res,$out/Applications/Furnace.app/Contents}/Info.plist 82 + install -m644 ../res/icon.icns $out/Applications/Furnace.app/Contents/Resources/Furnace.icns 83 + install -m644 {..,$out/share/licenses/furnace}/LICENSE 84 + cp -r ../papers $out/share/doc/furnace/ 85 + cp -r ../demos $out/share/furnace/ 86 + ''; 87 + 88 + passthru.updateScript = nix-update-script { 89 + attrPath = pname; 90 + }; 91 + 92 + meta = with lib; { 93 + description = "Multi-system chiptune tracker compatible with DefleMask modules"; 94 + homepage = "https://github.com/tildearrow/furnace"; 95 + license = with licenses; [ gpl2Plus ]; 96 + maintainers = with maintainers; [ OPNA2608 ]; 97 + platforms = platforms.all; 98 + }; 99 + }
+4
pkgs/top-level/all-packages.nix
··· 25301 25302 fnott = callPackage ../applications/misc/fnott { }; 25303 25304 gg-scm = callPackage ../applications/version-management/git-and-tools/gg { }; 25305 25306 gigalixir = with python3Packages; toPythonApplication gigalixir;
··· 25301 25302 fnott = callPackage ../applications/misc/fnott { }; 25303 25304 + furnace = callPackage ../applications/audio/furnace { 25305 + inherit (darwin.apple_sdk.frameworks) Cocoa; 25306 + }; 25307 + 25308 gg-scm = callPackage ../applications/version-management/git-and-tools/gg { }; 25309 25310 gigalixir = with python3Packages; toPythonApplication gigalixir;