add openmodelica
This commit is contained in:
@@ -30,6 +30,9 @@ in
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
];
|
||||
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
@@ -61,7 +64,7 @@ in
|
||||
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
dnssec = "allow-downgrade";
|
||||
dnssec = "false";
|
||||
};
|
||||
networking.nameservers = [
|
||||
"1.1.1.1"
|
||||
@@ -207,6 +210,7 @@ in
|
||||
# List packages installed in system profile.
|
||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||
environment.systemPackages = with pkgs; [
|
||||
openmodelica
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
pkg-config
|
||||
wget
|
||||
|
||||
26
flake.nix
26
flake.nix
@@ -17,19 +17,39 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, home-manager, split-monitor-workspaces, ... }@inputs:
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
split-monitor-workspaces,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = { allowUnfree = true; };
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.haskell = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./configuration.nix
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Define the overlay inline or in a separate file
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
openmodelica = final.callPackage ./nixpkgs/openmodelica.nix { };
|
||||
})
|
||||
];
|
||||
}
|
||||
)
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.18.22") (
|
||||
lib.mkDefault pkgs.linuxPackages_6_18
|
||||
);
|
||||
|
||||
# 1050 passthrough
|
||||
boot.extraModprobeConfig =
|
||||
""
|
||||
@@ -100,7 +104,6 @@
|
||||
"defaults"
|
||||
"ssd"
|
||||
"noatime"
|
||||
"noauto"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
16
home.nix
16
home.nix
@@ -1,4 +1,9 @@
|
||||
{ inputs, split-monitor-workspaces, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
split-monitor-workspaces,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@@ -20,7 +25,10 @@
|
||||
"Xft.dpi" = 172;
|
||||
};
|
||||
|
||||
home.packages = let
|
||||
nixpkgs.config.permittedInsecurePackages = [ "qtwebkit-5.212.0-alpha4" ];
|
||||
|
||||
home.packages =
|
||||
let
|
||||
fonts = import ./pkgs/fonts.nix { inherit pkgs; };
|
||||
minecraft = import ./pkgs/minecraft.nix { inherit pkgs; };
|
||||
misc = import ./pkgs/misc.nix { inherit pkgs; };
|
||||
@@ -38,8 +46,8 @@
|
||||
inherit unstable;
|
||||
};
|
||||
|
||||
in fonts ++ minecraft ++ misc ++ network ++ programming ++ tools ++ util
|
||||
++ games ++ unstables;
|
||||
in
|
||||
fonts ++ minecraft ++ misc ++ network ++ programming ++ tools ++ util ++ games ++ unstables;
|
||||
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
94
nixpkgs/openmodelica.nix
Normal file
94
nixpkgs/openmodelica.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
let
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
name = "openmodelica";
|
||||
desktopName = "OpenModelica Connection Editor";
|
||||
exec = "OMEdit";
|
||||
icon = "openmodelica";
|
||||
categories = [
|
||||
"Development"
|
||||
"Science"
|
||||
"Education"
|
||||
];
|
||||
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=";
|
||||
};
|
||||
|
||||
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
|
||||
];
|
||||
}
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
with pkgs; [
|
||||
with pkgs;
|
||||
[
|
||||
radare2
|
||||
# (python3.withPackages (python-pkgs: with python-pkgs; [ jupyter-client ]))
|
||||
# gdb
|
||||
@@ -22,7 +23,14 @@ with pkgs; [
|
||||
gh
|
||||
platformio
|
||||
python313Packages.r2pipe
|
||||
(python313.withPackages(ps: with ps; [ jupyter-client pynvim wand ipykernel ]))
|
||||
(python313.withPackages (
|
||||
ps: with ps; [
|
||||
jupyter-client
|
||||
pynvim
|
||||
wand
|
||||
ipykernel
|
||||
]
|
||||
))
|
||||
python313Packages.pip
|
||||
nodejs
|
||||
go
|
||||
@@ -62,4 +70,5 @@ with pkgs; [
|
||||
libllvm
|
||||
bun
|
||||
jetbrains.rider
|
||||
julia-bin
|
||||
]
|
||||
|
||||
@@ -107,4 +107,6 @@ with pkgs;
|
||||
pev
|
||||
virtiofsd
|
||||
exfatprogs
|
||||
python313Packages.scrapy
|
||||
atopile
|
||||
]
|
||||
|
||||
@@ -17,6 +17,28 @@
|
||||
lxc.enable = true;
|
||||
};
|
||||
|
||||
users.users.root.subUidRanges = [
|
||||
{
|
||||
startUid = 1000;
|
||||
count = 1;
|
||||
}
|
||||
{
|
||||
startUid = 1000000;
|
||||
count = 65536;
|
||||
}
|
||||
];
|
||||
|
||||
users.users.root.subGidRanges = [
|
||||
{
|
||||
startGid = 1000;
|
||||
count = 1;
|
||||
}
|
||||
{
|
||||
startGid = 1000000;
|
||||
count = 65536;
|
||||
}
|
||||
];
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user