+/config
my dotfiles and nix configuration
git clone https://git.julia.blue/+/config
387acb1
main
1# TODO: scale down icon for other sizes 2{ stdenv , fetchFromGitea , meson , ninja , cmake , python3 , xxd , pkg-config , 3libopus , SDL2 , SDL2_mixer , libogg , zlib , makeWrapper , 4libxscrnsaver , libxcursor , libxi , libxfixes , libxrandr , 5makeDesktopItem , copyDesktopItems } : 6stdenv . mkDerivation rec { 7pname = "Apotris" ; 8version = "4.0.2" ; 9 10src = fetchFromGitea { 11domain = "gitea.com" ; 12owner = "akouzoukos" ; 13repo = "apotris" ; 14rev = "v ${ version } " ; 15hash = "sha256-w9uv7A1UIn82ORyyvT8dxWHUK9chVfJ191bnI53sANU=" ; 16fetchSubmodules = true ; 17}; 18 19nativeBuildInputs = [ 20cmake 21meson 22ninja 23python3 24xxd 25pkg-config 26makeWrapper 27copyDesktopItems 28]; 29 30buildInputs = [ 31SDL2 32SDL2_mixer 33libopus 34libogg 35zlib 36libxscrnsaver 37libxcursor 38libxi 39libxfixes 40libxrandr 41]; 42 43desktopItems = [ ( makeDesktopItem { 44desktopName = pname ; name = pname ; exec = pname ; icon = pname ; 45comment = "Block stacking game" ; 46type = "Application" ; 47categories = [ "Game" ]; 48}) ]; 49 50dontUseCmakeConfigure = true ; 51 52postPatch = '' 53patchShebangs tools/bin2s.py 54substituteInPlace source/liba_window.cpp \ 55--replace 'loadAudio("")' 'loadAudio(" ${ builtins . placeholder "out" } / ")' 56'' ; 57 58installPhase = let 59runDir = ''"''${XDG_DATA_HOME-~/.local/share}/apotris"'' ; 60in '' 61runHook preInstall 62 63mkdir -p $out/bin 64mv $pname $out/bin/ 65mv assets $out/ 66 67mkdir -p $out/share/icons/hicolor/256x256/apps/ 68mv ../dist/Apotris-switch.jpg $out/share/icons/hicolor/256x256/apps/ 69 70wrapProgram $out/bin/Apotris --run 'mkdir -p ${ runDir } ' --run 'cd ${ runDir } ' 71 72runHook postInstall 73'' ; 74 75meta . broken = stdenv . hostPlatform . isDarwin ; 76}