Rename "exporter" to "bundler"

This commit is contained in:
Matthew Bauer 2020-07-30 15:37:21 -05:00
parent 0350a57dcd
commit f7417243f7

View File

@ -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;
};
}