Skip to content

Commit

Permalink
chore(nixos) update package after review and advices (#1315)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-numerical-software authored Dec 31, 2024
1 parent 8c32ac6 commit 2b64ba4
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 72 deletions.
76 changes: 4 additions & 72 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,72 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:

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-DbmwDShdBjQXtpXjJ2QyApYxt7g7P13ap1uN3L0MPPc="; # Replace with the actual checksum
};

buildInputs = [
];

nativeBuildInputs = [
pkgs.gcc # C++ compiler
pkgs.cmake # Build system
pkgs.gnumake # Make utility
pkgs.zlib # Compression library
pkgs.boost # Boost libraries
pkgs.openssl # SSL support
pkgs.gfortran # Fortran compiler (if needed for certain modules)
pkgs.eigen # Eigen library
pkgs.mpi # MPI support
pkgs.hdf5 # HDF5 support
pkgs.curl # cURL support
pkgs.libgit2 # Git support
pkgs.libsndfile # Sound file support
pkgs.portaudio # PortAudio support
pkgs.lapack # LAPACK support
pkgs.openblas # OpenBLAS support
pkgs.libjack2 # JACK support
pkgs.taglib # TagLib support
pkgs.alsa-oss # ALSA support
pkgs.alsa-lib # ALSA support
pkgs.matio # MATIO support
pkgs.libcxx # C++ standard library
pkgs.pkg-config # pkg-config for detecting dependencies
pkgs.qt5.full # Qt for GUI support
pkgs.qt5.wrapQtAppsHook # Wrapper for Qt applications
];

buildPhase = ''
cmake . -DLGPL_ONLY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$out
cmake --build . -- -j $(nproc)
'';

installPhase = ''
make install
'';

# Wrap the application with Qt environment variables
postInstall = ''
wrapQtApp $out/bin/nelson
'';

checkPhase = ''
'';

doCheck = false;

meta = {
description = "Nelson programming language";
homepage = "https://github.com/nelson-lang/nelson";
license = pkgs.lib.licenses.lgpl3Plus;
maintainers = with pkgs.lib.maintainers; [ Nelson-numerical-software ];
};

}
{
pkgs ? import <nixpkgs> { },
}:
pkgs.callPackage ./nelson.nix { }
67 changes: 67 additions & 0 deletions nelson.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
pkgs ? import <nixpkgs> { },
}:

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
pkgs.openssl # SSL support
pkgs.mpi # MPI support
pkgs.hdf5 # HDF5 support
pkgs.curl # cURL support
pkgs.libgit2 # Git support
pkgs.libsndfile # Sound file support
pkgs.portaudio # PortAudio support
pkgs.lapack # LAPACK support
pkgs.openblas # OpenBLAS support
pkgs.libjack2 # JACK support
pkgs.taglib # TagLib support
pkgs.alsa-oss # ALSA support
pkgs.alsa-lib # ALSA support
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.pkg-config # pkg-config for detecting dependencies
];

cmakeFlags = [
"-DLGPL_ONLY=ON"
"-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_INSTALL_PREFIX=$out"
];

# Wrap the application with Qt environment variables
postInstall = ''
wrapQtApp $out/bin/nelson
'';

doCheck = false;

meta = {
description = "Nelson programming language";
homepage = "https://github.com/nelson-lang/nelson";
license = pkgs.lib.licenses.lgpl3Plus;
maintainers = with pkgs.lib.maintainers; [ ];
};

}

0 comments on commit 2b64ba4

Please sign in to comment.