about summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorPeder Bergebakken Sundt <pbsds@hotmail.com>2024-06-06 00:46:00 +0200
committerGitHub <noreply@github.com>2024-06-06 00:46:00 +0200
commitc4c7999160061bb16b69f8fbf561ff34d6e1e855 (patch)
tree653d92716255824bc22c779c598d5cfea7da7453 /pkgs/applications/science/math
parentb74cd530d4f8767e919eb31a7cb7a8bd68d65119 (diff)
parent24d00917fb54cda381bb705e5cf5da93e169ee0f (diff)
downloadnixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.tar
nixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.tar.gz
nixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.tar.bz2
nixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.tar.lz
nixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.tar.xz
nixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.tar.zst
nixlib-c4c7999160061bb16b69f8fbf561ff34d6e1e855.zip
Merge pull request #254623 from TomaSajt/mathmod
mathmod: init at 11.1-unstable-2024-01-26
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/mathmod/default.nix34
-rw-r--r--pkgs/applications/science/math/mathmod/fix-paths.patch14
2 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/mathmod/default.nix b/pkgs/applications/science/math/mathmod/default.nix
new file mode 100644
index 000000000000..01dab1dedea2
--- /dev/null
+++ b/pkgs/applications/science/math/mathmod/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, qmake
+}:
+
+mkDerivation {
+  pname = "mathmod";
+  version = "11.1-unstable-2024-01-26";
+
+  src = fetchFromGitHub {
+    owner = "parisolab";
+    repo = "mathmod";
+    rev = "24d03a04c17363520ae7cf077e72a7b8684eb6fd";
+    hash = "sha256-HiqHssPGqYEVZWchZRj4rFPc+xNVZk1ryl5qvFC2BmQ=";
+  };
+
+  patches = [ ./fix-paths.patch ];
+
+  postPatch = ''
+    substituteInPlace MathMod.pro --subst-var out
+  '';
+
+  nativeBuildInputs = [ qmake ];
+
+  meta = {
+    description = "A mathematical modelling software";
+    homepage = "https://github.com/parisolab/mathmod";
+    license = lib.licenses.gpl2Plus;
+    mainProgram = "MathMod";
+    maintainers = with lib.maintainers; [ tomasajt ];
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/pkgs/applications/science/math/mathmod/fix-paths.patch b/pkgs/applications/science/math/mathmod/fix-paths.patch
new file mode 100644
index 000000000000..b65b107882ee
--- /dev/null
+++ b/pkgs/applications/science/math/mathmod/fix-paths.patch
@@ -0,0 +1,14 @@
+diff --git a/MathMod.pro b/MathMod.pro
+index 2e2fbf1..bb8f8bd 100644
+--- a/MathMod.pro
++++ b/MathMod.pro
+@@ -63,7 +63,5 @@ OTHER_FILES     += \
+                 mathmodcollection.js \
+                 mathmodconfig.js
+ # install
+-target.path    = $TARGET
+-sources.files  = $$SOURCES $$HEADERS $$RESOURCES $$FORMS mathmod.pro
+-sources.path   = $TARGET
+-INSTALLS      += target sources
++target.path    = @out@/bin
++INSTALLS      += target