From df16233130d779fe165c68f3f78064fe9fdba158 Mon Sep 17 00:00:00 2001 From: niten Date: Wed, 29 May 2024 17:25:38 -0700 Subject: [PATCH] Add lisp util functions --- flake.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/flake.nix b/flake.nix index bd8a453..588fecf 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,17 @@ }); }; + lib = let + gatherDependencies = with nixpkgs.lib; + pkg: + unique (pkg.propagatedBuildInputs + ++ (concatMap gatherDepdendencies pkg.propagatedBuildInputs)); + + lispSourceRegistry = pkg: + nixpkgs.lib.concatStringsSep ":" + (map (p: "${p}//") (gatherDependencies pkg)); + in { inherit gatherDependencies lispSourceRegistry; }; + nixosModules = rec { default = packages; packages = { ... }: {