Skip to content

Commit

Permalink
chore(NixOS) update after rereview @TLATER
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-numerical-software committed Jan 1, 2025
1 parent 539b246 commit 17a4da5
Showing 1 changed file with 38 additions and 18 deletions.
56 changes: 38 additions & 18 deletions nelson.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
{
pkgs ? import <nixpkgs> { },
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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";
};

}

0 comments on commit 17a4da5

Please sign in to comment.