unison: match version with tag, cleanup

This commit is contained in:
Sandro Jäckel 2023-07-27 11:28:27 +02:00
parent 035064ee65
commit 5e2cea4213
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,22 +1,26 @@
{ lib, stdenv, fetchurl, autoPatchelfHook { lib
, ncurses6, zlib, gmp , autoPatchelfHook
, makeWrapper , fetchurl
, gmp
, less , less
, makeWrapper
, ncurses6
, stdenv
, zlib
}: }:
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "unison-code-manager"; pname = "unison-code-manager";
milestone_id = "M5b"; version = "M5b";
version = "1.0.${finalAttrs.milestone_id}-alpha";
src = if (stdenv.isDarwin) then src = if stdenv.isDarwin then
fetchurl { fetchurl {
url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.milestone_id}/ucm-macos.tar.gz"; url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-macos.tar.gz";
hash = "sha256-Uknt1NrywmGs8YovlnN8TU8iaYgT1jeYP4SQCuK1u+I="; hash = "sha256-Uknt1NrywmGs8YovlnN8TU8iaYgT1jeYP4SQCuK1u+I=";
} }
else else
fetchurl { fetchurl {
url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.milestone_id}/ucm-linux.tar.gz"; url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.version}/ucm-linux.tar.gz";
hash = "sha256-CZLGA4fFFysxHkwedC8RBLmHWwr3BM8xqps7hN3TC/g="; hash = "sha256-CZLGA4fFFysxHkwedC8RBLmHWwr3BM8xqps7hN3TC/g=";
}; };
@ -25,7 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
dontBuild = true; dontBuild = true;
dontConfigure = true; dontConfigure = true;
nativeBuildInputs = [ makeWrapper ] ++ (lib.optional (!stdenv.isDarwin) autoPatchelfHook); nativeBuildInputs = [ makeWrapper ]
++ lib.optional (!stdenv.isDarwin) autoPatchelfHook;
buildInputs = lib.optionals (!stdenv.isDarwin) [ ncurses6 zlib gmp ]; buildInputs = lib.optionals (!stdenv.isDarwin) [ ncurses6 zlib gmp ];
installPhase = '' installPhase = ''