update openmodelica
This commit is contained in:
@@ -238,6 +238,10 @@ in
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
nix.settings.trusted-users = [
|
||||
"root"
|
||||
"allen"
|
||||
];
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
{ ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
# custom settings
|
||||
settings = {
|
||||
env.TERM = "alacritty";
|
||||
font = { size = 14; };
|
||||
font = {
|
||||
size = 14;
|
||||
};
|
||||
window = {
|
||||
opacity = 1.0;
|
||||
padding.x = 50;
|
||||
padding.y = 50;
|
||||
padding.x = 7;
|
||||
padding.y = 7;
|
||||
};
|
||||
scrolling.multiplier = 5;
|
||||
selection.save_to_clipboard = true;
|
||||
colors = { primary = { background = "#040404"; }; };
|
||||
selection.save_to_clipboard = false;
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#040404";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ let
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
name = "openmodelica";
|
||||
desktopName = "OpenModelica Connection Editor";
|
||||
exec = "OMEdit";
|
||||
exec = "env QT_QPA_PLATFORM=xcb QT_QPA_PLATFORMTHEME=qt6ct OMEdit";
|
||||
icon = "openmodelica";
|
||||
categories = [
|
||||
"Development"
|
||||
@@ -14,81 +14,86 @@ let
|
||||
];
|
||||
comment = "Modelica-based modeling and simulation environment";
|
||||
};
|
||||
in
|
||||
|
||||
with pkgs;
|
||||
stdenv.mkDerivation {
|
||||
name = "openmodelica-bin";
|
||||
version = "custom";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/OpenModelica/OpenModelica.git";
|
||||
rev = "959f964dadf1b928f03e3c2f74b8f816f95df1ef";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-3rFIrg7+t/eX2mq21v9AcYhV3Adloa8Sae9uRGtbyrY=";
|
||||
openmodelica-core = pkgs.stdenv.mkDerivation {
|
||||
name = "openmodelica-bin";
|
||||
version = "custom";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/OpenModelica/OpenModelica.git";
|
||||
rev = "959f964dadf1b928f03e3c2f74b8f816f95df1ef";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-3rFIrg7+t/eX2mq21v9AcYhV3Adloa8Sae9uRGtbyrY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cmake
|
||||
gfortran
|
||||
pkg-config
|
||||
qt6.wrapQtAppsHook
|
||||
autoPatchelfHook
|
||||
flex
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
ninja
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
cmake -S . -B build_cmake -GNinja -DOM_USE_CCACHE=OFF -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=$out
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cmake --build build_cmake --parallel $NIX_BUILD_CORES --target install
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cmake --install build_cmake --prefix $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
if [ -d "$out/lib64" ]; then
|
||||
mkdir -p $out/lib
|
||||
cp -rn $out/lib64/* $out/lib/
|
||||
rm -rf $out/lib64
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
cp ${desktopItem}/share/applications/* $out/share/applications/
|
||||
|
||||
# If you have an icon file in your source, install it too
|
||||
# mkdir -p $out/share/icons/hicolor/scalable/apps
|
||||
# cp $src/path/to/icon.svg $out/share/icons/hicolor/scalable/apps/openmodelica.svg
|
||||
'';
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# Compilers and Build Tools
|
||||
|
||||
# Dependencies
|
||||
boost
|
||||
hwloc
|
||||
jdk
|
||||
lapack
|
||||
blas
|
||||
hdf5
|
||||
expat
|
||||
omniorb
|
||||
curl
|
||||
ncurses
|
||||
readline
|
||||
openscenegraph
|
||||
qt6.qt5compat
|
||||
qt6.qtbase
|
||||
qt6.qtwebengine
|
||||
qt6.qtdeclarative
|
||||
qt6.qttools
|
||||
lapack-reference
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cmake
|
||||
gfortran
|
||||
pkg-config
|
||||
qt6.wrapQtAppsHook
|
||||
autoPatchelfHook
|
||||
flex
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
ninja
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
cmake -S . -B build_cmake -GNinja -DOM_USE_CCACHE=OFF -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_INSTALL_PREFIX=$out
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cmake --build build_cmake --parallel $NIX_BUILD_CORES --target install
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cmake --install build_cmake --prefix $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
if [ -d "$out/lib64" ]; then
|
||||
mkdir -p $out/lib
|
||||
cp -rn $out/lib64/* $out/lib/
|
||||
rm -rf $out/lib64
|
||||
fi
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
cp ${desktopItem}/share/applications/* $out/share/applications/
|
||||
|
||||
# If you have an icon file in your source, install it too
|
||||
# mkdir -p $out/share/icons/hicolor/scalable/apps
|
||||
# cp $src/path/to/icon.svg $out/share/icons/hicolor/scalable/apps/openmodelica.svg
|
||||
'';
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# Compilers and Build Tools
|
||||
|
||||
# Dependencies
|
||||
boost
|
||||
hwloc
|
||||
jdk
|
||||
lapack
|
||||
blas
|
||||
hdf5
|
||||
expat
|
||||
omniorb
|
||||
curl
|
||||
ncurses
|
||||
readline
|
||||
openscenegraph
|
||||
qt6.qt5compat
|
||||
qt6.qtbase
|
||||
qt6.qtwebengine
|
||||
qt6.qtdeclarative
|
||||
qt6.qttools
|
||||
lapack-reference
|
||||
in
|
||||
pkgs.symlinkJoin {
|
||||
name = "openmodelica";
|
||||
paths = [
|
||||
openmodelica-core
|
||||
];
|
||||
}
|
||||
|
||||
@@ -109,4 +109,7 @@ with pkgs;
|
||||
exfatprogs
|
||||
python313Packages.scrapy
|
||||
atopile
|
||||
cachix
|
||||
browsh
|
||||
kdePackages.qt6ct
|
||||
]
|
||||
|
||||
@@ -15,9 +15,10 @@
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-gnome
|
||||
];
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user