2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, gtk, pkg-config, procps, makeWrapper, ... }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xbindkeys-config";
|
|
|
|
version = "0.1.3";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10.
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
|
|
buildInputs = [ gtk ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/x/xbindkeys-config/xbindkeys-config_${version}.orig.tar.gz";
|
|
|
|
sha256 = "1rs3li2hyig6cdzvgqlbz0vw6x7rmgr59qd6m0cvrai8xhqqykda";
|
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://packages.debian.org/source/xbindkeys-config";
|
|
|
|
description = "Graphical interface for configuring xbindkeys";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with lib.maintainers; [benley];
|
|
|
|
platforms = with lib.platforms; linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "xbindkeys-config";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./xbindkeys-config-patch1.patch ];
|
|
|
|
|
|
|
|
# killall is dangerous on non-gnu platforms. Use pkill instead.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace middle.c --replace "killall" "pkill -x"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
|
|
gzip -c ${./xbindkeys-config.1} > $out/share/man/man1/xbindkeys-config.1.gz
|
|
|
|
cp xbindkeys_config $out/bin/xbindkeys-config
|
|
|
|
wrapProgram $out/bin/xbindkeys-config --prefix PATH ":" "${procps}/bin"
|
|
|
|
'';
|
|
|
|
}
|