2024-05-18 11:36:22 +02:00
|
|
|
{
|
|
|
|
pkgs ? import <nixpkgs> { },
|
|
|
|
lib ? pkgs.lib,
|
|
|
|
nix-unit ? pkgs.nix-unit,
|
|
|
|
}:
|
2024-05-04 17:40:22 +02:00
|
|
|
|
2024-05-05 16:18:30 +02:00
|
|
|
let
|
2024-11-28 17:20:42 +01:00
|
|
|
legacyPackages = rec {
|
|
|
|
inherit (pkgs.callPackage ./pkgs { }) wrapNeovimLazy lazyUtils luaUtils;
|
2024-05-18 11:07:17 +02:00
|
|
|
neovim-lazy = wrapNeovimLazy pkgs.neovim-unwrapped { };
|
|
|
|
};
|
2024-05-05 16:18:30 +02:00
|
|
|
in
|
2024-05-04 17:40:22 +02:00
|
|
|
{
|
|
|
|
# https://github.com/NixOS/rfcs/pull/166
|
|
|
|
formatter = pkgs.nixfmt-rfc-style;
|
2024-05-18 11:36:22 +02:00
|
|
|
apps = {
|
|
|
|
tests = {
|
|
|
|
type = "app";
|
|
|
|
program =
|
|
|
|
(pkgs.writeScript "nix-unit" ''
|
2024-11-30 17:11:41 +01:00
|
|
|
#!/usr/bin/env bash
|
2024-05-18 11:36:22 +02:00
|
|
|
${nix-unit}/bin/nix-unit --flake '.#tests'
|
|
|
|
'').outPath;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-18 11:07:17 +02:00
|
|
|
inherit legacyPackages;
|
|
|
|
packages = lib.filterAttrs (name: value: lib.isDerivation value) legacyPackages;
|
2024-05-04 17:40:22 +02:00
|
|
|
}
|