ninja: refactor version,src (#403085)

This commit is contained in:
Ulrik Strid
2025-05-10 17:08:12 +02:00
committed by GitHub
+17 -18
View File
@@ -17,26 +17,25 @@
stdenv.mkDerivation (finalAttrs: {
pname = "ninja";
version = lib.removePrefix "v" finalAttrs.src.rev;
src =
version =
{
# TODO: Remove Ninja 1.11 as soon as possible.
"1.11" = fetchFromGitHub {
owner = "ninja-build";
repo = "ninja";
rev = "v1.11.1";
hash = "sha256-LvV/Fi2ARXBkfyA1paCRmLUwCh/rTyz+tGMg2/qEepI=";
};
latest = fetchFromGitHub {
owner = "ninja-build";
repo = "ninja";
rev = "v1.12.1";
hash = "sha256-RT5u+TDvWxG5EVQEYj931EZyrHUSAqK73OKDAascAwA=";
};
"1.11" = "1.11.1";
latest = "1.12.1";
}
.${ninjaRelease} or (throw "Unsupported Ninja release: ${ninjaRelease}");
.${ninjaRelease};
src = fetchFromGitHub {
owner = "ninja-build";
repo = "ninja";
rev = "v${finalAttrs.version}";
hash =
{
# TODO: Remove Ninja 1.11 as soon as possible.
"1.11" = "sha256-LvV/Fi2ARXBkfyA1paCRmLUwCh/rTyz+tGMg2/qEepI=";
latest = "sha256-RT5u+TDvWxG5EVQEYj931EZyrHUSAqK73OKDAascAwA=";
}
.${ninjaRelease} or (throw "Unsupported Ninja release: ${ninjaRelease}");
};
depsBuildBuild = [ buildPackages.stdenv.cc ];