0c178a0ef6
Upstream nixpkgs removed a lot of aliases this time, so we needed to do the following transformations. It's a real shame that aliases only really become discoverable easily when they are removed. * runCommandNoCC -> runCommand * gmailieer -> lieer We also need to work around the fact that home-manager hasn't catched on to this rename. * mysql -> mariadb * pkgconfig -> pkg-config This also affects our Nix fork which needs to be bumped. * prometheus_client -> prometheus-client * rxvt_unicode -> rxvt-unicode-unwrapped * nix-review -> nixpkgs-review * oauth2_proxy -> oauth2-proxy Additionally, some Go-related builders decided to drop support for passing the sha256 hash in directly, so we need to use the generic hash arguments. Change-Id: I84aaa225ef18962937f8616a9ff064822f0d5dc3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6792 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: wpcarro <wpcarro@gmail.com>
57 lines
1.4 KiB
Nix
57 lines
1.4 KiB
Nix
{ depot, pkgs, ... }:
|
|
|
|
let
|
|
inherit (pkgs) cacert iana-etc libredirect stdenv runCommand writeText;
|
|
elmPackages = depot.third_party.elmPackages_0_18;
|
|
|
|
frontend = stdenv.mkDerivation {
|
|
name = "gemma-frontend.html";
|
|
src = ./frontend;
|
|
buildInputs = [ cacert iana-etc elmPackages.elm ];
|
|
|
|
# The individual Elm packages this requires are not packaged and I
|
|
# can't be bothered to do that now, so lets open the escape hatch:
|
|
outputHashAlgo = "sha256";
|
|
outputHash = "000xhds5bsig3kbi7dhgbv9h7myacf34bqvw7avvz7m5mwnqlqg7";
|
|
|
|
phases = [ "unpackPhase" "buildPhase" ];
|
|
buildPhase = ''
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols \
|
|
LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
export SYSTEM_CERTIFICATE_PATH=${cacert}/etc/ssl/certs
|
|
|
|
mkdir .home && export HOME="$PWD/.home"
|
|
elm-make --yes Main.elm --output $out
|
|
'';
|
|
};
|
|
|
|
injectFrontend = writeText "gemma-frontend.lisp" ''
|
|
(in-package :gemma)
|
|
(setq *static-file-location* "${runCommand "frontend" {} ''
|
|
mkdir -p $out
|
|
cp ${frontend} $out/index.html
|
|
''}/")
|
|
'';
|
|
in
|
|
depot.nix.buildLisp.program {
|
|
name = "gemma";
|
|
|
|
deps = with depot.third_party.lisp; [
|
|
cl-json
|
|
cl-prevalence
|
|
hunchentoot
|
|
local-time
|
|
];
|
|
|
|
srcs = [
|
|
./src/gemma.lisp
|
|
injectFrontend
|
|
];
|
|
|
|
# depends on SBCL
|
|
brokenOn = [
|
|
"ccl"
|
|
"ecl"
|
|
];
|
|
}
|