diff --git a/nelson.nix b/nelson.nix index da90b56e3a..a367e1e16b 100644 --- a/nelson.nix +++ b/nelson.nix @@ -1,19 +1,27 @@ { - pkgs ? import { }, + pkgs, + zlib, # Compression library + boost, # Boost libraries + openssl, # SSL support + mpi, # MPI support + hdf5, # HDF5 support + curl, # cURL support + libgit2, # Git support + libsndfile, # Sound file support + eigen, # Eigen library + portaudio, # PortAudio support + lapack, # LAPACK support + openblas, # OpenBLAS support + libjack2, # JACK support + taglib, # TagLib support + alsa-oss, # ALSA support + alsa-lib, # ALSA support + matio, # MATIO support + libcxx, # C++ standard library + qt5, # Qt for GUI support }: pkgs.stdenv.mkDerivation { - name = "nelson"; - version = "master"; - - # Source URL for the Nelson source code - src = pkgs.fetchFromGitHub { - owner = "nelson-lang"; - repo = "nelson"; - rev = "master"; - sha256 = "sha256-V6DERgNNv2dUal6lkbu/OtFpJoFKdMRW6HLOQJBZbWk="; # Replace with the actual checksum - }; - buildInputs = [ pkgs.zlib # Compression library pkgs.boost # Boost libraries @@ -23,6 +31,7 @@ pkgs.stdenv.mkDerivation { pkgs.curl # cURL support pkgs.libgit2 # Git support pkgs.libsndfile # Sound file support + pkgs.eigen # Eigen library pkgs.portaudio # PortAudio support pkgs.lapack # LAPACK support pkgs.openblas # OpenBLAS support @@ -33,21 +42,28 @@ pkgs.stdenv.mkDerivation { pkgs.matio # MATIO support pkgs.libcxx # C++ standard library pkgs.qt5.full # Qt for GUI support - pkgs.qt5.wrapQtAppsHook # Wrapper for Qt applications ]; nativeBuildInputs = [ pkgs.cmake # Build system - pkgs.gnumake # Make utility - pkgs.gfortran # Fortran compiler (if needed for certain modules) - pkgs.eigen # Eigen library + pkgs.gfortran # Fortran compiler pkgs.pkg-config # pkg-config for detecting dependencies + pkgs.qt5.wrapQtAppsHook # Wrapper for Qt applications ]; + name = "nelson"; + version = "master"; + + # Source URL for the Nelson source code + src = pkgs.fetchFromGitHub { + owner = "nelson-lang"; + repo = "nelson"; + rev = "master"; + sha256 = "sha256-b7L/ahq39eYDvFLW2BS9kYjS2eR2c+yPsMp0mBBJqLU="; # Replace with the actual checksum + }; + cmakeFlags = [ "-DLGPL_ONLY=ON" - "-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_PREFIX=$out" ]; # Wrap the application with Qt environment variables @@ -57,11 +73,15 @@ pkgs.stdenv.mkDerivation { doCheck = false; + # Enable parallel building + enableParallelBuilding = true; + meta = { description = "Nelson programming language"; homepage = "https://github.com/nelson-lang/nelson"; license = pkgs.lib.licenses.lgpl3Plus; maintainers = with pkgs.lib.maintainers; [ ]; + mainProgram = "nelson"; }; }