unison: use finalAttrs pattern

This commit is contained in:
Rafael Fernández López 2023-06-13 14:31:54 +02:00
parent af21812289
commit 81fc11e2ed

View file

@ -4,19 +4,19 @@
, less
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "unison-code-manager";
milestone_id = "M4i";
version = "1.0.${milestone_id}-alpha";
version = "1.0.${finalAttrs.milestone_id}-alpha";
src = if (stdenv.isDarwin) then
fetchurl {
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/ucm-macos.tar.gz";
url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.milestone_id}/ucm-macos.tar.gz";
hash = "sha256-1Qp1SB5rCsVimZzRo1NOX8HBoMEGlIycJPm3zGTUuOw=";
}
else
fetchurl {
url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/ucm-linux.tar.gz";
url = "https://github.com/unisonweb/unison/releases/download/release/${finalAttrs.milestone_id}/ucm-linux.tar.gz";
hash = "sha256-Qx8vO/Vaz0VdCGXwIwRQIuMlp44hxCroQ7m7Y+m7aXk=";
};
@ -45,4 +45,4 @@ stdenv.mkDerivation rec {
platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-darwin" ];
mainProgram = "ucm";
};
}
})