about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-08-23T14·28+0100
committerVincent Ambo <tazjin@google.com>2019-08-23T14·28+0100
commitd3f8dd15f3eb1e81eb0bdfeaed5b26550eca22f2 (patch)
tree4a67e423987f9c682c3330c121a6b9fb0305398d
parent31e83b33cc744114c40964fb0c46d9b90737c161 (diff)
fix(gemma): Almost fix Gemma build by porting an old Elm r/57
This pulls in an old version of Elm from NixOS 17.09 which can still
build the Elm code in Gemma.

However, the Common Lisp build is now broken in some other way.
-rw-r--r--default.nix11
-rw-r--r--services/gemma/default.nix12
2 files changed, 15 insertions, 8 deletions
diff --git a/default.nix b/default.nix
index 5d9f128208eb..8eb26950659e 100644
--- a/default.nix
+++ b/default.nix
@@ -12,7 +12,7 @@ let
     tazjin = {
       blog = import ./services/tazblog { inherit pkgs; };
       blog_cli = pkgs.callPackage ./tools/blog_cli {};
-      gemma = import ./services/gemma { inherit pkgs; };
+      gemma = pkgs.callPackage ./services/gemma {};
     };
 
     # Third-party projects (either vendored or modified from nixpkgs) go here:
@@ -25,6 +25,15 @@ let
       rev = "a7076c0f83e5c06ea9067b71171859fa2ba8afd9";
       sha256 = "1p4n2ja4ciw3qfskn65ggpy37mvgf2sslxqmqn8s8jjarnqcyfny";
     }) { pkgs = super; };
+
+    # Gemma needs an older version of Elm to be built. Updating it to
+    # the newer version is a lot of effort.
+    elmPackages = (import (super.fetchFromGitHub {
+      owner = "NixOS";
+      repo = "nixpkgs";
+      rev = "14f9ee66e63077539252f8b4550049381a082518";
+      sha256 = "1wn7nmb1cqfk2j91l3rwc6yhimfkzxprb8wknw5wi57yhq9m6lv1";
+    }) {}).elmPackages;
   };
 
   # The pinned commit here is identical to the public nixery.dev
diff --git a/services/gemma/default.nix b/services/gemma/default.nix
index 8c56e5668588..537875b62534 100644
--- a/services/gemma/default.nix
+++ b/services/gemma/default.nix
@@ -1,15 +1,9 @@
-with import <nixpkgs> {};
+{ stdenv, sbcl, lispPackages, elmPackages, pkgconfig }:
 
 stdenv.mkDerivation rec {
   name = "gemma";
-
   src = ./.;
 
-  # For the time being, Gemma can not be built because it requires an
-  # older version of Elm than what is available and Elm upgrade paths
-  # are painful.
-  broken = true;
-
   buildInputs = with lispPackages; [
     sbcl
     quicklisp
@@ -50,5 +44,9 @@ stdenv.mkDerivation rec {
     description = "Tool for tracking recurring tasks";
     homepage    = "https://github.com/tazjin/gemma";
     license     = licenses.gpl3;
+
+    # For the time being, Gemma can not be built because the Lisp build process
+    # broke in some way I haven't had time to debug.
+    broken = true;
   };
 }