diff --git a/nix/overlay.nix b/nix/overlay.nix index 522cb87db..32d9d2cbe 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -18,6 +18,7 @@ rec { espresso = final.callPackage ./pkgs/espresso.nix { }; dramsim3 = final.callPackage ./pkgs/dramsim3.nix { }; libspike = final.callPackage ./pkgs/libspike.nix { }; + lvgl = final.callPackage ./pkgs/lvgl.nix { }; libspike_interfaces = final.callPackage ../difftest/spike_interfaces { }; # DynamoCompiler doesn't support python 3.12+ yet diff --git a/nix/pkgs/lvgl.nix b/nix/pkgs/lvgl.nix new file mode 100644 index 000000000..0e3eba32e --- /dev/null +++ b/nix/pkgs/lvgl.nix @@ -0,0 +1,39 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, +}: + +let + preset = "linux-base"; +in + +stdenv.mkDerivation rec { + pname = "lvgl"; + version = "9.2.1"; + + src = fetchFromGitHub { + owner = "lvgl"; + repo = "lvgl"; + rev = "v${version}"; + hash = "sha256-+k2ID3nzwrxuQC/1lR/RrEUNoyHfnjVQd3NpyqakD3g="; + }; + + nativeBuildInputs = [ + cmake + ninja + ]; + + ninjaFlags = [ "-C" preset ]; + + cmakeFlagsArray = [ "--preset" preset ]; + + meta = { + description = "Embedded graphics library to create beautiful UIs for any MCU, MPU and display type"; + homepage = "https://github.com/lvgl/lvgl"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + }; +}