default.nix (1060B)
1 { lib, stdenv, fetchFromGitea, cmake, pkg-config, makeWrapper, SDL2, the-foundation, AppKit }: 2 3 stdenv.mkDerivation rec { 4 pname = "bwh"; 5 version = "1.0.3"; 6 7 src = fetchFromGitea { 8 domain = "git.skyjake.fi"; 9 owner = "skyjake"; 10 repo = "bwh"; 11 rev = "v${version}"; 12 hash = "sha256-POKjvUGFS3urc1aqOvfCAApUnRxoZhU725eYRAS4Z2w="; 13 }; 14 15 nativeBuildInputs = [ cmake pkg-config makeWrapper ]; 16 17 buildInputs = [ SDL2 the-foundation ] ++ lib.optional stdenv.isDarwin AppKit; 18 19 installPhase = lib.optionalString stdenv.isDarwin '' 20 runHook preInstall 21 mkdir -p $out/Applications 22 mv *.app $out/Applications 23 makeWrapper $out/{Applications/Bitwise\ Harmony.app/Contents/MacOS/Bitwise\ Harmony,bin/bitwise-harmony} 24 runHook postInstall 25 ''; 26 27 meta = with lib; { 28 description = "Bitwise Harmony - simple synth tracker"; 29 homepage = "https://git.skyjake.fi/skyjake/bwh"; 30 license = licenses.bsd2; 31 maintainers = with maintainers; [ sikmir ]; 32 platforms = platforms.unix; 33 mainProgram = "bitwise-harmony"; 34 }; 35 }