meson: clean up

This commit is contained in:
Jan Tojnar 2020-07-06 00:44:24 +02:00
parent 8d05772134
commit c19222143e
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4
2 changed files with 16 additions and 16 deletions

View file

@ -1,32 +1,20 @@
{ lib
, python3Packages
, python3
, stdenv
, writeTextDir
, substituteAll
, pkgsHostHost
}:
python3Packages.buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "meson";
version = "0.54.2";
src = python3Packages.fetchPypi {
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "0m84zb0q67vnxmd6ldz477w6yjdnk9c44xhlwh1g1pzqx3m6wwd7";
};
postFixup = ''
pushd $out/bin
# undo shell wrapper as meson tools are called with python
for i in *; do
mv ".$i-wrapped" "$i"
done
popd
# Do not propagate Python
rm $out/nix-support/propagated-build-inputs
'';
patches = [
# Upstream insists on not allowing bindir and other dir options
# outside of prefix for some reason:
@ -68,6 +56,18 @@ python3Packages.buildPythonApplication rec {
# checkInputs = [ ninja pkgconfig ];
# checkPhase = "python ./run_project_tests.py";
postFixup = ''
pushd $out/bin
# undo shell wrapper as meson tools are called with python
for i in *; do
mv ".$i-wrapped" "$i"
done
popd
# Do not propagate Python
rm $out/nix-support/propagated-build-inputs
'';
meta = with lib; {
homepage = "https://mesonbuild.com";
description = "SCons-like build system that use python as a front-end language and Ninja as a building backend";

View file

@ -4645,7 +4645,7 @@ in {
mesa = callPackage ../development/python-modules/mesa { };
meson = disabledIf (pythonOlder "3.5") (toPythonModule ((pkgs.meson.override {
python3Packages = self;
python3 = python;
}).overrideAttrs(oldAttrs: {
# We do not want the setup hook in Python packages
# because the build is performed differently.