Unverified Commit 89f23464 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #312922 from ereslibre/bump-unison

unison-ucm: 0.5.19 -> 0.5.20
parents 685b7a10 5ce76674
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -4,24 +4,26 @@
, gmp
, less
, makeWrapper
, libb2
, ncurses6
, openssl
, stdenv
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "unison-code-manager";
  version = "0.5.19";
  version = "0.5.20";

  src = if stdenv.isDarwin then
    fetchurl {
      url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-macos.tar.gz";
      hash = "sha256-//bjpmW45BqBHmBIj2uMahYQYjhNJ8hvGh+O/7oYQOk=";
      hash = "sha256-jhI3qy2ov8bf3l1n0wsslWT70LDeQ6sGNSH62VFJ5cE=";
    }
  else
    fetchurl {
      url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-linux.tar.gz";
      hash = "sha256-3WyiV6mIuo5GDpDK/KdWMvj22sZ3uph15u3v3TX5YZA=";
      hash = "sha256-MOm0RsMFWGik2OL2MPkgmHqKYNO28fkZHVJ/6P3aIww=";
    };

  # The tarball is just the prebuilt binary, in the archive root.
@@ -31,14 +33,17 @@ stdenv.mkDerivation (finalAttrs: {

  nativeBuildInputs = [ makeWrapper ]
    ++ lib.optional (!stdenv.isDarwin) autoPatchelfHook;
  buildInputs = lib.optionals (!stdenv.isDarwin) [ ncurses6 zlib gmp ];
  buildInputs = lib.optionals (!stdenv.isDarwin) [ gmp ncurses6 zlib ];

  installPhase = ''
    mkdir -p $out/bin
    mv ucm $out/bin
    mkdir -p $out/{bin,lib}
    mv runtime $out/lib/runtime
    mv ui $out/ui
    wrapProgram $out/bin/ucm \
    mv unison $out/unison
    makeWrapper $out/unison/unison $out/bin/ucm \
      --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libb2 openssl ]} \
      --prefix PATH ":" "${lib.makeBinPath [ less ]}" \
      --add-flags "--runtime-path $out/lib/runtime/bin/unison-runtime" \
      --set UCM_WEB_UI "$out/ui"
  '';