muon: 0.2.0 -> 0.4.0 (#391905)

This commit is contained in:
Gaétan Lepage
2025-04-19 14:24:25 +02:00
committed by GitHub

View File

@@ -17,14 +17,14 @@
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "muon" + lib.optionalString embedSamurai "-embedded-samurai"; pname = "muon" + lib.optionalString embedSamurai "-embedded-samurai";
version = "0.2.0"; version = "0.4.0";
src = fetchFromSourcehut { src = fetchFromSourcehut {
name = "muon-src"; name = "muon-src";
owner = "~lattis"; owner = "~lattis";
repo = "muon"; repo = "muon";
rev = finalAttrs.version; rev = finalAttrs.version;
hash = "sha256-ZHWyUV/BqM3ihauXDqDVkZURDDbBiRcEzptyGQmw94I="; hash = "sha256-xTdyqK8t741raMhjjJBMbWnAorLMMdZ02TeMXK7O+Yw=";
}; };
outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" ]; outputs = [ "out" ] ++ lib.optionals buildDocs [ "man" ];
@@ -32,8 +32,8 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = nativeBuildInputs =
[ [
pkgconf pkgconf
samurai
] ]
++ lib.optionals (!embedSamurai) [ samurai ]
++ lib.optionals buildDocs [ ++ lib.optionals buildDocs [
(python3.withPackages (ps: [ ps.pyyaml ])) (python3.withPackages (ps: [ ps.pyyaml ]))
scdoc scdoc
@@ -43,7 +43,6 @@ stdenv.mkDerivation (finalAttrs: {
curl curl
libarchive libarchive
libpkgconf libpkgconf
samurai
zlib zlib
]; ];
@@ -54,20 +53,25 @@ stdenv.mkDerivation (finalAttrs: {
# URLs manually extracted from subprojects directory # URLs manually extracted from subprojects directory
meson-docs-wrap = fetchurl { meson-docs-wrap = fetchurl {
name = "meson-docs-wrap"; name = "meson-docs-wrap";
url = "https://mochiro.moe/wrap/meson-docs-1.0.1-19-gdd8d4ee22.tar.gz"; url = "https://github.com/muon-build/meson-docs/archive/5bc0b250984722389419dccb529124aed7615583.tar.gz";
hash = "sha256-jHSPdLFR5jUeds4e+hLZ6JOblor5iuCV5cIwoc4K9gI="; hash = "sha256-5MmmiZfadCuUJ2jy5Rxubwf4twX0jcpr+TPj5ssdSbM=";
}; };
samurai-wrap = fetchurl { meson-tests-wrap = fetchurl {
name = "samurai-wrap"; name = "meson-tests-wrap";
url = "https://mochiro.moe/wrap/samurai-1.2-32-g81cef5d.tar.gz"; url = "https://github.com/muon-build/meson-tests/archive/591b5a053f9aa15245ccbd1d334cf3f8031b1035.tar.gz";
hash = "sha256-aPMAtScqweGljvOLaTuR6B0A0GQQQrVbRviXY4dpCoc="; hash = "sha256-6GXfcheZyB/S/xl/j7pj5EAWtsmx4N0fVhLPMJ2wC/w=";
}; };
in in
'' ''
pushd $sourceRoot/subprojects mkdir -p $sourceRoot/subprojects/meson-docs
${lib.optionalString buildDocs "tar xvf ${meson-docs-wrap}"} pushd $sourceRoot/subprojects/meson-docs
${lib.optionalString embedSamurai "tar xvf ${samurai-wrap}"} ${lib.optionalString buildDocs "tar xvf ${meson-docs-wrap} --strip-components=1"}
popd
mkdir -p $sourceRoot/subprojects/meson-tests
pushd $sourceRoot/subprojects/meson-tests
tar xvf ${meson-tests-wrap} --strip-components=1
popd popd
''; '';
@@ -99,13 +103,15 @@ stdenv.mkDerivation (finalAttrs: {
'' ''
runHook preBuild runHook preBuild
./bootstrap.sh stage-1 ${
lib.optionalString (!embedSamurai) "CFLAGS=\"$CFLAGS -DBOOTSTRAP_NO_SAMU\""
} ./bootstrap.sh stage-1
./stage-1/muon setup ${cmdlineForMuon} stage-2 ./stage-1/muon-bootstrap setup ${cmdlineForMuon} stage-2
samu ${cmdlineForSamu} -C stage-2 ${lib.optionalString embedSamurai "./stage-1/muon-bootstrap"} samu ${cmdlineForSamu} -C stage-2
stage-2/muon setup -Dprefix=$out ${cmdlineForMuon} stage-3 ./stage-2/muon setup -Dprefix=$out ${cmdlineForMuon} stage-3
samu ${cmdlineForSamu} -C stage-3 ${lib.optionalString embedSamurai "./stage-2/muon"} samu ${cmdlineForSamu} -C stage-3
runHook postBuild runHook postBuild
''; '';