Commit 4265d646 authored by Alexis Hildebrandt's avatar Alexis Hildebrandt
Browse files

drawterm-cocoa: init at 0-unstable-2025-03-18

parent 446feb2c
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  unstableGitUpdater,
  installShellFiles,
  makeWrapper,
  apple-sdk_13,
  xorg,
  pkg-config,
  wayland-scanner,
@@ -39,6 +40,7 @@ stdenv.mkDerivation {
        wayland-scanner
      ];
      unix = [ makeWrapper ];
      osx-cocoa = [ ];
    }
    ."${config}" or (throw "unsupported CONF");

@@ -55,11 +57,11 @@ stdenv.mkDerivation {
        xorg.libX11
        xorg.libXt
      ];
      osx-cocoa = [ apple-sdk_13 ];
    }
    ."${config}" or (throw "unsupported CONF");

  # TODO: macos
  makeFlags = [ "CONF=${config}" ];
  makeFlags = [ "CONF=${config}" ] ++ lib.optional (config == "osx-cocoa") "CC=clang";

  installPhase =
    {
@@ -72,6 +74,12 @@ stdenv.mkDerivation {
        install -Dm755 -t $out/bin/ drawterm.bin
        makeWrapper ${pulseaudio}/bin/padsp $out/bin/drawterm --add-flags $out/bin/drawterm.bin
      '';
      osx-cocoa = ''
        mkdir -p $out/{Applications,bin}
        mv gui-cocoa/drawterm.app $out/Applications/
        mv drawterm $out/Applications/drawterm.app/
        ln -s $out/Applications/drawterm.app/drawterm $out/bin/
      '';
    }
    ."${config}" or (throw "unsupported CONF")
    + ''
@@ -88,7 +96,7 @@ stdenv.mkDerivation {
    homepage = "https://drawterm.9front.org/";
    license = licenses.mit;
    maintainers = with maintainers; [ moody ];
    platforms = platforms.linux;
    platforms = platforms.linux ++ platforms.darwin;
    mainProgram = "drawterm";
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -14131,6 +14131,7 @@ with pkgs;
  drawterm = callPackage ../tools/admin/drawterm { config = "unix"; };
  drawterm-wayland = callPackage ../tools/admin/drawterm { config = "linux"; };
  drawterm-cocoa = callPackage ../tools/admin/drawterm { config = "osx-cocoa"; };
  droopy = python3Packages.callPackage ../applications/networking/droopy { };