diff --git a/website/default.nix b/website/default.nix index 4fd85f260..514b60cec 100644 --- a/website/default.nix +++ b/website/default.nix @@ -8,6 +8,6 @@ pkgs.stdenv.mkDerivation { cp $src/index.html $out mkdir -p $out/habits - cp ${briefcase.website.habits} $out/habits/index.html + cp ${briefcase.website.habit-screens} $out/habits/index.html ''; } diff --git a/website/habit-screens/default.nix b/website/habit-screens/default.nix index 19fd1b37c..c042dc8c8 100644 --- a/website/habit-screens/default.nix +++ b/website/habit-screens/default.nix @@ -1,8 +1,6 @@ -{ nixpkgs ? -, config ? {} -}: +{ pkgs ? , ... }: -with (import nixpkgs config); +with pkgs; let mkDerivation = @@ -42,12 +40,22 @@ let '') targets)} ''; }; -in mkDerivation { - name = "elm-app-0.1.0"; - srcs = ./elm-srcs.nix; - src = ./.; - targets = ["Main"]; - srcdir = "./src"; - outputJavaScript = false; + mainDotElm = mkDerivation { + name = "elm-app-0.1.0"; + srcs = ./elm-srcs.nix; + src = ./.; + targets = ["Main"]; + srcdir = "./src"; + outputJavaScript = true; + }; +in stdenv.mkDerivation { + name = "habit-screens"; + buildInputs = []; + src = builtins.path { path = ./.; name = "habit-screens"; }; + buildPhase = '' + mkdir -p $out + cp index.html output.css ${mainDotElm}/Main.min.js $out + ''; + dontInstall = true; }