uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, lib, openmodelica, symlinkJoin, gnumake, blas, lapack, makeWrapper }:
|
||||
symlinkJoin {
|
||||
name = "openmodelica-combined";
|
||||
paths = with openmodelica; [
|
||||
omcompiler
|
||||
omsimulator
|
||||
omplot
|
||||
omparser
|
||||
omedit
|
||||
omlibrary
|
||||
omshell
|
||||
];
|
||||
|
||||
buildInputs = [ gnumake makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/OMEdit \
|
||||
--prefix PATH : ${lib.makeBinPath [ gnumake stdenv.cc ]} \
|
||||
--prefix LIBRARY_PATH : "${lib.makeLibraryPath [ blas lapack ]}" \
|
||||
--set-default OPENMODELICALIBRARY "${openmodelica.omlibrary}/lib/omlibrary"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open-source Modelica-based modeling and simulation environment intended for industrial and academic usage";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
17
pkgs/applications/science/misc/openmodelica/default.nix
Normal file
17
pkgs/applications/science/misc/openmodelica/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, newScope, libsForQt5, clangStdenv }:
|
||||
lib.makeScope newScope (self:
|
||||
let
|
||||
callPackage = self.newScope { stdenv = clangStdenv; };
|
||||
callQtPackage = self.newScope (libsForQt5 // { stdenv = clangStdenv; });
|
||||
in
|
||||
{
|
||||
mkOpenModelicaDerivation = callPackage ./mkderivation { };
|
||||
omcompiler = callPackage ./omcompiler { };
|
||||
omplot = callQtPackage ./omplot { };
|
||||
omsimulator = callPackage ./omsimulator { };
|
||||
omparser = callPackage ./omparser { };
|
||||
omedit = callQtPackage ./omedit { };
|
||||
omlibrary = callPackage ./omlibrary { };
|
||||
omshell = callQtPackage ./omshell { };
|
||||
combined = callPackage ./combined { };
|
||||
})
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
# mkOpenModelicaDerivation is an mkDerivation function for packages
|
||||
# from OpenModelica suite.
|
||||
|
||||
{ stdenv, lib, fetchgit, autoconf, automake, libtool, cmake, autoreconfHook, symlinkJoin }:
|
||||
pkg:
|
||||
let
|
||||
inherit (builtins) hasAttr getAttr length elemAt;
|
||||
inherit (lib) attrByPath concatStringsSep;
|
||||
|
||||
|
||||
# A few helpers functions:
|
||||
|
||||
# getAttrDef is just a getAttr with default fallback
|
||||
getAttrDef = attr: default: x: attrByPath [ attr ] default x;
|
||||
|
||||
# getAttr-like helper for optional append to string:
|
||||
# "Hello" + appendByAttr "a" " " {a = "world";} = "Hello world"
|
||||
# "Hello" + appendByAttr "a" " " {} = "Hello"
|
||||
appendByAttr = attr: sep: x: if hasAttr attr x then sep + (getAttr attr x) else "";
|
||||
|
||||
# Are there any OM dependencies at all?
|
||||
ifDeps = length pkg.omdeps != 0;
|
||||
|
||||
# Dependencies of current OpenModelica-target joined in one file tree.
|
||||
# Return the dep itself in case it is a single one.
|
||||
joinedDeps =
|
||||
if length pkg.omdeps == 1
|
||||
then elemAt pkg.omdeps 0
|
||||
else
|
||||
symlinkJoin {
|
||||
name = pkg.pname + "-omhome";
|
||||
paths = pkg.omdeps;
|
||||
};
|
||||
|
||||
# Should we run ./configure for the target pkg?
|
||||
omautoconf = getAttrDef "omautoconf" false pkg;
|
||||
|
||||
# Name of the make target
|
||||
omtarget = getAttrDef "omtarget" pkg.pname pkg;
|
||||
|
||||
# Directory of target sources
|
||||
omdir = getAttrDef "omdir" pkg.pname pkg;
|
||||
|
||||
# Simple to to m4 configuration scripts
|
||||
postPatch = lib.optionalString ifDeps ''
|
||||
sed -i ''$(find -name omhome.m4) -e 's|if test ! -z "$USINGPRESETBUILDDIR"|if test ! -z "$USINGPRESETBUILDDIR" -a -z "$OMHOME"|'
|
||||
'' +
|
||||
appendByAttr "postPatch" "\n" pkg;
|
||||
|
||||
# Update shebangs in the scripts before running configuration.
|
||||
preAutoreconf = "patchShebangs --build common" +
|
||||
appendByAttr "preAutoreconf" "\n" pkg;
|
||||
|
||||
# Tell OpenModelica where built dependencies are located.
|
||||
configureFlags = lib.optional ifDeps "--with-openmodelicahome=${joinedDeps}" ++
|
||||
getAttrDef "configureFlags" [ ] pkg;
|
||||
|
||||
# Our own configurePhase that accounts for omautoconf
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
export configureFlags="''${configureFlags} --with-ombuilddir=$PWD/build --prefix=$prefix"
|
||||
./configure --no-recursion $configureFlags
|
||||
${lib.optionalString omautoconf "(cd ${omdir}; ./configure $configureFlags)"}
|
||||
runHook postConfigure
|
||||
'';
|
||||
|
||||
# Targets that we want to build ourselves:
|
||||
deptargets = lib.forEach pkg.omdeps (dep: dep.omtarget);
|
||||
|
||||
# ... so we ask openmodelica makefile to skip those targets.
|
||||
preBuild = ''
|
||||
for target in ${concatStringsSep " " deptargets}; do
|
||||
touch ''${target}.skip;
|
||||
done
|
||||
'' +
|
||||
appendByAttr "preBuild" "\n" pkg;
|
||||
|
||||
makeFlags = "${omtarget}" +
|
||||
appendByAttr "makeFlags" " " pkg;
|
||||
|
||||
installFlags = "-i " +
|
||||
appendByAttr "installFlags" " " pkg;
|
||||
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (pkg // {
|
||||
inherit omtarget postPatch preAutoreconf configureFlags configurePhase preBuild makeFlags installFlags;
|
||||
|
||||
src = fetchgit (import ./src-main.nix);
|
||||
version = "1.18.0";
|
||||
|
||||
nativeBuildInputs = getAttrDef "nativeBuildInputs" [ ] pkg
|
||||
++ [ autoconf automake libtool cmake autoreconfHook ];
|
||||
|
||||
buildInputs = getAttrDef "buildInputs" [ ] pkg
|
||||
++ lib.optional ifDeps joinedDeps;
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
})
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
url = "https://github.com/OpenModelica/OpenModelica/";
|
||||
rev = "49be4faa5a625a18efbbd74cc2f5be86aeea37bb";
|
||||
sha256 = "0klqiy4sdizl1djb9hb0arcvfcjz2mmnakrjx81mmxcbr8yq2016";
|
||||
fetchSubmodules = true;
|
||||
}
|
||||
# Update with: nix run -f ./nixpkgs/default.nix nix-prefetch-git -c nix-prefetch-git 'https://github.com/OpenModelica/OpenModelica/' 'v1.18.0' --fetch-submodules
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, gfortran
|
||||
, flex
|
||||
, bison
|
||||
, jre8
|
||||
, blas
|
||||
, lapack
|
||||
, curl
|
||||
, readline
|
||||
, expat
|
||||
, pkg-config
|
||||
, buildPackages
|
||||
, targetPackages
|
||||
, libffi
|
||||
, binutils
|
||||
, mkOpenModelicaDerivation
|
||||
}:
|
||||
let
|
||||
isCross = stdenv.buildPlatform != stdenv.hostPlatform;
|
||||
nativeOMCompiler = buildPackages.openmodelica.omcompiler;
|
||||
in
|
||||
mkOpenModelicaDerivation ({
|
||||
pname = "omcompiler";
|
||||
omtarget = "omc";
|
||||
omdir = "OMCompiler";
|
||||
omdeps = [ ];
|
||||
omautoconf = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
jre8
|
||||
gfortran
|
||||
flex
|
||||
bison
|
||||
pkg-config
|
||||
] ++ lib.optional isCross nativeOMCompiler;
|
||||
|
||||
buildInputs = [ targetPackages.stdenv.cc.cc blas lapack curl readline expat libffi binutils ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e '/^\s*AR=ar$/ s/ar/${stdenv.cc.targetPrefix}ar/
|
||||
/^\s*ar / s/ar /${stdenv.cc.targetPrefix}ar /
|
||||
/^\s*ranlib/ s/ranlib /${stdenv.cc.targetPrefix}ranlib /' \
|
||||
$(find ./OMCompiler -name 'Makefile*')
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
for entry in $(find $out -name libipopt.so); do
|
||||
patchelf --shrink-rpath --allowed-rpath-prefixes /nix/store $entry
|
||||
patchelf --set-rpath '$ORIGIN':"$(patchelf --print-rpath $entry)" $entry
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modelica compiler from OpenModelica suite";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
} // lib.optionalAttrs isCross {
|
||||
configureFlags = [ "--with-omc=${nativeOMCompiler}/bin/omc" ];
|
||||
})
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{ lib
|
||||
, jre8
|
||||
, qmake
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtwebkit
|
||||
, qtxmlpatterns
|
||||
, binutils
|
||||
, wrapQtAppsHook
|
||||
, openmodelica
|
||||
, mkOpenModelicaDerivation
|
||||
}:
|
||||
with openmodelica;
|
||||
mkOpenModelicaDerivation rec {
|
||||
pname = "omedit";
|
||||
omdir = "OMEdit";
|
||||
omdeps = [ omcompiler omplot omparser omsimulator ];
|
||||
omautoconf = true;
|
||||
|
||||
nativeBuildInputs = [ jre8 qmake qtbase qttools wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ qtwebkit qtxmlpatterns binutils ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i ''$(find -name qmake.m4) -e '/^\s*LRELEASE=/ s|LRELEASE=.*$|LRELEASE=${lib.getDev qttools}/bin/lrelease|'
|
||||
'';
|
||||
|
||||
dontUseQmakeConfigure = true;
|
||||
QMAKESPEC = "linux-clang";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Modelica connection editor for OpenModelica";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchgit
|
||||
, bash
|
||||
, pkg-config
|
||||
, jre8
|
||||
, libuuid
|
||||
, openmodelica
|
||||
, mkOpenModelicaDerivation
|
||||
}:
|
||||
let
|
||||
fakegit = import ./fakegit.nix { inherit lib stdenv fetchgit bash; };
|
||||
in
|
||||
mkOpenModelicaDerivation {
|
||||
pname = "omlibrary";
|
||||
omdir = "libraries";
|
||||
omtarget = "omlibrary-all";
|
||||
omdeps = [ openmodelica.omcompiler ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build libraries
|
||||
cp -fv ${fakegit}/bin/checkout-git.sh libraries/checkout-git.sh
|
||||
|
||||
# The EMOTH library is broken in OpenModelica 1.17.0
|
||||
# Let's remove it from targets.
|
||||
sed -i -e '/^OTHER_LIBS=/ s/EMOTH //' libraries/Makefile.libs
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A collection of Modelica libraries to use with OpenModelica,
|
||||
including Modelica Standard Library";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
{ lib, stdenv, fetchgit, bash }:
|
||||
let
|
||||
mkscript = path: text: ''
|
||||
mkdir -pv `dirname ${path}`
|
||||
cat > ${path} <<"EOF"
|
||||
#!${bash}/bin/bash
|
||||
ME=$(basename ${path})
|
||||
${text}
|
||||
EOF
|
||||
sed -i "s@%out@$out@g" ${path}
|
||||
chmod +x ${path}
|
||||
'';
|
||||
|
||||
hashname = r:
|
||||
let
|
||||
rpl = lib.replaceChars [ ":" "/" ] [ "_" "_" ];
|
||||
in
|
||||
(rpl r.url) + "-" + (rpl r.rev);
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "fakegit";
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -pv $out/repos
|
||||
${lib.concatMapStrings
|
||||
(r: "cp -r ${fetchgit r} $out/repos/${hashname r}\n")
|
||||
(import ./src-libs.nix)}
|
||||
|
||||
${mkscript "$out/bin/checkout-git.sh" ''
|
||||
if test "$#" -ne 4; then
|
||||
echo "Usage: $0 DESTINATION URL GITBRANCH HASH"
|
||||
exit 1
|
||||
fi
|
||||
DEST=$1
|
||||
URL=`echo $2 | tr :/ __`
|
||||
GITBRANCH=$3
|
||||
REVISION=$4
|
||||
|
||||
REVISION=`echo $REVISION | tr :/ __`
|
||||
|
||||
rm -rf $DEST
|
||||
mkdir -pv $DEST
|
||||
echo "FAKEGIT cp -r %out/repos/$URL-$REVISION $DEST" >&2
|
||||
cp -r %out/repos/$URL-$REVISION/* $DEST
|
||||
chmod u+w -R $DEST
|
||||
''}
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
[
|
||||
{ url = "https://github.com/modelica-3rdparty/AdvancedNoise.git"; rev = "5ce57acd279dadd0d25b76a6b02d3f9e9d061246"; sha256 = "07jjbj0y6bak269md3xniqb5lgc33m92ar5qixqxj5yxdjaahfs2"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/RWTH-EBC/AixLib.git"; rev = "65e49ddf5c935846888a61aa303e52c909619079"; sha256 = "18xn8j3x3j4x9bpjgqnq0b6p3yzzsg5n62fv1ldqbbjcmi0vimd5"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/RWTH-EBC/AixLib.git"; rev = "v0.4.0"; sha256 = "0dw34mjq29n55xh51g1c9a9d0d8gbpn16gj309dfxn4v2hbnfvzx"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/AlgebraTestSuite.git"; rev = "b937e1a7f447138c59abec9b2092f84f16bf02e8"; sha256 = "0406inasx61dk7vcnziiyhxkna7g61a5hn0znnbxj817hz6q11zn"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ApproxSpline.git"; rev = "28420f5c1a88c9cd069defbd8c05e4a78a090675"; sha256 = "07gpyi2brj5zpvrlsnflqjnhbrgxvpqbdshp8lp4lh9mnj5jv95d"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/OpenModelica/BioChem.git"; rev = "v1.0.2"; sha256 = "037bvj2lqrslg8k5r0rjgdzccslj9bj25b55k4g440vabm5p05qm"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/BondGraph.git"; rev = "20c23e60d12989bd4668ccac47659d82d39d29cc"; sha256 = "0yrkk708v4bvf423xb4zgpmnaj8qhq5primdg758ayddgli23wa9"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/BrineProp.git"; rev = "834fb3519ca8f89efe268582d39d00a7c3991150"; sha256 = "1iwqh4kr36wgxc0gci63gdgbqln2sap1w4bkydk1vkss2s302lg4"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/EDF-TREE/BuildSysPro.git"; rev = "v3.3.0"; sha256 = "1cvcany3q9p1xndarxa2d8mmqxdnqk22476q8l61nayz5qy25x61"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/BuildingControlLib.git"; rev = "v1.0.0"; sha256 = "0ckdxway0m755mbrl94k4458sijzgknlzsrf7xs5bjymxchm8r2m"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/BuildingSystems.git"; rev = "c3070d48015ee75c1577f349cb388a498bef7270"; sha256 = "0r876wm6f1xx4cli1lqlylpl3zgaddmy06hcafbnzry9j38vbz4y"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/lbl-srg/modelica-buildings.git"; rev = "v6.0.0"; sha256 = "0rnnk1clji0myzr7adggki6knbl6v8381vwnqgiz8mkxbmzdwm4f"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/lbl-srg/modelica-buildings.git"; rev = "v7.0.0"; sha256 = "04n04pp4zvyg8n8h7h79c3wyk7lmn940mh7qzs0lv76g1ybypnlz"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Chemical.git"; rev = "5645573fced862430b7b598b4d7ec1a39c7aa0fa"; sha256 = "1kh7kpmjfz55pb8553srlnrh8l00nw21xf5mjzh7nx9b1rndnmyg"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/DeployStructLib.git"; rev = "v1.0"; sha256 = "1k4zw9lnd0javw4zigxc15l58yf7xdz36b7808g65qxy89w6ksr2"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/DisHeatLib.git"; rev = "b11f53379c122870a52f2da9b1705d2c911cd21d"; sha256 = "1vm96a4z0b40r0nisxrrzyvan4yphjdkx4ad655phva2636xb5rr"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/AHaumer/DriveControl.git"; rev = "b7233fd97a92867bb4ec2c3647c7f7e888398644"; sha256 = "0nyp1n8wrkjzfypsmjjzac0g9p4wbc1cxxr040fj20bqdg9l3h1b"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/christiankral/ElectroMechanicalDrives.git"; rev = "v2.2.0"; sha256 = "0012phmn1y9fgpph45lwbjk0yhm5czidf2z6khm8lddvk93wf31b"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ExternData.git"; rev = "v2.5.0"; sha256 = "19dsyq1mk5vl54fqaffzqafm5w94l011cy7pg16c7i933dbqnkki"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/ExternalMedia.git"; rev = "6138312c96142ff3c01190147e6277991bfa2fca"; sha256 = "1d9g2hbdvgz13j7kdi1kglkkllj9f00x3dwdp5piyypvs464jsn5"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ExternalMemoryLib.git"; rev = "6488d5815bda23c665123baa916789e283e16d2c"; sha256 = "06y1i5w690b3b9x23nzls8y67fl7yd7bn4xl5j0dmyi4qx33aqda"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/FMITest.git"; rev = "a67a276083f4010b249802ad8fc70dc30c09adfd"; sha256 = "0mg8jlvlwql2nsjiy7c3rdibv73bkfk149ac0450d5pc0hfn9mln"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/FailureModes.git"; rev = "v1.2.1"; sha256 = "1z8bwrld1rkydgssab5gnrd76frrbky8qxi1lvlaf2jidj6bzn1l"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/FaultTriggering.git"; rev = "v0.6.6"; sha256 = "0a08yyrbg4a49s0bgqgyds6pidx9xr47yspvl9bdak1mq34qibip"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/FeedDriveLibrary.git"; rev = "1.0.1"; sha256 = "15fi9dj6zgl0fr90cwxqjbpphj0dwrrmk74hf25j6zd85w2ycqdz"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/DLR-SR/FractionalOrder.git"; rev = "99918820e346c362c3ad52d782c8215e5deeac4c"; sha256 = "1pycss6fqh86frfdbdfffjhaz09fz1558f9azgckhf8drx6ry1qs"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Greenhouses-Library.git"; rev = "89ae0e8097eb0751abce2013d304fa5f9c09b885"; sha256 = "1q77xj6aysqsn3d7kjmcq7dihbw18iqm35ifzdi75xgf3cgwla4f"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/christiankral/HanserModelica.git"; rev = "v1.1.0"; sha256 = "0zwkrhg2y42m18p4z51izrickiv1vikgz0z7fpjia4dbppckav8i"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/HelmholtzMedia.git"; rev = "3b4a4bca94d388744b2d045344ea2f9b0b4d405b"; sha256 = "17fzpan89075vb5vbhw5ylgxcdsmj2vjnmmka7cgzh06izb69nvh"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/ibpsa/modelica-ibpsa.git"; rev = "v3.0.0"; sha256 = "0xwgfndlw76zfmiiqadl85l9na9igsqlmfcawx526sdw2lhhgics"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/open-ideas/IDEAS.git"; rev = "v2.1.0"; sha256 = "0xp0zg6ib5536d5vl361lsn5w5faqdf6djhcmfxns629wjima8rn"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/IndustrialControlSystems.git"; rev = "v1.1.0"; sha256 = "1nvgx94iy1pws0768anrl7ssjlzslb5mbp21j7xvf6wpqfmj0npc"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/christiankral/KeyWordIO.git"; rev = "v0.9.0"; sha256 = "10kvj6zn2r6m3403ja8nkkxbfcchkz0pfk3g70ibr76zivxb5nim"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/FishSim/LibRAS.git"; rev = "fca9de50a484a2213f3ca1b39e275c237c471688"; sha256 = "0w1c87sifq8klq0f2l70qxjrlvahyxy1cx9rln80rni4d427yc1k"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/LinearMPC.git"; rev = "v1.0"; sha256 = "1crj60i5f33l9pgip0xbv6ankcga7px0644cj7c2wnzn1fjmn2k8"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/looms-polimi/MEV.git"; rev = "v1.0.1"; sha256 = "1a7ih9lc01wzaq8a8aznggpi4aqnczyzq49q5hc4fqvmfwl7l0j3"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ModPowerSystems.git"; rev = "df3afce27d5e935c4111f392275744a655abe216"; sha256 = "1b1fikm92lv6gj82imka3hxbjwv04i4h33y69yhcxdpqa6z6hm4z"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/OpenModelica/OpenModelica-ModelicaStandardLibrary.git"; rev = "4a91d52248b0f17415bba1d58881fc730bd94215"; sha256 = "19caxz6hvlrsls3b2387a24zwwnykbb138jpb42gwpy8jlh93yzi"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/OpenModelica/OpenModelica-ModelicaStandardLibrary.git"; rev = "cab27240a4a3ed4ea137226f056bbc0d79543f7a"; sha256 = "06y911i2hs7hg4ykhb8wngvxhwnaww8rsakwa7ssd047a7glzsb0"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Modelica-Arduino.git"; rev = "v0.1.0"; sha256 = "1n34dksqhrn1synv2mp2ifk4dxyhp15f5v1jb1b3dbw9n19951qb"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Modelica-GNU_ScientificLibrary.git"; rev = "9235ab28bdd7f0fe3e7abba48af53d73332858ec"; sha256 = "168g9gg12lfa863ifs41bnx6yd0yyjnal6986dgpm51dj5arw6id"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Modelica-MVEM.git"; rev = "v1.0.1"; sha256 = "1p68691dnl06lgwm4bl9g036brn4vl7m5x3gq4rxc291339frixk"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ModelicaADS.git"; rev = "v1.0.1"; sha256 = "0fhxrl07d7v3wa79d30psm1gxydc0p7s2akfirdx6dai0633skp9"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/xogeny/ModelicaBook.git"; rev = "v0.6.0"; sha256 = "0yqbll6p738yvpi1x11cjngpz2glda07mljrkjlm23p7l53x63dc"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-compliance/compliance.git"; rev = "8a91e75d8a26acc4de30fc0e5d5e9db83c970bd6"; sha256 = "1cym1wlgsvfrryq8zqzzrgs4wam1l7pc20q07hk3d615nhq21lg6"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ModelicaDFR.git"; rev = "37a441934d05330cf3d13e9ec551954d27eca84c"; sha256 = "13rpcs8cl9x15vi655150zmhmg1iaxpzvxrl3rqif46zpl5dhlj2"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/Modelica_DeviceDrivers.git"; rev = "v1.8.2"; sha256 = "16c0p9zn0qrraz59ivinibmikdd251plm1vqngznzhksjwvz6bja"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/Modelica_LinearSystems2.git"; rev = "v2.3.5"; sha256 = "0rzicynqgayydxqynnairxk7ybg4alv1xnfz8cgkrpicl2g9bacg"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Modelica_Requirements.git"; rev = "a427b5cb7997e9036c577d219e6b8a5d0c28389a"; sha256 = "1ihx46kifnfi9kw1g8nmd9sarl766whbzdk6a44alczsya4gg45k"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/Modelica_Synchronous.git"; rev = "c8350276bfd945086962cf4150ba941b9c57ed13"; sha256 = "12ad7fpjy50ky3lvl65r9d5xvlzvw5yqdnbp4rsgl3qw7s3wrmja"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/jwindahlModelon/MultiPhaseMixtureMedia.git"; rev = "0bda0c58af6384f8e0edf7aa7520afb369af3e38"; sha256 = "11bqm69504bh4h05dxlwdmjfxwls06mr49cz47kl8jmrygkfi4i2"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/OpenIPSL/OpenIPSL.git"; rev = "v1.5.0"; sha256 = "09xrcz0rdxdy220ki5zyl7920y0a4lg24p0aibna4ad15vszhhwj"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Optimisers.git"; rev = "e33c69edaad6dad8029167b0ca00533964a6fe37"; sha256 = "0hcxsrr2n4fzaxdjvgvqayz38kpfk86cclvg5pzcfmjc5bznb8bs"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/lochel/PNlib.git"; rev = "059545d48dd9ceeccfa3b4e47689ec8dd334dcd8"; sha256 = "1a0hxkgsi4klw9c8zav1dy2p1c85ald29gx82hfacwv55xl9f127"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/PVSystems.git"; rev = "v0.6.2"; sha256 = "0vcgvdaqfbn46lpzk0kvsif3d55wf8yzhkbdpf5zv04kv7zw25w9"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/PhotoVoltaics.git"; rev = "v1.6.0"; sha256 = "0zqx77z217iln3vfxn2v3c2jl0jz5kgcd96ylvimjnwr30mxr09n"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/MarekMatejak/Physiolibrary.git"; rev = "v2.3.1"; sha256 = "0nxfw63m278gaff18zz29n2s1vk4kwdbv2qvbjmcq86fl1i5b3bg"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Physiomodel.git"; rev = "v1.0.0"; sha256 = "1sdhv5qgjqv3zdq57pkkrh04ainwv9n5zqd8mb9a3ybjmwdjf6f9"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/dzimmer/PlanarMechanics.git"; rev = "55224a9e76de8aa7f708236bd4d7dee624ecba50"; sha256 = "0hf7vi44adss86x5ahk5if7bdjgw773d8mb3d8ianq12g8azycyd"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/PowerGrids/PowerGrids.git"; rev = "v1.0.0"; sha256 = "06bx8mqvmizhfwg99djdfgh2mblc4wzmg0zq4ilrp586jwfninmz"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/PowerSystems.git"; rev = "v1.0.0"; sha256 = "1xwhwich7gi6vl33zl2r78xdjklchgkjcnvww6390j20l1wjznkn"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/PowerSystems.git"; rev = "f0721333f4875143565147a7d043bee1c300873b"; sha256 = "0gbvx0gzf3akb0w7yvdxfq2y4ps91cy5b93iwnvnw7652x716813"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/RealTimeCoordinationLibrary.git"; rev = "v1.0.2"; sha256 = "0ch4la04hm059ii5wzph9gsbvqhnfqrvvpqi57qn27bm10c4la0m"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/casella/ScalableTestSuite.git"; rev = "v1.11.5"; sha256 = "0bhj1q9b8d29nrbr253zszy1w1yvyizvyr3law1pqjj6mhbqmg4i"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Servomechanisms.git"; rev = "3bf82ba5d3f31b4a0ae05f99ae690037358e153e"; sha256 = "1swka7d58wkg5pqv59lqgfi7gv6rg5vra4j6r76pn9czx9ddal8w"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/SolarTherm/SolarTherm.git"; rev = "203fb5af3b95c731c7fcbe2833d51fd420e80796"; sha256 = "1bh4y4igzd0k59xm8j14p52gnlbwkiwwy6bhhyarpr361yrchn33"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/Soltermica.git"; rev = "9f7224bd89335f95dffe1ccdaa094df5a3279fdf"; sha256 = "1bif3cnwjas6x7b8ahwkm7dbrqrfdqwwa26zmdc6zrpfncl3kqd0"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/SystemDynamics.git"; rev = "2f6bd9382c5aac2aff9148cd9113a418767734b6"; sha256 = "0ii2mj6ngwjir3gzyad8wsj86pvd6wzal91nz2y7gzwj1djchb3x"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/thom-marx/ThermalSeparation.git"; rev = "ffa0495ba829ecab105be4bfb3b7652625ec9c03"; sha256 = "1czm97bcrpp2jv0a0kd31a929wqlrlzdhdxvyy4w499dn20jzv1l"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/casella/ThermoPower.git"; rev = "650be2c8cbd5abc3535e92b865e509073afc8aeb"; sha256 = "08ijrx8xw43dadz5s3kiwa17ax9faq2wyq9gm0vlz9ddbkj0hcaq"; fetchSubmodules = true; }
|
||||
{ url = "https://openmodelica.org/git/ThermoSysPro.git"; rev = "db81ae1b5a6a85f6c6c7693244cafa6087e18ff5"; sha256 = "12fsf0xxxc1ja6vmm9ff85f8j5sg1lb7w4g57s2w3fkf4d3a7d0c"; fetchSubmodules = true; }
|
||||
{ url = "https://openmodelica.org/git/ThermoSysPro.git"; rev = "5cef9acb4dedf8af6f4638a4448f08a544ebd30b"; sha256 = "0ihnz1s4rs42yis9zym9nw29ia2lqz2yx2wblc50p6f221w7q78s"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/lenaRB/VVDRlib.git"; rev = "eae4981674642eddffc7f2aa3690320fcaddee0e"; sha256 = "0qxxk2xlas5mqyc1h8ndic208qj1sm5mr5y8664kv3py7i8jdqi4"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica/VehicleInterfaces.git"; rev = "v1.2.5"; sha256 = "044k17cpc88wprrvw03p6crm6dy6x9a6xj5104d5nln71lqz5sdq"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/WasteWater.git"; rev = "v2.1.0"; sha256 = "1dxr4m9j7b5266daj4klbrhvnkqr73sximdw9bk9v5qf0s28li99"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/WindPowerPlants.git"; rev = "v1.2.0"; sha256 = "1lyrqwsb6sm1wc7vlj72zk5cpjhhzh27fviiqayddqy2b903xish"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/ipsl.git"; rev = "v1.1.1"; sha256 = "1w2iah8c5d8n01wmxydjk0rrcxh88g8yjy2zmv403azcccq7byzp"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/modelica-3rdparty/netCDF-DataReader.git"; rev = "v2.5.0"; sha256 = "1pd5xf5bgz010lryv8bj6lvlfqn9p184csiffwj8icx7rycnlcqb"; fetchSubmodules = true; }
|
||||
{ url = "https://github.com/joewa/open-bldc-modelica.git"; rev = "58a83b5b36f267613de4676c95163489b1ddc2e7"; sha256 = "0wf6dn64d2psv9b3xg5227vzpk109r3dqzi4m2wwhrilaxs3v004"; fetchSubmodules = true; }
|
||||
]
|
||||
39
pkgs/applications/science/misc/openmodelica/omlibrary/update-src-libs.sh
Executable file
39
pkgs/applications/science/misc/openmodelica/omlibrary/update-src-libs.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p bash
|
||||
|
||||
CWD=$PWD
|
||||
|
||||
chko() {
|
||||
(
|
||||
T=`mktemp -d`
|
||||
trap "rm -rf $T" EXIT INT PIPE
|
||||
cd $T
|
||||
cat >check.nix <<EOF
|
||||
with import <nixpkgs> {};
|
||||
fetchgit `cat $CWD/../mkderivation/src-main.nix`
|
||||
EOF
|
||||
nix-build check.nix
|
||||
cat result/libraries/Makefile.libs
|
||||
)
|
||||
}
|
||||
|
||||
getsha256() {
|
||||
URL=$(echo "$1" | sed 's/^"\(.*\)"$/\1/')
|
||||
REV=$(echo "$2" | sed 's/^"\(.*\)"$/\1/')
|
||||
SHA=$(nix run nixpkgs.nix-prefetch-git -c nix-prefetch-git --fetch-submodules "$URL" "$REV" 2>/dev/null | sed -n 's/.*"sha256": "\(.*\)",/\1/g p')
|
||||
echo "{ url = $1; rev = $2; sha256 = \"$SHA\"; fetchSubmodules = true; }"
|
||||
}
|
||||
|
||||
OUT=src-libs.nix
|
||||
|
||||
echo '[' > $OUT
|
||||
|
||||
chko |
|
||||
grep checkout-git.sh |
|
||||
tr \' \" |
|
||||
while read NM TGT URL BR REV ; do
|
||||
echo Trying $TGT $URL $REV >&2
|
||||
getsha256 $URL $REV >> $OUT || exit 1
|
||||
done
|
||||
|
||||
echo ']' >> $OUT
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -23,7 +23,7 @@
|
||||
omedit-testsuite: omedit-testsuite.skip
|
||||
omedit-testsuite.skip: omedit.skip testsuite-depends
|
||||
$(MAKE) -f $(defaultMakefileTarget) -C OMEdit/Testsuite
|
||||
-omparser: omparser.skip
|
||||
+omparser: build-dirs omparser.skip
|
||||
omparser.skip:
|
||||
test -f $@ || $(MAKE) -C OMParser OMBUILDDIR=@OMBUILDDIR@ "host_short=@host_short@" CC="@CC@" CXX="@CXX@" CFLAGS="@CFLAGS@" CPPFLAGS="@CPPFLAGS@" CXXFLAGS="@CXXFLAGS@"
|
||||
omsimulator: omsimulator.skip
|
||||
@@ -134,6 +134,10 @@
|
||||
INSTALL_JAVADIR = ${DESTDIR}${datadir}/omc/java
|
||||
INSTALL_LOCALEDIR = ${DESTDIR}${datadir}/locale
|
||||
|
||||
+build-dirs:
|
||||
+ mkdir -p "@OMBUILDDIR@"/lib/@host_short@/omc
|
||||
+ mkdir -p "@OMBUILDDIR@"/include/omc
|
||||
+
|
||||
install-dirs:
|
||||
@test ! "${DESTDIR}/@prefix@" -ef "@OMBUILDDIR@" || (echo Error: Install and build dirs are the same && false)
|
||||
if [ "@APP@" = ".app" ]; then mkdir -p ${INSTALL_APPDIR}; fi
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
{ lib
|
||||
, pkg-config
|
||||
, jre8
|
||||
, libuuid
|
||||
, openmodelica
|
||||
, mkOpenModelicaDerivation
|
||||
}:
|
||||
|
||||
mkOpenModelicaDerivation rec {
|
||||
pname = "omparser";
|
||||
omdir = "OMParser";
|
||||
omdeps = [ openmodelica.omcompiler ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ jre8 libuuid ];
|
||||
|
||||
patches = [ ./Makefile.in.patch ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An antlr4-based parser of Modelica files from OpenModelica
|
||||
suite";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{ lib
|
||||
, qtbase
|
||||
, qttools
|
||||
, qmake
|
||||
, wrapQtAppsHook
|
||||
, openmodelica
|
||||
, mkOpenModelicaDerivation
|
||||
}:
|
||||
|
||||
mkOpenModelicaDerivation rec {
|
||||
pname = "omplot";
|
||||
omdir = "OMPlot";
|
||||
omdeps = [ openmodelica.omcompiler ];
|
||||
omautoconf = true;
|
||||
|
||||
nativeBuildInputs = [ qtbase qttools qmake wrapQtAppsHook ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i OMPlot/Makefile.in -e 's|bindir = @includedir@|includedir = @includedir@|'
|
||||
sed -i OMPlot/OMPlot/OMPlotGUI/*.pro -e '/INCLUDEPATH +=/s|$| ../../qwt/src|'
|
||||
sed -i ''$(find -name qmake.m4) -e '/^\s*LRELEASE=/ s|LRELEASE=.*$|LRELEASE=${lib.getDev qttools}/bin/lrelease|'
|
||||
'';
|
||||
|
||||
dontUseQmakeConfigure = true;
|
||||
QMAKESPEC = "linux-clang";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Plotting tool for OpenModelica-generated results files";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, qttools, qmake, qtwebkit, wrapQtAppsHook, readline, openmodelica, mkOpenModelicaDerivation }:
|
||||
|
||||
mkOpenModelicaDerivation rec {
|
||||
pname = "omshell";
|
||||
omdir = "OMShell";
|
||||
omdeps = [ openmodelica.omcompiler ];
|
||||
omautoconf = true;
|
||||
|
||||
nativeBuildInputs = [ qmake wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ readline qtwebkit ];
|
||||
|
||||
postPatch = with openmodelica; ''
|
||||
sed -i ''$(find -name qmake.m4) -e '/^\s*LRELEASE=/ s|LRELEASE=.*$|LRELEASE=${lib.getDev qttools}/bin/lrelease|'
|
||||
sed -i OMShell/OMShell/OMShellGUI/*.pro -e '
|
||||
s|\$\$\[QT_INSTALL_BINS\]/lrelease|${lib.getDev qttools}/bin/lrelease|
|
||||
/^\s*OMCLIBS =/ s|\$\$(OMBUILDDIR)|${omcompiler}|
|
||||
/^\s*OMCINC =/ s|\$\$(OMBUILDDIR)|${omcompiler}|
|
||||
'
|
||||
sed -i OMShell/OMShell/OMShellGUI/OMShell.config.in -e '
|
||||
s|@OMBUILDDIR@|${omcompiler}|
|
||||
s|@OPENMODELICAHOME@|${omcompiler}|
|
||||
'
|
||||
sed -i OMShell/mosh/src/Makefile.in -e '
|
||||
/^CFLAGS =/ s|-I../../../build|-I${omcompiler}|
|
||||
/^LIBS =/ s|-L@OMBUILDDIR@|-L${omcompiler}|
|
||||
'
|
||||
'';
|
||||
|
||||
dontUseQmakeConfigure = true;
|
||||
QMAKESPEC = "linux-clang";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Interactive OpenModelica session shell";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{ lib
|
||||
, pkg-config
|
||||
, boost
|
||||
, readline
|
||||
, libxml2
|
||||
, openmodelica
|
||||
, mkOpenModelicaDerivation
|
||||
}:
|
||||
|
||||
mkOpenModelicaDerivation rec {
|
||||
pname = "omsimulator";
|
||||
omdir = "OMSimulator";
|
||||
omdeps = [ openmodelica.omcompiler ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ readline libxml2 boost ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The OpenModelica FMI & SSP-based co-simulation environment";
|
||||
homepage = "https://openmodelica.org";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ balodja smironov ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue