mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53: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" ```
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, pkg-config
|
|
, glib
|
|
, gtk2
|
|
, menu-cache
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openbox-menu";
|
|
version = "0.8.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://bitbucket.org/fabriceT/openbox-menu/downloads/${pname}-${version}.tar.bz2";
|
|
sha256 = "1hi4b6mq97y6ajq4hhsikbkk23aha7ikaahm92djw48mgj2f1w8l";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ glib gtk2 menu-cache ];
|
|
|
|
# Enables SVG support by uncommenting the Makefile
|
|
patches = [ ./000-enable-svg.patch ];
|
|
|
|
# The strip options are not recognized by Darwin.
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
sed -i -e '/strip -s/d' Makefile
|
|
'';
|
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
installFlags = [ "prefix=${placeholder "out"}" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://fabrice.thiroux.free.fr/openbox-menu_en.html";
|
|
description = "Dynamic XDG menu generator for Openbox";
|
|
longDescription = ''
|
|
Openbox-menu is a pipemenu for Openbox window manager. It provides a
|
|
dynamic menu listing installed applications. Most of the work is done by
|
|
the LXDE library menu-cache.
|
|
'';
|
|
license = licenses.gpl3Plus;
|
|
maintainers = [ maintainers.romildo ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "openbox-menu";
|
|
};
|
|
}
|