about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@gmail.com>2014-09-30 00:35:40 -0300
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-10-01 02:04:36 +0100
commit6acd05f27aab18e740ed0d8cf0e16987d85ab76a (patch)
tree21278d3e16eae60c58355dd73a95d69abc8e039a /pkgs
parent57b292fb1b520db199a9edfe234797ce8d26874c (diff)
Sound of Sorting: New Package
Sound of Sorting is an array-sorting visual+sound demo program.
It shows an array as a list of horizontal bars, and realizes a
step-by-step sorting of it. Moreover, it colorizes and emits a
"8-bit-game-like" sound throughout its execution.

Closes #4341
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/misc/sound-of-sorting/default.nix28
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/misc/sound-of-sorting/default.nix b/pkgs/misc/sound-of-sorting/default.nix
new file mode 100644
index 0000000000000..fa1be80287a2c
--- /dev/null
+++ b/pkgs/misc/sound-of-sorting/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl
+, SDL2, wxGTK
+}:
+
+stdenv.mkDerivation rec {
+
+  name = "sound-of-sorting-${version}";
+  version = "0.6.5";
+
+  src = fetchurl {
+    url = "https://github.com/bingmann/sound-of-sorting/archive/${name}.tar.gz";
+    sha256 = "1524bhmy5067z9bjc15hvqslw43adgpdn4272iymq09ahja4x76b";
+  };
+
+  buildInputs = with stdenv.lib;
+  [ wxGTK SDL2 ];
+
+  preConfigure = ''
+    export SDL_CONFIG=${SDL2}/bin/sdl2-config
+  '';
+
+  meta = with stdenv.lib;{
+    description = "Audibilization and Visualization of Sorting Algorithms";
+    homepage = http://panthema.net/2013/sound-of-sorting/;
+    license = licenses.gpl3;
+    maintainers = [ maintainers.AndersonTorres ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 191a50df33cc0..465a8b979aafa 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -11891,6 +11891,8 @@ let
 
   slock = callPackage ../misc/screensavers/slock { };
 
+  soundOfSorting = callPackage ../misc/sound-of-sorting { };
+
   sourceAndTags = import ../misc/source-and-tags {
     inherit pkgs stdenv unzip lib ctags;
     hasktags = haskellPackages.hasktags;