From nix-dev Tue Feb 07 20:45:41 2017 From: Arnold Krille Date: Tue, 07 Feb 2017 20:45:41 +0000 To: nix-dev Subject: Re: [Nix-dev] nix-bundle: Bundle Nix derivations to run anywhere Message-Id: <20170207214541.650ebfec () xingu ! arnoldarts ! de> X-MARC-Message: https://marc.info/?l=nix-dev&m=148650037813664 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============4564389559902334875==" --===============4564389559902334875== Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/2oFt0cvbn1RImzdJiki6A8S"; protocol="application/pgp-signature" --Sig_/2oFt0cvbn1RImzdJiki6A8S Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 6 Feb 2017 18:33:19 -0600 Matthew Bauer wrote: > GitHub page: https://github.com/matthewbauer/nix-bundle >=20 > I just wanted to post about a little project I've been working on. I'm > calling it "nix-bundle". >=20 > Basically, what it does is: take a Nix closure, compress it into a > tarball, and turn that tarball into an executable using "Arx". The > final result looks like a plain shell script, but actually has a > tarball closure appended to it. When you run that script, Arx will > execute "nix-user-chroot" (which is included in the closure) which > will setup a /nix/ directory, then execute a target executable. All of > this should work "out of the box" for any Nix derivation folder with a > valid executable. >=20 > For example, to generate a "hello" bundle: >=20 > ./nix-bundle.sh hello /bin/hello >=20 > "hello" specifies pkgs.hello and /bin/hello specifies the file > ${pkgs.helloi}/bin/hello to be executed. The output file will just be > called "hello". >=20 > The result is a "bundle" that can run without Nix being installed! No > external dependencies are needed because they are all contained within > the Nix closure. So instead of pushing docker images around to bring an app into non-nix-production, we can just push around a tar'ed nix tree? Nice. - Arnold --Sig_/2oFt0cvbn1RImzdJiki6A8S Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAliaMfcACgkQtuvagsE+DE4wpQD/eQ4doib/XITbkD35hGY201uZ 3ZrqWjVAKcuFPAmESyUA/2U7ChuQVSb5/nJKLfRx1QrX2+gGHQM4hGA+lKr6fpGs =ewy0 -----END PGP SIGNATURE----- --Sig_/2oFt0cvbn1RImzdJiki6A8S-- --===============4564389559902334875== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev --===============4564389559902334875==--