nixpkgs/pkgs/development/libraries/motif/default.nix

53 lines
1.4 KiB
Nix
Raw Normal View History

2021-02-13 02:28:07 +00:00
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, libtool
2016-07-27 17:34:26 +00:00
, xlibsWrapper, xbitmaps, libXrender, libXmu, libXt
, expat, libjpeg, libpng, libiconv
, flex
, libXp, libXau
, demoSupport ? false
2016-07-27 17:34:26 +00:00
}:
# refer to the gentoo package
stdenv.mkDerivation rec {
pname = "motif";
version = "2.3.8";
2016-07-27 17:34:26 +00:00
src = fetchurl {
url = "mirror://sourceforge/motif/${pname}-${version}.tar.gz";
sha256 = "1rxwkrhmj8sfg7dwmkhq885valwqbh26d79033q7vb7fcqv756w5";
2016-07-27 17:34:26 +00:00
};
buildInputs = [
2016-07-30 10:42:36 +00:00
libtool
2016-07-27 17:34:26 +00:00
xlibsWrapper xbitmaps libXrender libXmu libXt
expat libjpeg libpng libiconv
2016-07-30 10:42:36 +00:00
];
2016-07-27 17:34:26 +00:00
nativeBuildInputs = [ pkg-config flex ];
2016-07-27 17:34:26 +00:00
propagatedBuildInputs = [ libXp libXau ];
prePatch = lib.optionalString (!demoSupport) ''
sed '/^SUBDIRS =,^$/s/\<demos\>//' -i Makefile.{am,in}
'';
2016-07-30 10:42:36 +00:00
2021-02-13 02:28:07 +00:00
patches = [
./Remove-unsupported-weak-refs-on-darwin.patch
./Add-X.Org-to-bindings-file.patch
(fetchpatch rec {
name = "fix-format-security.patch";
url = "https://raw.githubusercontent.com/void-linux/void-packages/b9a1110dabb01c052dadc1abae1413bd4afe3652/srcpkgs/motif/patches/02-${name}";
sha256 = "13vzpf8yxvhf4gl7q0yzlr6ak1yzx382fsqsrv5lc8jbbg4nwrrq";
})
];
enableParallelBuilding = true;
2016-07-27 17:34:26 +00:00
meta = with lib; {
homepage = "https://motif.ics.com";
2016-07-27 17:34:26 +00:00
description = "Unix standard widget-toolkit and window-manager";
platforms = platforms.unix;
license = with licenses; [ lgpl21Plus ];
maintainers = with maintainers; [ qyliss ];
2016-07-27 17:34:26 +00:00
};
}