lol

meson: rename patches

+65 -47
pkgs/by-name/me/meson/boost-Do-not-add-system-paths-on-nix.patch pkgs/by-name/me/meson/005-boost-Do-not-add-system-paths-on-nix.patch
pkgs/by-name/me/meson/clear-old-rpath.patch pkgs/by-name/me/meson/002-clear-old-rpath.patch
pkgs/by-name/me/meson/disable-bitcode.patch pkgs/by-name/me/meson/006-disable-bitcode.patch
pkgs/by-name/me/meson/fix-rpath.patch pkgs/by-name/me/meson/001-fix-rpath.patch
pkgs/by-name/me/meson/gir-fallback-path.patch pkgs/by-name/me/meson/004-gir-fallback-path.patch
pkgs/by-name/me/meson/more-env-vars.patch pkgs/by-name/me/meson/003-more-env-vars.patch
+65 -47
pkgs/by-name/me/meson/package.nix
··· 28 28 }; 29 29 30 30 patches = [ 31 - # Meson is currently inspecting fewer variables than autoconf does, which 32 - # makes it harder for us to use setup hooks, etc. Taken from 33 - # https://github.com/mesonbuild/meson/pull/6827 34 - ./more-env-vars.patch 35 - 36 - # Unlike libtool, vanilla Meson does not pass any information 37 - # about the path library will be installed to to g-ir-scanner, 38 - # breaking the GIR when path other than ${!outputLib}/lib is used. 39 - # We patch Meson to add a --fallback-library-path argument with 40 - # library install_dir to g-ir-scanner. 41 - ./gir-fallback-path.patch 42 - 43 - # In common distributions, RPATH is only needed for internal libraries so 31 + # In typical distributions, RPATH is only needed for internal libraries so 44 32 # meson removes everything else. With Nix, the locations of libraries 45 33 # are not as predictable, therefore we need to keep them in the RPATH. 46 34 # At the moment we are keeping the paths starting with /nix/store. 47 35 # https://github.com/NixOS/nixpkgs/issues/31222#issuecomment-365811634 48 36 (substituteAll { 49 - src = ./fix-rpath.patch; 37 + src = ./001-fix-rpath.patch; 50 38 inherit (builtins) storeDir; 51 39 }) 52 40 ··· 56 44 # But this can cause much bigger problem for Nix as it can produce 57 45 # cut-in-half-by-\0 store path references. 58 46 # Let’s just clear the whole rpath and hope for the best. 59 - ./clear-old-rpath.patch 47 + ./002-clear-old-rpath.patch 48 + 49 + # Meson is currently inspecting fewer variables than autoconf does, which 50 + # makes it harder for us to use setup hooks, etc. 51 + # https://github.com/mesonbuild/meson/pull/6827 52 + ./003-more-env-vars.patch 53 + 54 + # Unlike libtool, vanilla Meson does not pass any information about the path 55 + # library will be installed to to g-ir-scanner, breaking the GIR when path 56 + # other than ${!outputLib}/lib is used. 57 + # We patch Meson to add a --fallback-library-path argument with library 58 + # install_dir to g-ir-scanner. 59 + ./004-gir-fallback-path.patch 60 60 61 61 # Patch out default boost search paths to avoid impure builds on 62 62 # unsandboxed non-NixOS builds, see: 63 63 # https://github.com/NixOS/nixpkgs/issues/86131#issuecomment-711051774 64 - ./boost-Do-not-add-system-paths-on-nix.patch 64 + ./005-boost-Do-not-add-system-paths-on-nix.patch 65 65 66 66 # Nixpkgs cctools does not have bitcode support. 67 - ./disable-bitcode.patch 67 + ./006-disable-bitcode.patch 68 68 69 69 # Fix passing multiple --define-variable arguments to pkg-config. 70 70 # https://github.com/mesonbuild/meson/pull/10670 71 71 (fetchpatch { 72 72 url = "https://github.com/mesonbuild/meson/commit/d5252c5d4cf1c1931fef0c1c98dd66c000891d21.patch"; 73 - sha256 = "GiUNVul1N5Fl8mfqM7vA/r1FdKqImiDYLXMVDt77gvw="; 73 + hash = "sha256-GiUNVul1N5Fl8mfqM7vA/r1FdKqImiDYLXMVDt77gvw="; 74 74 excludes = [ 75 75 "docs/yaml/objects/dep.yaml" 76 76 ]; 77 77 }) 78 78 ]; 79 79 80 - setupHook = ./setup-hook.sh; 80 + buildInputs = lib.optionals (python3.pythonOlder "3.9") [ 81 + libxcrypt 82 + ]; 81 83 82 - nativeCheckInputs = [ ninja pkg-config ]; 83 - checkInputs = [ zlib ] 84 - ++ lib.optionals stdenv.isDarwin [ Foundation OpenGL AppKit Cocoa ]; 85 - checkPhase = '' 86 - runHook preCheck 84 + nativeBuildInputs = [ installShellFiles ]; 87 85 88 - patchShebangs 'test cases' 89 - substituteInPlace 'test cases/native/8 external program shebang parsing/script.int.in' \ 90 - --replace /usr/bin/env ${coreutils}/bin/env 86 + nativeCheckInputs = [ 87 + ninja 88 + pkg-config 89 + ]; 90 + 91 + checkInputs = [ 92 + zlib 93 + ] 94 + ++ lib.optionals stdenv.isDarwin [ 95 + AppKit 96 + Cocoa 97 + Foundation 98 + OpenGL 99 + ]; 100 + 101 + checkPhase = lib.concatStringsSep "\n" ([ 102 + "runHook preCheck" 103 + '' 104 + patchShebangs 'test cases' 105 + substituteInPlace \ 106 + 'test cases/native/8 external program shebang parsing/script.int.in' \ 107 + --replace /usr/bin/env ${coreutils}/bin/env 108 + '' 109 + ] 110 + # Remove problematic tests 111 + ++ (builtins.map (f: ''rm -vr "${f}";'') [ 91 112 # requires git, creating cyclic dependency 92 - rm -r 'test cases/common/66 vcstag' 113 + ''test cases/common/66 vcstag'' 93 114 # requires glib, creating cyclic dependency 94 - rm -r 'test cases/linuxlike/6 subdir include order' 95 - rm -r 'test cases/linuxlike/9 compiler checks with dependencies' 115 + ''test cases/linuxlike/6 subdir include order'' 116 + ''test cases/linuxlike/9 compiler checks with dependencies'' 96 117 # requires static zlib, see #66461 97 - rm -r 'test cases/linuxlike/14 static dynamic linkage' 118 + ''test cases/linuxlike/14 static dynamic linkage'' 98 119 # Nixpkgs cctools does not have bitcode support. 99 - rm -r 'test cases/osx/7 bitcode' 100 - HOME="$TMPDIR" python ./run_project_tests.py 120 + ''test cases/osx/7 bitcode'' 121 + ]) 122 + ++ [ 123 + ''HOME="$TMPDIR" python ./run_project_tests.py'' 124 + "runHook postCheck" 125 + ]); 101 126 102 - runHook postCheck 127 + postInstall = '' 128 + installShellCompletion --zsh data/shell-completions/zsh/_meson 129 + installShellCompletion --bash data/shell-completions/bash/meson 103 130 ''; 104 131 105 132 postFixup = '' ··· 117 144 --replace "python3 -c " "${python3.interpreter} -c " 118 145 ''; 119 146 120 - buildInputs = lib.optionals (python3.pythonOlder "3.9") [ 121 - libxcrypt 122 - ]; 123 - 124 - nativeBuildInputs = [ installShellFiles ]; 125 - 126 - postInstall = '' 127 - installShellCompletion --zsh data/shell-completions/zsh/_meson 128 - installShellCompletion --bash data/shell-completions/bash/meson 129 - ''; 147 + setupHook = ./setup-hook.sh; 130 148 131 - meta = with lib; { 149 + meta = { 132 150 homepage = "https://mesonbuild.com"; 133 151 description = "An open source, fast and friendly build system made in Python"; 134 152 longDescription = '' ··· 140 158 second spent waiting for the build system to actually start compiling 141 159 code. 142 160 ''; 143 - license = licenses.asl20; 144 - maintainers = with maintainers; [ mbe AndersonTorres ]; 161 + license = lib.licenses.asl20; 162 + maintainers = with lib.maintainers; [ AndersonTorres ]; 145 163 inherit (python3.meta) platforms; 146 164 }; 147 165 }