2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, pkg-config, xorg, imlib2, makeWrapper }:
|
2019-03-08 22:12:49 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "xteddy";
|
2019-08-02 16:10:39 +01:00
|
|
|
version = "2.2-5";
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "salsa.debian.org";
|
|
|
|
owner = "games-team";
|
2020-11-23 08:41:42 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "debian/${version}";
|
2019-08-02 16:10:39 +01:00
|
|
|
sha256 = "0rm7w78d6qajq4fvi4agyqm0c70f3c1i0cy2jdb6kqql2k8w78qy";
|
2019-03-08 22:12:49 +00:00
|
|
|
};
|
2019-08-02 16:10:39 +01:00
|
|
|
|
2019-03-08 22:12:49 +00:00
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
|
|
buildInputs = [ imlib2 xorg.libX11 xorg.libXext ];
|
|
|
|
|
2019-08-02 16:10:39 +01:00
|
|
|
patches = [ "${src}/debian/patches/10_libXext.patch" "${src}/debian/patches/wrong-man-page-section.patch" ];
|
2019-03-08 22:12:49 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s:/usr/games/xteddy:$out/bin/xteddy:" xtoys
|
|
|
|
sed -i "s:/usr/share/xteddy:$out/share/xteddy:" xtoys
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -R images $out/share/images
|
|
|
|
# remove broken test script
|
|
|
|
rm $out/bin/xteddy_test
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
# this is needed, because xteddy expects images to reside
|
|
|
|
# in the current working directory
|
|
|
|
wrapProgram $out/bin/xteddy --run "cd $out/share/images/"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-03-08 22:12:49 +00:00
|
|
|
description = "Cuddly teddy bear for your X desktop";
|
2019-08-02 16:10:39 +01:00
|
|
|
homepage = "https://weber.itn.liu.se/~stegu/xteddy/";
|
2019-03-08 22:12:49 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.xaverdh ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|