2019-08-07 06:37:46 +02:00
|
|
|
{ stdenv, fetchurl, autoPatchelfHook
|
|
|
|
, ncurses5, zlib, gmp
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "unison-code-manager";
|
2020-04-28 00:03:14 +02:00
|
|
|
milestone_id = "M1l";
|
2019-08-07 06:37:46 +02: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-04-28 00:03:14 +02:00
|
|
|
sha256 = "0qbxakrp3p3k3k8a1m2g24ivs3c8j5rj7ij84i7k548505rva9qr";
|
2019-08-07 06:37:46 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
fetchurl {
|
|
|
|
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-linux64.tar.gz";
|
2020-04-28 00:03:14 +02:00
|
|
|
sha256 = "152yzv7j4nyp228ngzbhki9fid1xdqrjvl1rwxc05wq30jwwqx0x";
|
2019-08-07 06:37:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
# The tarball is just the prebuilt binary, in the archive root.
|
|
|
|
sourceRoot = ".";
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = stdenv.lib.optional (!stdenv.isDarwin) autoPatchelfHook;
|
|
|
|
buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [ ncurses5 zlib gmp ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv ucm $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Modern, statically-typed purely functional language";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://unisonweb.org/";
|
2019-11-14 00:50:09 +01:00
|
|
|
license = with licenses; [ mit bsd3 ];
|
2019-08-07 06:37:46 +02:00
|
|
|
maintainers = [ maintainers.virusdave ];
|
|
|
|
platforms = [ "x86_64-darwin" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|