mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-06 13:53:05 +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" ```
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
SDL2,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
stdenv,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "yapesdl";
|
|
version = "0.80.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "calmopyrin";
|
|
repo = "yapesdl";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-VCjxdVatu1h6VNMkLYL8Nknwn7ax0J2OhO1bc7dnQRA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
SDL2
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
SDL2
|
|
];
|
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}c++" ];
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
strictDeps = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm755 yapesdl -t ''${!outputBin}/bin/
|
|
install -Dm755 README.SDL -t ''${!outputDoc}/share/doc/yapesdl/
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "http://yape.plus4.net/";
|
|
description = "Multiplatform Commodore 64 and 264 family emulator";
|
|
changelog = "https://github.com/calmopyrin/yapesdl/releases/tag/${finalAttrs.src.rev}";
|
|
license = lib.licenses.gpl2Plus;
|
|
mainProgram = "yapesdl";
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
platforms = lib.platforms.unix;
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
})
|