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