eranif / codelite

A multi purpose IDE specialized in C/C++/Rust/Python/PHP and Node.js. Written in C++
https://codelite.org
GNU General Public License v2.0
2.16k stars 461 forks source link

nix/nixos derivation (package) #3035

Open sss123next opened 2 years ago

sss123next commented 2 years ago
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
              '';
            }
eranif commented 2 years ago

can you provide some context? what should I do with this?

sss123next commented 2 years ago

it can be provided as separate script with .nix extension in some docs or packages directory, this code is enough to install codelite on nixos, i have also submitted this to nixpkgs repository ( https://github.com/NixOS/nixpkgs/issues/180297 ), but they have 5+k pending tickets, so processing will take time.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs (within 5 days). Thank you for your contributions.

vpfeiffer commented 2 years ago

Is this still waiting to be added to nixpkgs ?

sss123next commented 2 years ago

unfortunately....

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
              '';
            }
          );
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs (within 5 days). Thank you for your contributions.

sss123next commented 1 year ago

ping.

still not added to nixpkgs...