Skip to content

Commit 9776e62

Browse files
committed
feat(mcl): Make linux-only dependencies optional
1 parent f8109b4 commit 9776e62

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

packages/default.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
let
1010
inherit (lib) optionalAttrs versionAtLeast;
1111
inherit (pkgs) system;
12-
inherit (pkgs.hostPlatform) isLinux;
12+
inherit (pkgs.hostPlatform) isLinux isDarwin isx86;
1313
in
1414
rec {
1515
legacyPackages = {
@@ -65,13 +65,14 @@
6565
// optionalAttrs isLinux {
6666
folder-size-metrics = pkgs.callPackage ./folder-size-metrics { };
6767
}
68-
// optionalAttrs (system == "x86_64-linux") {
68+
// optionalAttrs ((isLinux && isx86) || isDarwin) rec {
6969
mcl = pkgs.callPackage ./mcl {
7070
buildDubPackage = inputs'.dlang-nix.legacyPackages.buildDubPackage.override {
71-
ldc = inputs'.dlang-nix.packages."ldc-binary-1_34_0";
71+
dCompiler = inputs'.dlang-nix.packages."ldc-binary-1_38_0";
7272
};
7373
inherit (legacyPackages.inputs.nixpkgs) cachix nix nix-eval-jobs;
7474
};
7575
};
7676
};
7777
}
78+

packages/mcl/default.nix

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,35 @@
77
...
88
}:
99
let
10+
inherit (pkgs.hostPlatform) isLinux isx86;
1011
deps =
12+
with pkgs;
1113
[
1214
nix
1315
nix-eval-jobs
1416
]
1517
++ (with pkgs; [
1618
gitMinimal
1719
gawk
18-
dmidecode
1920
jc
2021
edid-decode
2122
coreutils-full
2223
util-linux
2324
xorg.xrandr
24-
glxinfo
25+
perl
26+
alejandra
27+
openssh
2528
cachix
26-
]);
29+
])
30+
++ lib.optionals (isLinux && isx86) [
31+
dmidecode
32+
glxinfo
33+
nixos-install-tools
34+
systemd
35+
];
2736
excludedTests = (
2837
lib.concatStringsSep "|" [
29-
"(nix\\.(build|run))"
38+
"(nix\\.(build|run|eval))"
3039
"fetchJson|(coda\.)"
3140
"checkPackage"
3241
"generateShardMatrix"
@@ -56,13 +65,11 @@ buildDubPackage rec {
5665
'';
5766

5867
dubBuildFlags = [
59-
"--compiler=dmd"
6068
"-b"
6169
"debug"
6270
];
6371

6472
dubTestFlags = [
65-
"--compiler=dmd"
6673
"--"
6774
"-e"
6875
excludedTests

packages/mcl/src/src/mcl/commands/host_info.d

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ Info getInfo()
178178
return info;
179179
}
180180

181-
182-
183181
struct Info
184182
{
185183
SoftwareInfo softwareInfo;

0 commit comments

Comments
 (0)