mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
SDL,
|
|
autoreconfHook,
|
|
fetchpatch,
|
|
fetchurl,
|
|
pango,
|
|
pkg-config,
|
|
stdenv,
|
|
# Boolean flags
|
|
enableSdltest ? (!stdenv.hostPlatform.isDarwin),
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "SDL_Pango";
|
|
version = "0.1.2";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/sdlpango/SDL_Pango-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-f3XTuXrPcHxpbqEmQkkGIE6/oHZgFi3pJRc83QJX66Q=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "0000-api_additions.patch";
|
|
url = "https://sources.debian.org/data/main/s/sdlpango/0.1.2-6/debian/patches/api_additions.patch";
|
|
hash = "sha256-jfr+R4tIVZfYoaY4i+aNSGLwJGEipnuKqD2O9orP5QI=";
|
|
})
|
|
./0001-fixes.patch
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
SDL
|
|
autoreconfHook
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
SDL
|
|
pango
|
|
];
|
|
|
|
configureFlags = [
|
|
(lib.enableFeature enableSdltest "sdltest")
|
|
];
|
|
|
|
strictDeps = true;
|
|
|
|
meta = {
|
|
homepage = "https://sdlpango.sourceforge.net/";
|
|
description = "Connects the Pango rendering engine to SDL";
|
|
license = lib.licenses.lgpl21Plus;
|
|
maintainers = lib.teams.sdl.members
|
|
++ (with lib.maintainers; [ puckipedia ]);
|
|
inherit (SDL.meta) platforms;
|
|
};
|
|
})
|