mygui: refactor

Removes a wide `with` scope, replaces `rec` with `finalAttrs`, adopts the package and adds a `meta.changelog` entry.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>

+18 -10
+18 -10
pkgs/by-name/my/mygui/package.nix
··· 19 19 let 20 20 renderSystem = if withOgre then "3" else "4"; 21 21 in 22 - stdenv.mkDerivation rec { 22 + stdenv.mkDerivation (finalAttrs: { 23 23 pname = "mygui"; 24 24 version = "3.4.3"; 25 25 26 + __structuredAttrs = true; 27 + strictDeps = true; 28 + 26 29 src = fetchFromGitHub { 27 30 owner = "MyGUI"; 28 31 repo = "mygui"; 29 - rev = "MyGUI${version}"; 32 + tag = "MyGUI${finalAttrs.version}"; 30 33 hash = "sha256-qif9trHgtWpYiDVXY3cjRsXypjjjgStX8tSWCnXhXlk="; 31 34 }; 32 35 ··· 62 65 63 66 # Tools are disabled due to compilation failures. 64 67 cmakeFlags = [ 65 - "-DMYGUI_BUILD_TOOLS=OFF" 66 - "-DMYGUI_BUILD_DEMOS=OFF" 67 - "-DMYGUI_RENDERSYSTEM=${renderSystem}" 68 - "-DMYGUI_DONT_USE_OBSOLETE=ON" 68 + (lib.cmakeBool "MYGUI_BUILD_DEMOS" false) 69 + (lib.cmakeBool "MYGUI_BUILD_TOOLS" false) 70 + (lib.cmakeBool "MYGUI_DONT_USE_OBSOLETE" true) 71 + (lib.cmakeFeature "MYGUI_RENDERSYSTEM" renderSystem) 69 72 ]; 70 73 71 - meta = with lib; { 74 + meta = { 72 75 homepage = "http://mygui.info/"; 76 + changelog = "https://github.com/MyGUI/mygui/releases/tag/MyGUI${finalAttrs.version}"; 73 77 description = "Library for creating GUIs for games and 3D applications"; 74 - license = licenses.mit; 75 - platforms = platforms.unix; 78 + maintainers = with lib.maintainers; [ sigmasquadron ]; 79 + license = lib.licenses.mit; 80 + platforms = lib.platforms.unix; 81 + 82 + # error: implicit instantiation of undefined template 'std::char_traits' 83 + badPlatforms = lib.platforms.darwin; 76 84 }; 77 - } 85 + })