This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

pkgs: use lib.packagesFromDirectoryRecursive

+4 -21
+4 -21
5pkgs/flake-module.nix
··· 3 3 perSystem = 4 4 { lib, pkgs, ... }: 5 5 { 6 - packages = 7 - let 8 - allPackages = lib.mapAttrs ( 9 - name: _: 10 - let 11 - pkgDir = ./. + "/${name}"; 12 - hasPackageNix = builtins.pathExists (pkgDir + "/package.nix"); 13 - hasDefaultNix = builtins.pathExists (pkgDir + "/default.nix"); 14 - in 15 - if hasPackageNix then 16 - pkgs.callPackage (pkgDir + "/package.nix") { } 17 - else if hasDefaultNix then 18 - builtins.trace "Warning: ${name} is using deprecated default.nix, please rename to package.nix" ( 19 - pkgs.callPackage pkgDir { } 20 - ) 21 - else 22 - throw "Package ${name} has neither package.nix nor default.nix" 23 - ) (lib.filterAttrs (_n: v: v == "directory") (builtins.readDir ./.)); 24 - in 25 - # Filter packages based on meta.platforms 26 - lib.filterAttrs (_name: pkg: lib.meta.availableOn pkgs.stdenv.hostPlatform pkg) allPackages; 6 + packages = lib.packagesFromDirectoryRecursive { 7 + inherit (pkgs) callPackage; 8 + directory = ./.; 9 + }; 27 10 }; 28 11 }