mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03: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" ```
53 lines
1.5 KiB
Nix
53 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, gettext, pkg-config, wxGTK32,
|
|
boost, icu, lucenepp, asciidoc, libxslt, xmlto, gtk3, gtkspell3, pugixml,
|
|
nlohmann_json, hicolor-icon-theme, wrapGAppsHook3 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "poedit";
|
|
version = "3.4.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vslavik";
|
|
repo = "poedit";
|
|
rev = "v${version}-oss";
|
|
hash = "sha256-SZjsJQYJCXQendzQ2Tobg+IgkWL6lFX5YnMfruPt7UA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoconf automake asciidoc wrapGAppsHook3
|
|
libxslt xmlto boost libtool pkg-config ];
|
|
|
|
buildInputs = [ lucenepp nlohmann_json wxGTK32 icu pugixml gtk3 gtkspell3 hicolor-icon-theme ];
|
|
|
|
propagatedBuildInputs = [ gettext ];
|
|
|
|
preConfigure = "
|
|
patchShebangs bootstrap
|
|
./bootstrap
|
|
";
|
|
|
|
configureFlags = [
|
|
"--without-cld2"
|
|
"--without-cpprest"
|
|
"--with-boost-libdir=${boost.out}/lib"
|
|
"CPPFLAGS=-I${nlohmann_json}/include/nlohmann/"
|
|
"LDFLAGS=-llucene++"
|
|
];
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ gettext ]}")
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "Cross-platform gettext catalogs (.po files) editor";
|
|
mainProgram = "poedit";
|
|
homepage = "https://www.poedit.net/";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ dasj19 ];
|
|
# configure: error: GTK+ build of wxWidgets is required
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|