Skip to content

Commit 0d61adb

Browse files
Try #1598:
2 parents 3c9acea + 639999e commit 0d61adb

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

builder/shell-for.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ let
145145
mkDrvArgs = builtins.removeAttrs args ["packages" "components" "additional" "withHoogle" "tools"];
146146
in
147147
mkShell (mkDrvArgs // {
148-
name = mkDrvArgs.name or name;
148+
name = if (mkDrvArgs.name or null) == null then name else mkDrvArgs.name;
149149

150150
buildInputs = systemInputs
151151
++ mkDrvArgs.buildInputs or [];

modules/shell.nix

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{ projectConfig }:
22
{ lib, config, pkgs, haskellLib, ... }: {
33
options = {
4+
name = lib.mkOption {
5+
type = lib.types.nullOr lib.types.str;
6+
default = null;
7+
};
48
packages = lib.mkOption {
59
type = lib.types.unspecified;
610
default = ps: builtins.attrValues (haskellLib.selectLocalPackages ps);
@@ -41,5 +45,29 @@
4145
type = lib.types.unspecified;
4246
default = projectConfig.crossPlatforms;
4347
};
48+
49+
# mkShell args
50+
inputsFrom = lib.mkOption {
51+
type = lib.types.listOf lib.types.unspecified;
52+
default = [];
53+
};
54+
shellHook = lib.mkOption {
55+
type = lib.types.str;
56+
default = "";
57+
};
58+
59+
# mkDerivation args
60+
buildInputs = lib.mkOption {
61+
type = lib.types.listOf lib.types.unspecified;
62+
default = [];
63+
};
64+
nativeBuildInputs = lib.mkOption {
65+
type = lib.types.listOf lib.types.unspecified;
66+
default = [];
67+
};
68+
passthru = lib.mkOption {
69+
type = lib.types.attrsOf lib.types.unspecified;
70+
default = {};
71+
};
4472
};
4573
}

0 commit comments

Comments
 (0)