From d6ca922e39ce99c9de1bdac7aee7bef5955094dd Mon Sep 17 00:00:00 2001 From: Petar Kirov Date: Wed, 19 Apr 2023 18:28:28 +0300 Subject: [PATCH] refactor(pkgs/default.nix): Split packages list based on the platform --- pkgs/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/default.nix b/pkgs/default.nix index 3a1c6122..ec8f773a 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,18 +6,20 @@ pkgs, ... }: let - inherit (pkgs) callPackage; + inherit (pkgs) callPackage lib darwin hostPlatform; darwinPkgs = { - inherit (pkgs.darwin.apple_sdk.frameworks) Foundation; + inherit (darwin.apple_sdk.frameworks) Foundation; }; in { overlayAttrs = self'.packages; - packages = { - dmd = callPackage ./dmd ({} // darwinPkgs); + packages = + { + ldc = callPackage ./ldc {}; - ldc = callPackage ./ldc {}; - - dub = callPackage ./dub {}; - }; + dub = callPackage ./dub {}; + } + // lib.optionalAttrs hostPlatform.isx86 { + dmd = callPackage ./dmd ({} // darwinPkgs); + }; }; }