mirror of
https://github.com/ilyakooo0/nix-bundle.git
synced 2024-10-10 13:37:55 +03:00
Rename "exporter" to "bundler"
This commit is contained in:
parent
0350a57dcd
commit
f7417243f7
17
flake.nix
17
flake.nix
@ -7,21 +7,20 @@
|
||||
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
in {
|
||||
exporters = forAllSystems (system: let
|
||||
nixpkgs' = nixpkgs.legacyPackages.${system};
|
||||
nix-bundle = import self { nixpkgs = nixpkgs'; };
|
||||
in {
|
||||
nix-bundle = { program }: let
|
||||
bundlers = {
|
||||
nix-bundle = { program, system }: let
|
||||
nixpkgs' = nixpkgs.legacyPackages.${system};
|
||||
nix-bundle = import self { nixpkgs = nixpkgs'; };
|
||||
script = nixpkgs'.writeScript "startup" ''
|
||||
#!/bin/sh
|
||||
.${nix-bundle.nix-user-chroot}/bin/nix-user-chroot -n ./nix -- ${program} $@
|
||||
#!/bin/sh
|
||||
.${nix-bundle.nix-user-chroot}/bin/nix-user-chroot -n ./nix -- ${program} $@
|
||||
'';
|
||||
in nix-bundle.makebootstrap {
|
||||
targets = [ script ];
|
||||
startup = ".${builtins.unsafeDiscardStringContext script} '\"$@\"'";
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
defaultExporter = forAllSystems (system: self.exporters.${system}.nix-bundle);
|
||||
defaultBundler = self.bundlers.nix-bundle;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user