forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitLab, pkg-config, xorg, imlib2, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "xteddy";
|
|
version = "2.2-5";
|
|
src = fetchFromGitLab {
|
|
domain = "salsa.debian.org";
|
|
owner = "games-team";
|
|
repo = pname;
|
|
rev = "debian/${version}";
|
|
sha256 = "0rm7w78d6qajq4fvi4agyqm0c70f3c1i0cy2jdb6kqql2k8w78qy";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config makeWrapper ];
|
|
buildInputs = [ imlib2 xorg.libX11 xorg.libXext ];
|
|
|
|
patches = [ "${src}/debian/patches/10_libXext.patch" "${src}/debian/patches/wrong-man-page-section.patch" ];
|
|
|
|
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/"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Cuddly teddy bear for your X desktop";
|
|
homepage = "https://weber.itn.liu.se/~stegu/xteddy/";
|
|
license = licenses.gpl2;
|
|
maintainers = [ maintainers.xaverdh ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|