about summary refs log tree commit diff
path: root/third_party/lisp/trivial-mimes.nix
blob: b097a3d0ee67691f58ceade96bee812f292a2825 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ depot, pkgs, ... }:

let
  src = with pkgs; srcOnly lispPackages.trivial-mimes;

  mime-types = pkgs.runCommand "mime-types.lisp" { } ''
    substitute ${src}/mime-types.lisp $out \
      --replace /etc/mime.types ${src}/mime.types \
      --replace "(asdf:system-source-directory :trivial-mimes)" '"/bogus-dir"'
      # We want to prevent an ASDF lookup at build time since this will
      # generally fail — we are not using ASDF after all.
  '';

in
depot.nix.buildLisp.library {
  name = "trivial-mimes";

  deps = [
    {
      sbcl = depot.nix.buildLisp.bundled "uiop";
      default = depot.nix.buildLisp.bundled "asdf";
    }
  ];

  srcs = [ mime-types ];
}