Skip to content

Commit 4035e4d

Browse files
committed
flake: allow extra arguments to be passed to devShell
Signed-off-by: jae beller <[email protected]>
1 parent 2987c82 commit 4035e4d

File tree

1 file changed

+26
-23
lines changed

1 file changed

+26
-23
lines changed

buildTools/pebbleEnv.nix

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
cloudPebble ? false,
1212
nativeBuildInputs ? [ ],
1313
CFLAGS ? "",
14+
...
1415
}@attrs:
1516

1617
let
@@ -31,31 +32,33 @@ shellPkgs.callPackage (
3132
lib,
3233
nodejs,
3334
}:
34-
gccStdenv.mkDerivation {
35-
name = "pebble-env";
36-
phases = [ "nophase" ];
35+
gccStdenv.mkDerivation (
36+
{
37+
name = "pebble-env";
38+
phases = [ "nophase" ];
3739

38-
nativeBuildInputs =
39-
[
40-
nodejs
41-
pebble.pebble-qemu
42-
pebble.pebble-tool
43-
]
44-
++ lib.optionals (!isAppleSilicon) [
45-
pebble.arm-embedded-toolchain
46-
]
47-
++ nativeBuildInputs;
40+
nativeBuildInputs =
41+
[
42+
nodejs
43+
pebble.pebble-qemu
44+
pebble.pebble-tool
45+
]
46+
++ lib.optionals (!isAppleSilicon) [
47+
pebble.arm-embedded-toolchain
48+
]
49+
++ nativeBuildInputs;
4850

49-
PEBBLE_PHONE = devServerIP;
50-
PEBBLE_EMULATOR = emulatorTarget;
51-
PEBBLE_CLOUDPEBBLE = if cloudPebble then "1" else null;
51+
PEBBLE_PHONE = devServerIP;
52+
PEBBLE_EMULATOR = emulatorTarget;
53+
PEBBLE_CLOUDPEBBLE = if cloudPebble then "1" else null;
5254

53-
CFLAGS = (lib.optionalString isAppleSilicon "-Wno-error -include sys/types.h ") + CFLAGS;
55+
CFLAGS = (lib.optionalString isAppleSilicon "-Wno-error -include sys/types.h ") + CFLAGS;
5456

55-
nophase = ''
56-
echo This derivation is a Pebble development shell, and not meant to be built.
57-
exit 1
58-
'';
59-
}
60-
// rest
57+
nophase = ''
58+
echo This derivation is a Pebble development shell, and not meant to be built.
59+
exit 1
60+
'';
61+
}
62+
// rest
63+
)
6164
) { }

0 commit comments

Comments
 (0)