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