File tree 1 file changed +17
-9
lines changed 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change 23
23
)
24
24
) ;
25
25
in
26
- inputs . utils . lib . eachDefaultSystem ( system : {
27
- bundlers = {
28
- default = inputs . self . bundlers . ${ system } . nix-bundle ;
29
- nix-bundle =
30
- drv :
26
+ inputs . utils . lib . eachDefaultSystem (
27
+ system :
28
+ let
29
+ nix-bundle-fun =
30
+ {
31
+ drv ,
32
+ programPath ? getExe drv ,
33
+ } :
31
34
let
32
- program = getExe drv ;
33
35
nixpkgs = inputs . nixpkgs . legacyPackages . ${ system } ;
34
36
nix-bundle = import inputs . self { inherit nixpkgs ; } ;
35
37
script = nixpkgs . writeScript "startup" ''
36
38
#!/bin/sh
37
- .${ nix-bundle . nix-user-chroot } /bin/nix-user-chroot -n ./nix -- ${ program } "$@"
39
+ .${ nix-bundle . nix-user-chroot } /bin/nix-user-chroot -n ./nix -- ${ programPath } "$@"
38
40
'' ;
39
41
in
40
42
nix-bundle . makebootstrap {
41
43
targets = [ script ] ;
42
44
startup = ".${ builtins . unsafeDiscardStringContext script } '\" $@\" '" ;
43
45
} ;
44
- } ;
45
- } ) ;
46
+ in
47
+ {
48
+ bundlers = {
49
+ default = inputs . self . bundlers . ${ system } . nix-bundle ;
50
+ nix-bundle = drv : nix-bundle-fun { inherit drv ; } ;
51
+ } ;
52
+ }
53
+ ) ;
46
54
}
You can’t perform that action at this time.
0 commit comments