Commit Graph

41 Commits

Author SHA1 Message Date
Derek Kulinski
b7c5c58cb4 Allow to run an init script on startup.
This allows for example to set specific environment variables,
before starting the script without needing to modify the target.
2022-04-28 17:22:18 -07:00
Matthew Bauer
223f4ffc41
Merge pull request #79 from aloiscochard/feature/fix-path
Properly differentiate between derivation and store path.
2021-07-19 09:28:37 -05:00
Symphorien Gibol
2e39b202b2 remove usage of stdenv.lib
this was removed in recent nixpkgs
2021-07-19 12:00:00 +00:00
Alois Cochard
876dda8270 Properly differentiate between derivation and store path.
The previous check was actually not differentiating between the two
cases defined in `test.sh` (both cases were ignore and the if branch was
never used).

By using `isDerivation` we now properly distinguish between the two
cases, and add the missing context when necessary.
2021-05-04 17:27:55 +02:00
zimbatm
33b7756441
fixes #68
The logic wasn't quite right in #67.

I also added a ./test.sh to check for both use-cases.
2020-11-29 13:29:02 +01:00
zimbatm
cb765ad91c
support store paths
Allow to pass a store path as a target. This is useful when combining
nix-bundle with the output of another build.

Eg:

    nix-bundle.sh $(nix-build "<nixpkgs>" -A hello) /bin/hello
2020-11-09 17:11:56 +01:00
zimbatm
cc47fa353c
fix argument forwarding
If the argument had a whitespace, it would be forwarded as two separate
arguments.

Eg: ./hello -g "hello world!"
2020-10-22 16:06:08 +02:00
Matthew Bauer
0350a57dcd Restrict nix-user-chroot platforms to linux 2020-07-30 15:33:06 -05:00
Michael Bishop
e8d57a08bc
fix the startup script to run on dash based systems 2018-12-07 05:00:32 -04:00
Matthew Bauer
ebbcafa214 Cleanup logic 2018-04-25 14:29:51 -05:00
Matthew Bauer
d371f1a5a6 Store temp files in $HOME/.cache
This hopefully means we can reuse it.
2018-04-10 12:58:56 -05:00
Matthew Bauer
5e49fbc4a0 Cleanup Nix bundling
The special case of Nix bundling is useful for handling the hidden
dependencies of Nix. It will automatically add them for you when you
do this:

$ nix-bundle nix /bin/nix
2018-04-04 16:19:32 -05:00
Matthew Bauer
e33eb8feda Fix arg passing in nix-bundle 2018-04-04 15:04:37 -05:00
Michael Bishop
982cb122d9
auto-delete the tmpdir when finished 2018-04-04 07:33:01 -03:00
michael bishop
630e89d1d1
overhaul most of nix-bundle
pulled nix-user-chroot into the same repo
put the startup command into a bash script, so the tarball job knows its deps
changed nix-user-chroot into a c++ program
added CLI flags to allow configuring the sandbox it produces
2018-02-19 21:45:03 -04:00
Matthew Bauer
ffa3349432 update nix-user-chroot again 2017-11-08 20:46:55 -06:00
Matthew Bauer
74c98a53ea Update nix-user-chroot 2017-11-07 21:46:03 -06:00
Matthew Bauer
fde9bdfede Fixup for bzip2-less environs 2017-04-30 02:09:34 -05:00
Matthew Bauer
7a7c745883 Fixup build inputs for maketar (again) 2017-04-30 01:48:41 -05:00
Matthew Bauer
f272599e8d update nix-user-chroot 2017-04-30 00:39:56 -05:00
Matthew Bauer
1584ab8dc4 Allow multiple targets in nix-bundle 2017-04-29 19:54:09 -05:00
Matthew Bauer
711eefc721 Fixup build inputs for maketar 2017-04-26 23:03:01 -05:00
Matthew Bauer
6e1bc68895 Pass command line args to script
Fixes #13
2017-04-26 14:03:45 -05:00
Matthew Bauer
80a769483f Inline default.nix stuff
Makes things easier to work with.
2017-04-26 01:31:01 -05:00
Matthew Bauer
43f167eb0d Add some scripts to deal with closures.
To be documented later.
2017-02-12 18:21:51 -06:00
Matthew Bauer
43f0f0401f Add nix2appimage.sh script. 2017-02-06 16:18:09 -06:00
Matthew Bauer
21b6115ddf Add nix-bundle.sh. 2016-11-26 01:05:43 -06:00
Matthew Bauer
6dc15dff24 Revert "Use proot instead of nix-user-chroot."
This reverts commit f24309c9d1.
2016-11-18 10:53:30 -06:00
Matthew Bauer
0692fadd3d Get rid of old emacs derivatino 2016-11-18 10:53:11 -06:00
Matthew Bauer
f24309c9d1
Use proot instead of nix-user-chroot. 2016-11-14 01:57:05 -06:00
Matthew Justin Bauer
499bd545b4 Update default.nix 2016-06-22 13:23:11 -05:00
Matthew Bauer
3ef86c995d Make closure sizes a little bit smaller. 2016-06-20 20:53:27 +00:00
Matthew Bauer
cfe7aef52d Fix arx builds for bundles. 2016-06-17 18:39:12 +00:00
Matthew Bauer
8be15d73f2 Use arx instead of makeself. 2016-06-17 17:37:23 +00:00
Matthew Bauer
36ebf90e18 Add in some more bundles. 2016-06-17 15:51:50 +00:00
Matthew Bauer
1b1a9f1bf2 Add hello bundle. 2016-06-15 19:09:50 +00:00
Matthew Bauer
96e958234d Add nix installer.
Add self extracting nix installer.
2016-06-15 18:53:47 +00:00
Matthew Bauer
97dd6220f8 Pull sources into repo.
nix-user-chroot now uses local version instead of lethalman's
2016-06-15 16:23:19 +00:00
Matthew Bauer
2ce85648d9 More refactoring. 2016-06-14 20:39:10 +00:00
Matthew Bauer
2cb965c186 refactor 2016-06-14 20:39:10 +00:00
Matthew Bauer
5d4a181152 Initial commit 2016-06-14 19:52:00 +00:00