biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / minizinc / ide.nix
blob42dda7c4235db35006c37e8379db25726618bdab
1 { lib, stdenv, fetchFromGitHub, qtbase, qmake, qtwebsockets, minizinc, makeWrapper, Cocoa }:
3 let
4   executableLoc = if stdenv.isDarwin then "$out/Applications/MiniZincIDE.app/Contents/MacOS/MiniZincIDE" else "$out/bin/MiniZincIDE";
5 in
6 stdenv.mkDerivation rec {
7   pname = "minizinc-ide";
8   version = "2.8.3";
10   src = fetchFromGitHub {
11     owner = "MiniZinc";
12     repo = "MiniZincIDE";
13     rev = version;
14     hash = "sha256-/x4mWjAk24s6Ax22Q15WUPLLwm7YrzwaoMIINjQr5zU=";
15     fetchSubmodules = true;
16   };
18   nativeBuildInputs = [ qmake makeWrapper ];
19   buildInputs = [ qtbase qtwebsockets ] ++ lib.optionals stdenv.isDarwin [ Cocoa ];
21   sourceRoot = "${src.name}/MiniZincIDE";
23   dontWrapQtApps = true;
25   postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
26     mkdir -p $out/Applications
27     mv $out/bin/MiniZincIDE.app $out/Applications/
28   '' + ''
29     wrapProgram ${executableLoc} \
30       --prefix PATH ":" ${lib.makeBinPath [ minizinc ]} \
31       --set QT_QPA_PLATFORM_PLUGIN_PATH "${qtbase}/lib/qt-6/plugins/platforms"
32   '';
34   meta = with lib; {
35     homepage = "https://www.minizinc.org/";
36     description = "IDE for MiniZinc, a medium-level constraint modelling language";
37     mainProgram = "MiniZincIDE";
38     longDescription = ''
39       MiniZinc is a medium-level constraint modelling
40       language. It is high-level enough to express most
41       constraint problems easily, but low-level enough
42       that it can be mapped onto existing solvers easily and consistently.
43       It is a subset of the higher-level language Zinc.
44     '';
45     license = licenses.mpl20;
46     platforms = platforms.unix;
47     maintainers = [ maintainers.dtzWill ];
48   };