on master help sign in
Rename "exporter" to "bundler"
commitf7417243f7678a23db19589469e10cf67800b391 authorMatthew Bauer <mjbauer95@gmail.com> dateThu 30 Jul 2020, 15:37 (6 years ago) parent0350a57
1 file changed+8−9
flake.nix+8−9
flake.nix+8−9
@@ -7,21 +7,20 @@
77 systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
88 forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
99 in {
10− exporters = forAllSystems (system: let
11− nixpkgs' = nixpkgs.legacyPackages.${system};
12− nix-bundle = import self { nixpkgs = nixpkgs'; };
13− in {
14− nix-bundle = { program }: let
10+ bundlers = {
11+ nix-bundle = { program, system }: let
12+ nixpkgs' = nixpkgs.legacyPackages.${system};
13+ nix-bundle = import self { nixpkgs = nixpkgs'; };
1514 script = nixpkgs'.writeScript "startup" ''
16− #!/bin/sh
17− .${nix-bundle.nix-user-chroot}/bin/nix-user-chroot -n ./nix -- ${program} $@
15+ #!/bin/sh
16+ .${nix-bundle.nix-user-chroot}/bin/nix-user-chroot -n ./nix -- ${program} $@
1817 '';
1918 in nix-bundle.makebootstrap {
2019 targets = [ script ];
2120 startup = ".${builtins.unsafeDiscardStringContext script} '\"$@\"'";
2221 };
23− });
22+ };
2423
25− defaultExporter = forAllSystems (system: self.exporters.${system}.nix-bundle);
24+ defaultBundler = self.bundlers.nix-bundle;
2625 };
2726}