update openmodelica
This commit is contained in:
@@ -238,6 +238,10 @@ in
|
|||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
|
nix.settings.trusted-users = [
|
||||||
|
"root"
|
||||||
|
"allen"
|
||||||
|
];
|
||||||
|
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,25 @@
|
|||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# custom settings
|
# custom settings
|
||||||
settings = {
|
settings = {
|
||||||
env.TERM = "alacritty";
|
env.TERM = "alacritty";
|
||||||
font = { size = 14; };
|
font = {
|
||||||
|
size = 14;
|
||||||
|
};
|
||||||
window = {
|
window = {
|
||||||
opacity = 1.0;
|
opacity = 1.0;
|
||||||
padding.x = 50;
|
padding.x = 7;
|
||||||
padding.y = 50;
|
padding.y = 7;
|
||||||
};
|
};
|
||||||
scrolling.multiplier = 5;
|
scrolling.multiplier = 5;
|
||||||
selection.save_to_clipboard = true;
|
selection.save_to_clipboard = false;
|
||||||
colors = { primary = { background = "#040404"; }; };
|
colors = {
|
||||||
|
primary = {
|
||||||
|
background = "#040404";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ let
|
|||||||
desktopItem = pkgs.makeDesktopItem {
|
desktopItem = pkgs.makeDesktopItem {
|
||||||
name = "openmodelica";
|
name = "openmodelica";
|
||||||
desktopName = "OpenModelica Connection Editor";
|
desktopName = "OpenModelica Connection Editor";
|
||||||
exec = "OMEdit";
|
exec = "env QT_QPA_PLATFORM=xcb QT_QPA_PLATFORMTHEME=qt6ct OMEdit";
|
||||||
icon = "openmodelica";
|
icon = "openmodelica";
|
||||||
categories = [
|
categories = [
|
||||||
"Development"
|
"Development"
|
||||||
@@ -14,81 +14,86 @@ let
|
|||||||
];
|
];
|
||||||
comment = "Modelica-based modeling and simulation environment";
|
comment = "Modelica-based modeling and simulation environment";
|
||||||
};
|
};
|
||||||
in
|
|
||||||
|
|
||||||
with pkgs;
|
openmodelica-core = pkgs.stdenv.mkDerivation {
|
||||||
stdenv.mkDerivation {
|
name = "openmodelica-bin";
|
||||||
name = "openmodelica-bin";
|
version = "custom";
|
||||||
version = "custom";
|
src = pkgs.fetchgit {
|
||||||
src = pkgs.fetchgit {
|
url = "https://github.com/OpenModelica/OpenModelica.git";
|
||||||
url = "https://github.com/OpenModelica/OpenModelica.git";
|
rev = "959f964dadf1b928f03e3c2f74b8f816f95df1ef";
|
||||||
rev = "959f964dadf1b928f03e3c2f74b8f816f95df1ef";
|
fetchSubmodules = true;
|
||||||
fetchSubmodules = true;
|
sha256 = "sha256-3rFIrg7+t/eX2mq21v9AcYhV3Adloa8Sae9uRGtbyrY=";
|
||||||
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
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
in
|
||||||
nativeBuildInputs = with pkgs; [
|
pkgs.symlinkJoin {
|
||||||
cmake
|
name = "openmodelica";
|
||||||
gfortran
|
paths = [
|
||||||
pkg-config
|
openmodelica-core
|
||||||
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
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,4 +109,7 @@ with pkgs;
|
|||||||
exfatprogs
|
exfatprogs
|
||||||
python313Packages.scrapy
|
python313Packages.scrapy
|
||||||
atopile
|
atopile
|
||||||
|
cachix
|
||||||
|
browsh
|
||||||
|
kdePackages.qt6ct
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -15,9 +15,10 @@
|
|||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = [
|
extraPortals = with pkgs; [
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
pkgs.xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-gnome
|
||||||
];
|
];
|
||||||
config.common.default = "*";
|
config.common.default = "*";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user