From ac315d791f2a22ffa7fe46b676d978f92fd95106 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 31 Dec 2020 16:57:39 -0500 Subject: [PATCH] mruby-lvgui: drop package --- .../mrbgems/mruby-lvgui/default.nix | 35 ------ .../mrbgems/mruby-lvgui/lvgui.nix | 103 ------------------ overlay/mruby-builder/overlay.nix | 7 +- 3 files changed, 1 insertion(+), 144 deletions(-) delete mode 100644 overlay/mruby-builder/mrbgems/mruby-lvgui/default.nix delete mode 100644 overlay/mruby-builder/mrbgems/mruby-lvgui/lvgui.nix diff --git a/overlay/mruby-builder/mrbgems/mruby-lvgui/default.nix b/overlay/mruby-builder/mrbgems/mruby-lvgui/default.nix deleted file mode 100644 index 8c2133b3..00000000 --- a/overlay/mruby-builder/mrbgems/mruby-lvgui/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ mrbgems -, callPackage -, fetchFromGitHub -, pkg-config -, buildPackages - -# Configuration -, withSimulator ? false -}: -let - # This is an implementation detail of this gem. - # Even if unusual, let's keep it private. - lvgui = (callPackage ./lvgui.nix { - inherit withSimulator; - }); -in -mrbgems.mkGem { - src = fetchFromGitHub { - repo = "mruby-lvgui"; - owner = "mobile-nixos"; - rev = "c82c82e5326540faa2ac47259adbf6254cd1994f"; - sha256 = "11xpa1fvnv6h0wkjj7h5l4vsyjvbffz4mdcxcdv21nxsdgrsdzdl"; - }; - - gemBuildInputs = [ - lvgui - ] ++ lvgui.buildInputs; - gemNativeBuildInputs = [ - buildPackages.pkg-config - ]; - - requiredGems = with mrbgems; [ - mruby-fiddle - ]; -} diff --git a/overlay/mruby-builder/mrbgems/mruby-lvgui/lvgui.nix b/overlay/mruby-builder/mrbgems/mruby-lvgui/lvgui.nix deleted file mode 100644 index 426e9ae2..00000000 --- a/overlay/mruby-builder/mrbgems/mruby-lvgui/lvgui.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ stdenv -, pkgs -, lib -, fetchFromGitHub -, pkg-config -, SDL2 -, withSimulator ? false -}: - -let - inherit (lib) optional optionals optionalString; - simulatorDeps = [ - SDL2 - ]; - - # Allow libevdev to cross-compile. - libevdev = (pkgs.libevdev.override({ - python3 = null; - })).overrideAttrs({nativeBuildsInputs ? [], ...}: { - nativeBuildInputs = nativeBuildsInputs ++ [ - pkgs.buildPackages.python3 - ]; - }); - libxkbcommon = pkgs.callPackage ( - { stdenv - , libxkbcommon - , meson - , ninja - , pkgconfig - , yacc - }: - - libxkbcommon.overrideAttrs({...}: { - nativeBuildInputs = [ meson ninja pkgconfig yacc ]; - buildInputs = [ ]; - - mesonFlags = [ - "-Denable-wayland=false" - "-Denable-x11=false" - "-Denable-docs=false" - - # This is because we're forcing uses of this build - # to define config and locale root; for stage-1 use. - # In stage-2, use the regular xkbcommon lib. - "-Dxkb-config-root=/NEEDS/OVERRIDE/etc/X11/xkb" - "-Dx-locale-root=/NEEDS/OVERRIDE/share/X11/locale" - ]; - - outputs = [ "out" "dev" ]; - - # Ensures we don't get any stray dependencies. - allowedReferences = [ - "out" - "dev" - stdenv.cc.libc_lib - ]; - }) - - ) {}; - -in - stdenv.mkDerivation { - pname = "lvgui"; - version = "2020-11-20"; - - src = fetchFromGitHub { - repo = "lvgui"; - owner = "mobile-nixos"; - rev = "c94c3916012f5615af027389e77e7a974cc3e634"; - sha256 = "16dfdky5v72jqs9v22h1k73g74bnif6fg52vhxw2k8sh6mw1cmzp"; - }; - - # Document `LVGL_ENV_SIMULATOR` in the built headers. - # This allows the mrbgem to know about it. - # (In reality this should be part of a ./configure step or something similar.) - postPatch = '' - sed -i"" '/^#define LV_CONF_H/a #define LVGL_ENV_SIMULATOR ${if withSimulator then "1" else "0"}' lv_conf.h - ''; - - nativeBuildInputs = [ - pkg-config - ]; - - buildInputs = [ - libevdev - libxkbcommon - ] - ++ optionals withSimulator simulatorDeps - ; - - NIX_CFLAGS_COMPILE = [ - "-DX_DISPLAY_MISSING" - ]; - - makeFlags = [ - "PREFIX=${placeholder "out"}" - ] - ++ optional withSimulator "LVGL_ENV_SIMULATOR=1" - ++ optional (!withSimulator) "LVGL_ENV_SIMULATOR=0" - ; - - enableParallelBuilding = true; - } diff --git a/overlay/mruby-builder/overlay.nix b/overlay/mruby-builder/overlay.nix index d0a7354c..7cbf14c7 100644 --- a/overlay/mruby-builder/overlay.nix +++ b/overlay/mruby-builder/overlay.nix @@ -6,15 +6,10 @@ let # Let's co-opt the `dontDisableStatic` attribute it overrides into a # derivation, let's say, hello... static = if final.hello ? dontDisableStatic then final.hello.dontDisableStatic else false; - mrbgems = final.callPackage ./mrbgems {}; in { hello-mruby = final.callPackage ./hello-mruby {}; - mrbgems = mrbgems // { - mruby-lvgui = final.callPackage ./mrbgems/mruby-lvgui { - mrbgems = mrbgems; - }; - }; + mrbgems = final.callPackage ./mrbgems {}; mruby = (final.callPackage ./mruby {}).overrideAttrs({passthru ? {}, ...}: { passthru = passthru // { builder = final.callPackage ./mruby/builder.nix {