Skip to content

Commit 94a1a53

Browse files
committed
Add the drvToBundle pname to the bundle
1 parent 58e00c9 commit 94a1a53

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

default.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ rec {
1313
# in the context automatically.
1414
else "${target}";
1515

16-
arx = { archive, startup}:
16+
arx = { drvToBundle, archive, startup}:
1717
stdenv.mkDerivation {
18-
name = "arx";
18+
name = if drvToBundle != null then "${drvToBundle.pname}-arx" else "arx";
19+
passthru = {
20+
inherit drvToBundle;
21+
};
1922
buildCommand = ''
2023
# tmpdir has a additional `/` in the beginning to work around `QualifiedPath` checking for `|/|./|../|`
2124
${haskellPackages.arx}/bin/arx tmpx \
@@ -78,9 +81,9 @@ rec {
7881
meta.platforms = lib.platforms.linux;
7982
};
8083

81-
makebootstrap = { targets, startup }:
84+
makebootstrap = { targets, startup, drvToBundle ? null }:
8285
arx {
83-
inherit startup;
86+
inherit drvToBundle startup;
8487
archive = maketar {
8588
inherit targets;
8689
};

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
'';
4141
in
4242
nix-bundle.makebootstrap {
43+
drvToBundle = drv;
4344
targets = [ script ];
4445
startup = ".${builtins.unsafeDiscardStringContext script} '\"$@\"'";
4546
};

0 commit comments

Comments
 (0)