diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-01-31 17:46:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 17:46:45 +0100 |
commit | ca43ced0ae0cce9c5738112c8cfd830931b628b1 (patch) | |
tree | b2a092ee38ee741d91bf80794321413ead6ca97a /pkgs | |
parent | 3efa861365d2cefe3b16ce351eda8082d8a2c104 (diff) | |
parent | b2c07d4a3487248b3e712f4434e50904e16eda06 (diff) |
Merge pull request #284990 from Dekker1/minizincide282
minizincide: 2.5.5 -> 2.8.2
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/minizinc/ide.nix | 26 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 20 insertions, 10 deletions
diff --git a/pkgs/development/tools/minizinc/ide.nix b/pkgs/development/tools/minizinc/ide.nix index bacd769271e4c..ce115971f944d 100644 --- a/pkgs/development/tools/minizinc/ide.nix +++ b/pkgs/development/tools/minizinc/ide.nix @@ -1,26 +1,34 @@ -{ lib, mkDerivation, fetchFromGitHub, qtbase, qtwebengine, qtwebkit, qmake, minizinc }: +{ lib, stdenv, fetchFromGitHub, qtbase, qmake, qtwebsockets, minizinc, makeWrapper, Cocoa }: -mkDerivation rec { +let + executableLoc = if stdenv.isDarwin then "$out/Applications/MiniZincIDE.app/Contents/MacOS/MiniZincIDE" else "$out/bin/MiniZincIDE"; +in +stdenv.mkDerivation rec { pname = "minizinc-ide"; - version = "2.5.5"; + version = "2.8.2"; src = fetchFromGitHub { owner = "MiniZinc"; repo = "MiniZincIDE"; rev = version; - sha256 = "sha256-0U3KFRDam8psbCaEOcrwqzICAy1oBgo8SFEiR/PMqZk="; + hash = "sha256-3L/hulNI7e2wE9gMt2h3mS0ubHZ4kcVpwALCmWQtv7A="; fetchSubmodules = true; }; - nativeBuildInputs = [ qmake ]; - buildInputs = [ qtbase qtwebengine qtwebkit ]; + nativeBuildInputs = [ qmake makeWrapper ]; + buildInputs = [ qtbase qtwebsockets ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; sourceRoot = "${src.name}/MiniZincIDE"; dontWrapQtApps = true; - postInstall = '' - wrapProgram $out/bin/MiniZincIDE --prefix PATH ":" ${lib.makeBinPath [ minizinc ]} + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p $out/Applications + mv $out/bin/MiniZincIDE.app $out/Applications/ + '' + '' + wrapProgram ${executableLoc} \ + --prefix PATH ":" ${lib.makeBinPath [ minizinc ]} \ + --set QT_QPA_PLATFORM_PLUGIN_PATH "${qtbase}/lib/qt-6/plugins/platforms" ''; meta = with lib; { @@ -34,7 +42,7 @@ mkDerivation rec { It is a subset of the higher-level language Zinc. ''; license = licenses.mpl20; - platforms = platforms.linux; + platforms = platforms.unix; maintainers = [ maintainers.dtzWill ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2f5eeeac5a9cc..f82a065de04ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19542,7 +19542,9 @@ with pkgs; minify = callPackage ../development/web/minify { }; minizinc = callPackage ../development/tools/minizinc { }; - minizincide = libsForQt5.callPackage ../development/tools/minizinc/ide.nix { }; + minizincide = qt6Packages.callPackage ../development/tools/minizinc/ide.nix { + inherit (darwin.apple_sdk_11_0.frameworks) Cocoa; + }; mkcert = callPackage ../development/tools/misc/mkcert { }; |