mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +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" ```
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitLab
|
|
, desktop-file-utils, shared-mime-info, ninja, pkg-config
|
|
, libiconv
|
|
, libX11, libXcursor, libXext, libXi
|
|
, freetype, fontconfig
|
|
, libjpeg, libpng, libtiff, libwebp
|
|
, zlib
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "azpainter";
|
|
version = "3.0.8";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "azelpg";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-NiQYX/Dcl/t30Jx08DKr6EP5ODS00pyEGKh/qiNT5t4=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
desktop-file-utils # for update-desktop-database
|
|
shared-mime-info # for update-mime-info
|
|
ninja
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libX11 libXcursor libXext libXi
|
|
freetype fontconfig
|
|
libjpeg libpng libtiff libwebp
|
|
zlib
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
|
|
|
preBuild = ''
|
|
cd build
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "Full color painting software for illustration drawing";
|
|
homepage = "http://azsky2.html.xdomain.jp/soft/azpainter.html";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
platforms = with platforms; linux ++ darwin;
|
|
mainProgram = "azpainter";
|
|
};
|
|
}
|