NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.04k forks source link

codelite #180297

Open sss123next opened 2 years ago

sss123next commented 2 years ago

Project description A free, open source, C/C++/PHP and JavaScript IDE

Metadata

llvmPackages_14.stdenv.mkDerivation {
          name = "codelite";
#          varsion = "2022-06-29";
          varsion = "2022-07-05";
          src = fetchFromGitHub {
            owner = "eranif";
            repo = "codelite";
#            rev = "dbb9d797ebd77bcfc84f7fc383287c4eedc2c844";
            rev = "4840d1df7ef40b6607267174d17f5ab92fe81531";
#            sha256 = "sha256-FzQUsH7PO7pNnAlo4jDcKIz/OsgOpjOK1Sdumd9h7W0=";
            sha256 = "sha256-nI/RbP71ZxvGZol8X+/lXeSXlKZ1DKVzH10vtIlBE6c=";
            fetchSubmodules = true;
          };
          nativeBuildInputs = [
            cmake
            pkg-config
            which #required for cmake script
          ];
          buildInputs = [
            clang_14
            sqlite
            (wxGTK31-gtk3.overrideAttrs (
              oldAttrs: rec {
                version = "3.1.6";
                src = fetchFromGitHub {
                  owner = "wxWidgets";
                  repo = "wxWidgets";
                  rev = "v${version}";
                  hash = "sha256-8dIItdu8cyYhPGbPuQ3hVsuZR5DA1wPydRaHcBJCHZw=";
                  fetchSubmodules = true;
                };
              }
              )
              )
              pcre
              gtk3
              lldb
              hunspell
            ];
            # Make '#include <hb.h>' Just Work.
            # Do clients expect to use '#include <harfbuzz/hb.h>'?
            NIX_CFLAGS_COMPILE = "-I${harfbuzz.dev}/include/harfbuzz";
            cmakeFlags = [
              "-DWITH_SFTP=0"
              "-DENABLE_SFTP=0"
              "-DUSE_CLANG=1"
              "-DCL_PREFIX=${placeholder "out"}"
            ];
            postPatch = ''
              sed 's/option(ENABLE_STATIC "Enable static build" ON)/option(ENABLE_STATIC "Enable static build" OFF)/g' -i ctags/CMakeLists.txt
              sed 's/set(LIBS -static)//g' -i ctags/CMakeLists.txt
              '';
            }
sss123next commented 1 year ago

fixed issue with gsettings-schemas:

codelite =  with gnome; with gsettings-desktop-schemas; (llvmPackages_15.stdenv.mkDerivation {
          name = "codelite";
          version = "2023-01-30";
          src = fetchFromGitHub {
            owner = "eranif";
            repo = "codelite";
            rev = "b1005a7d2b26552f48700a831f9cebebb46e2281";
            sha256 = "sha256-EwBug9ScSL97rqbNJoC/t9w1GYV9aR9b8UtfeNC4xiM=";
            fetchSubmodules = true;
          };
          nativeBuildInputs = [
            cmake
            pkg-config
            wrapGAppsHook
            which #required for cmake script
          ];
          buildInputs = [
            clang_14
            sqlite
            gsettings-desktop-schemas
            (wxGTK32.overrideAttrs (
              old: rec {
                version = "2023-01-29";
                src = fetchFromGitHub {
                  owner = "wxWidgets";
                  repo = "wxWidgets";
                  rev = "93c65513643a9e5c544d258d06006b449663249d";
                  hash = "sha256-aw74hFogG6ebOap23sKzq8dT7CL6YbqO1MW/sEndMZ8=";
                  fetchSubmodules = true;
                };
                configureFlags = [
                  "--disable-precomp-headers"
                  # This is the default option, but be explicit
                  "--disable-monolithic"
                  "--enable-mediactrl"
                  "--with-nanosvg"
                  "--with-opengl"
                ];
              }
              )
              )
              pcre
              gtk3
              lldb
              hunspell
            ];
            # Make '#include <hb.h>' Just Work.
            # Do clients expect to use '#include <harfbuzz/hb.h>'?
            NIX_CFLAGS_COMPILE = "-I${harfbuzz.dev}/include/harfbuzz";
            cmakeFlags = [
              "-DWITH_SFTP=0"
              "-DENABLE_SFTP=0"
              "-DUSE_CLANG=1"
              "-DCL_PREFIX=${placeholder "out"}"
            ];
            postPatch = ''
              sed 's/option(ENABLE_STATIC "Enable static build" ON)/option(ENABLE_STATIC "Enable static build" OFF)/g' -i ctags/CMakeLists.txt
              sed 's/set(LIBS -static)//g' -i ctags/CMakeLists.txt
              '';
            }
          );
sss123next commented 1 year ago

also, it should build fine with wxGTK32. so probably custom wxGTK is not needed anymore

raspher commented 6 months ago

Seems there is open PR connected to duplicated issue https://github.com/NixOS/nixpkgs/issues/238337