tvl-depot/third_party/lisp/trivial-mimes.nix
Vincent Ambo e9bfa84aaf refactor(3p/lisp): Use sources from nixpkgs where possible
nixpkgs includes a lispPackages set which is generated from something.
In the meantime, we pretty much never update our Lisp deps.

This commit ties our sources to nixpkgs.lispPackages where the desired
package is included in nixpkgs (which is actually most of them!)

Change-Id: I520a006535980271b2fa4e0ed4e34029475dcbef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4331
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-12-15 10:34:02 +00:00

25 lines
670 B
Nix

{ 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 ];
}