diff options
author | adisbladis <adisbladis@gmail.com> | 2018-03-06 15:34:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 15:34:34 +0800 |
commit | c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e (patch) | |
tree | 71cca1512c2644cd3d4d560ae63001a6ce853f4e /nixos/lib | |
parent | 7f26c1b7fbd525f6b998fcde510e69278fd8e6f7 (diff) | |
parent | b7ec621e91b2653d8ddb72cc8bb8e5972d30717d (diff) | |
download | nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.tar nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.tar.gz nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.tar.bz2 nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.tar.lz nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.tar.xz nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.tar.zst nixlib-c4c1d979e9972a9f07a0ce20ef7d5cccc4e3f70e.zip |
Merge pull request #35844 from adisbladis/jquery-mv
jquery & jquery-ui: Move to nixos/lib/testing/
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/testing.nix | 10 | ||||
-rw-r--r-- | nixos/lib/testing/jquery-ui.nix | 24 | ||||
-rw-r--r-- | nixos/lib/testing/jquery.nix | 36 |
3 files changed, 67 insertions, 3 deletions
diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index efcafbaa5554..d990a5f8b6ac 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -3,7 +3,11 @@ with import ./build-vms.nix { inherit system minimal config; }; with pkgs; -rec { +let + jquery-ui = callPackage ./testing/jquery-ui.nix { }; + jquery = callPackage ./testing/jquery.nix { }; + +in rec { inherit pkgs; @@ -143,8 +147,8 @@ rec { test = passMeta (runTests driver); report = passMeta (releaseTools.gcovReport { coverageRuns = [ test ]; }); - in (if makeCoverageReport then report else test) // { - inherit nodes driver test; + in (if makeCoverageReport then report else test) // { + inherit nodes driver test; }; runInMachine = diff --git a/nixos/lib/testing/jquery-ui.nix b/nixos/lib/testing/jquery-ui.nix new file mode 100644 index 000000000000..e65107a3c2fb --- /dev/null +++ b/nixos/lib/testing/jquery-ui.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, unzip }: + +stdenv.mkDerivation rec { + name = "jquery-ui-1.11.4"; + + src = fetchurl { + url = "http://jqueryui.com/resources/download/${name}.zip"; + sha256 = "0ciyaj1acg08g8hpzqx6whayq206fvf4whksz2pjgxlv207lqgjh"; + }; + + buildInputs = [ unzip ]; + + installPhase = + '' + mkdir -p "$out/js" + cp -rv . "$out/js" + ''; + + meta = { + homepage = http://jqueryui.com/; + description = "A library of JavaScript widgets and effects"; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/nixos/lib/testing/jquery.nix b/nixos/lib/testing/jquery.nix new file mode 100644 index 000000000000..103721cadc38 --- /dev/null +++ b/nixos/lib/testing/jquery.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, compressed ? true }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "jquery-1.11.3"; + + src = if compressed then + fetchurl { + url = "http://code.jquery.com/${name}.min.js"; + sha256 = "1f4glgxxn3jnvry3dpzmazj3207baacnap5w20gr2xlk789idfgc"; + } + else + fetchurl { + url = "http://code.jquery.com/${name}.js"; + sha256 = "1v956yf5spw0156rni5z77hzqwmby7ajwdcd6mkhb6zvl36awr90"; + }; + + unpackPhase = "true"; + + installPhase = + '' + mkdir -p "$out/js" + cp -v "$src" "$out/js/jquery.js" + ${optionalString compressed '' + (cd "$out/js" && ln -s jquery.js jquery.min.js) + ''} + ''; + + meta = with stdenv.lib; { + description = "JavaScript library designed to simplify the client-side scripting of HTML"; + homepage = http://jquery.com/; + license = licenses.mit; + platforms = platforms.all; + }; +} |