Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 61 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 pkg-config, 6 xorg, 7 imlib2, 8 makeWrapper, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "xteddy"; 13 version = "2.2-5"; 14 src = fetchFromGitLab { 15 domain = "salsa.debian.org"; 16 owner = "games-team"; 17 repo = "xteddy"; 18 rev = "debian/${version}"; 19 sha256 = "0rm7w78d6qajq4fvi4agyqm0c70f3c1i0cy2jdb6kqql2k8w78qy"; 20 }; 21 22 nativeBuildInputs = [ 23 pkg-config 24 makeWrapper 25 ]; 26 buildInputs = [ 27 imlib2 28 xorg.libX11 29 xorg.libXext 30 ]; 31 32 patches = [ 33 "${src}/debian/patches/10_libXext.patch" 34 "${src}/debian/patches/wrong-man-page-section.patch" 35 ]; 36 37 postPatch = '' 38 sed -i "s:/usr/games/xteddy:$out/bin/xteddy:" xtoys 39 sed -i "s:/usr/share/xteddy:$out/share/xteddy:" xtoys 40 ''; 41 42 postInstall = '' 43 cp -R images $out/share/images 44 # remove broken test script 45 rm $out/bin/xteddy_test 46 ''; 47 48 postFixup = '' 49 # this is needed, because xteddy expects images to reside 50 # in the current working directory 51 wrapProgram $out/bin/xteddy --chdir "$out/share/images/" 52 ''; 53 54 meta = with lib; { 55 description = "Cuddly teddy bear for your X desktop"; 56 homepage = "https://weber.itn.liu.se/~stegu/xteddy/"; 57 license = licenses.gpl2; 58 maintainers = [ maintainers.xaverdh ]; 59 platforms = platforms.linux; 60 }; 61}