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

45 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, autoPatchelfHook
2019-08-07 05:37:46 +01:00
, ncurses5, zlib, gmp
, makeWrapper
, less
2019-08-07 05:37:46 +01:00
}:
stdenv.mkDerivation rec {
pname = "unison-code-manager";
milestone_id = "M1m";
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 = "06pxvp753j8pr0pn02l7cswmmas5pk1vlkw83yd04h3f2rx1s61v";
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 = "1qspvfq805d34kz031pf9sqw8kzz7h637kc8lnbjlgvwixxkxc7c";
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 = [ makeWrapper ] ++ (lib.optional (!stdenv.isDarwin) autoPatchelfHook);
buildInputs = lib.optionals (!stdenv.isDarwin) [ ncurses5 zlib gmp ];
2019-08-07 05:37:46 +01:00
installPhase = ''
mkdir -p $out/bin
mv ucm $out/bin
wrapProgram $out/bin/ucm --prefix PATH ":" "${lib.makeBinPath [ less ]}";
2019-08-07 05:37:46 +01:00
'';
meta = with lib; {
2019-08-07 05:37:46 +01:00
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" ];
};
}