summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorxaverdh <xaverdh@users.noreply.github.com>2019-03-08 22:12:49 +0000
committerxeji <36407913+xeji@users.noreply.github.com>2019-03-08 23:12:49 +0100
commitebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435 (patch)
tree9f209b836a317f6e9ecc801494007f9680e36e2a /pkgs/applications
parentd7c23cc65f94692146d5e387976a360bfbc445dd (diff)
downloadnixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.tar
nixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.tar.gz
nixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.tar.bz2
nixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.tar.lz
nixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.tar.xz
nixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.tar.zst
nixpkgs-ebcfdf5eb0ae9d78e3f44a501fb21df6c1f9f435.zip
xteddy: init at 2.2 (#57057)
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/xteddy/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/misc/xteddy/default.nix b/pkgs/applications/misc/xteddy/default.nix
new file mode 100644
index 00000000000..6f67ed96c57
--- /dev/null
+++ b/pkgs/applications/misc/xteddy/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchzip, pkg-config, xorg, imlib2, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  name = "xteddy-${version}";
+  version = "2.2";
+  src = fetchzip {
+    url = "https://deb.debian.org/debian/pool/main/x/xteddy/xteddy_${version}.orig.tar.gz";
+    sha256 = "0sap4fqvs0888ymf5ga10p3n7n5kr35j38kfsfd7nj0xm4hmcma3";
+  };
+  nativeBuildInputs = [ pkg-config makeWrapper ];
+  buildInputs = [ imlib2 xorg.libX11 xorg.libXext ];
+
+  makeFlags = [ "LIBS=-lXext" ];
+
+  postPatch = ''
+    sed -i 's/man 1 xteddy/man 6 xteddy/' xteddy.c
+    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 stdenv.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;
+  };
+}