1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-13 04:04:35 +03:00

mruby-lvgui: drop package

This commit is contained in:
Samuel Dionne-Riel 2020-12-31 16:57:39 -05:00
parent d586952386
commit ac315d791f
3 changed files with 1 additions and 144 deletions

View File

@ -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
];
}

View File

@ -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;
}

View File

@ -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 {