Skip to content

Instantly share code, notes, and snippets.

Created October 27, 2017 20:00

Revisions

  1. @invalid-email-address Anonymous created this gist Oct 27, 2017.
    24 changes: 24 additions & 0 deletions default.nix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    { stdenv, fetchurl, unzip, interface, writeText, jre, zopfli }:

    stdenv.mkDerivation {
    name = "static-assets";
    phases = [ "unpackPhase" "installPhase" ];
    buildInputs = [ jre unzip ];
    installPhase = ''
    mkdir -p $out/share
    cp ${./Allsight.svg} $out/Allsight.svg
    cp ${./swoosh.svg} $out/swoosh.svg
    cp dist/semantic.min.css $out
    cp -r dist/themes $out
    cp ${interface}/bin/interface.jsexe/* $out
    export JAVA_HOME=${jre}
    cp ${./closure-compiler/closure-compiler.jar} $out/share/closure-compiler.jar
    ${jre}/bin/java -jar $out/share/closure-compiler.jar ${interface}/*.js --compilation_level=ADVANCED_OPTIMIZATIONS > all.min.js
    zopfli -i1000 all.min.js
    ls -lh all.min.jz.gz
    '';
    src = fetchurl {
    url = "https://github.com/Semantic-Org/Semantic-UI/archive/2.2.10.zip";
    sha256 = "1qysd8yqwqnlxnil1xygjq2mjj7r1jyrq28nqh1mlc4x0cgnhcil";
    };
    }