2019-08-07 04:37:46 +00:00
|
|
|
{ stdenv, fetchurl, autoPatchelfHook
|
|
|
|
, ncurses5, zlib, gmp
|
2020-11-24 21:41:36 +00:00
|
|
|
, makeWrapper
|
|
|
|
, less
|
2019-08-07 04:37:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "unison-code-manager";
|
2020-11-24 21:41:36 +00:00
|
|
|
milestone_id = "M1m";
|
2019-08-07 04:37:46 +00:00
|
|
|
version = "1.0.${milestone_id}-alpha";
|
|
|
|
|
|
|
|
src = if (stdenv.isDarwin) then
|
|
|
|
fetchurl {
|
|
|
|
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-osx.tar.gz";
|
2020-11-24 21:41:36 +00:00
|
|
|
sha256 = "06pxvp753j8pr0pn02l7cswmmas5pk1vlkw83yd04h3f2rx1s61v";
|
2019-08-07 04:37:46 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
|
|
|
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-linux64.tar.gz";
|
2020-11-24 21:41:36 +00:00
|
|
|
sha256 = "1qspvfq805d34kz031pf9sqw8kzz7h637kc8lnbjlgvwixxkxc7c";
|
2019-08-07 04:37:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# The tarball is just the prebuilt binary, in the archive root.
|
|
|
|
sourceRoot = ".";
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
2020-11-24 21:41:36 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ] ++ (stdenv.lib.optional (!stdenv.isDarwin) autoPatchelfHook);
|
2019-08-07 04:37:46 +00:00
|
|
|
buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [ ncurses5 zlib gmp ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv ucm $out/bin
|
2020-11-24 21:41:36 +00:00
|
|
|
wrapProgram $out/bin/ucm --prefix PATH ":" "${stdenv.lib.makeBinPath [ less ]}";
|
2019-08-07 04:37:46 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Modern, statically-typed purely functional language";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://unisonweb.org/";
|
2019-11-13 23:50:09 +00:00
|
|
|
license = with licenses; [ mit bsd3 ];
|
2019-08-07 04:37:46 +00:00
|
|
|
maintainers = [ maintainers.virusdave ];
|
|
|
|
platforms = [ "x86_64-darwin" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|