From 303122dfc83dc79b090bad57031be679e1c50ad0 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 21 Nov 2024 23:33:37 -0500 Subject: [PATCH] feat: add packages to checks --- checks/{apps.nix => apps/default.nix} | 0 checks/default.nix | 7 ++++--- checks/{machines.nix => devices/default.nix} | 0 checks/packages/default.nix | 15 +++++++++++++++ packages/trash-d/default.nix | 9 +++++++++ 5 files changed, 28 insertions(+), 3 deletions(-) rename checks/{apps.nix => apps/default.nix} (100%) rename checks/{machines.nix => devices/default.nix} (100%) create mode 100644 checks/packages/default.nix diff --git a/checks/apps.nix b/checks/apps/default.nix similarity index 100% rename from checks/apps.nix rename to checks/apps/default.nix diff --git a/checks/default.nix b/checks/default.nix index fdbd64ab..44a43817 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -2,7 +2,8 @@ pkgs, self, }: let - apps = import ./apps.nix {inherit pkgs self;}; - nixosMachines = import ./machines.nix {inherit pkgs self;}; + apps = import ./apps {inherit pkgs self;}; + devices = import ./devices {inherit pkgs self;}; + packages = import ./packages {inherit pkgs self;}; in - apps // nixosMachines + apps // devices // packages diff --git a/checks/machines.nix b/checks/devices/default.nix similarity index 100% rename from checks/machines.nix rename to checks/devices/default.nix diff --git a/checks/packages/default.nix b/checks/packages/default.nix new file mode 100644 index 00000000..42d48a67 --- /dev/null +++ b/checks/packages/default.nix @@ -0,0 +1,15 @@ +{ + pkgs, + self, +}: let + inherit (pkgs.lib) elem filterAttrs hasAttr; + + packages = + filterAttrs ( + _: v: + !(hasAttr "platforms" v.meta) + || elem pkgs.system v.meta.platforms + ) + self.packages.${pkgs.system}; +in + packages diff --git a/packages/trash-d/default.nix b/packages/trash-d/default.nix index fa16fb9d..2ef9353d 100644 --- a/packages/trash-d/default.nix +++ b/packages/trash-d/default.nix @@ -36,4 +36,13 @@ in ronn --roff --pipe MANUAL.md > $out/man/man1/trash.1 ''; + + meta = { + mainProgram = "trash"; + platforms = [ + "x86_64-linux" + "i686-linux" + "x86_64-darwin" + ]; + }; }