summary refs log tree commit diff
path: root/pkgs/development/libraries/javascript/jquery-ui/default.nix
blob: 9a485906e536659d3685edd7b95875b50e792712 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl, unzip }:

stdenv.mkDerivation rec {
  name = "jquery-ui-1.10.4";

  src = fetchurl {
    url = "http://jqueryui.com/resources/download/${name}.custom.zip";
    sha256 = "04kp27ln74j4k2jacs54264x2bsdjx1dxlw5zlpd889jqv2m6dfc";
  };

  buildInputs = [ unzip ];

  installPhase =
    ''
      mkdir -p $out
      cp -prvd css js $out/

      # For convenience, provide symlinks "jquery.min.js" etc. (i.e.,
      # without the version number).
      pushd $out/js
      ln -s jquery-ui-*.custom.js jquery-ui.js
      ln -s jquery-ui-*.custom.min.js jquery-ui.min.js
      ln -s jquery-1.*.js jquery.js
      popd
      pushd $out/css/smoothness
      ln -s jquery-ui-*.custom.css jquery-ui.css
    '';

  meta = {
    homepage = http://jqueryui.com/;
    description = "A library of JavaScript widgets and effects";
    platforms = stdenv.lib.platforms.all;
  };
}