diff --git a/pkgs/by-name/ex/expat/package.nix b/pkgs/by-name/ex/expat/package.nix index 72459e1c2ac6..2e831ef025da 100644 --- a/pkgs/by-name/ex/expat/package.nix +++ b/pkgs/by-name/ex/expat/package.nix @@ -18,17 +18,17 @@ # files. let - version = "2.8.2"; - tag = "R_${lib.replaceStrings [ "." ] [ "_" ] version}"; + tagFor = version: "R_${lib.replaceStrings [ "." ] [ "_" ] version}"; in + stdenv.mkDerivation (finalAttrs: { pname = "expat"; - inherit version; + version = "2.8.2"; src = fetchurl { url = with finalAttrs; - "https://github.com/libexpat/libexpat/releases/download/${tag}/${pname}-${version}.tar.xz"; + "https://github.com/libexpat/libexpat/releases/download/${tagFor version}/${pname}-${version}.tar.xz"; hash = "sha256-OtibhYjmZEvU5JmBSA1IshKJ7rvNTwoaSvscKfmbarQ="; }; @@ -73,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: { }; meta = { - changelog = "https://github.com/libexpat/libexpat/blob/${tag}/expat/Changes"; + changelog = "https://github.com/libexpat/libexpat/blob/${tagFor finalAttrs.version}/expat/Changes"; homepage = "https://libexpat.github.io/"; description = "Stream-oriented XML parser library written in C"; mainProgram = "xmlwf";