3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/unison/default.nix

42 lines
1.3 KiB
Nix
Raw Normal View History

2019-08-07 05:37:46 +01:00
{ stdenv, fetchurl, autoPatchelfHook
, ncurses5, zlib, gmp
}:
stdenv.mkDerivation rec {
pname = "unison-code-manager";
milestone_id = "M1g";
2019-08-07 05:37:46 +01: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";
sha256 = "186y7y7ffg976w01cbb8am84ajbifb7lcnsc4g3x262mkswr7lry";
2019-08-07 05:37:46 +01:00
}
else
fetchurl {
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-linux64.tar.gz";
sha256 = "1ki9car1clpaspnl5jb5qnr6nzv108q279n8m8bjm8azfcnl61ab";
2019-08-07 05:37:46 +01: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";
homepage = https://unisonweb.org/;
license = with licenses; [ mit bsd3 ];
2019-08-07 05:37:46 +01:00
maintainers = [ maintainers.virusdave ];
platforms = [ "x86_64-darwin" "x86_64-linux" ];
};
}