Commit Graph

155 Commits

Author SHA1 Message Date
Matthew Bauer
e9fa7e8a11
Merge pull request #87 from takeda/init-script
Allow to run an init script on startup.
2022-08-09 22:07:17 -05:00
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
Matthew Bauer
0c6deae1f9
Merge pull request #83 from symphorien/fix-stdenv-lib
remove usage of stdenv.lib
2021-07-19 09:28:03 -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
Matthew Bauer
8e396533ef
Merge pull request #73 from BBBSnowball/pr-1
Add missing quotes
2021-01-20 16:55:27 -06:00
Benjamin Koch
2d09206fa7 Add missing quotes 2021-01-19 01:54:19 +01:00
Matthew Bauer
27f20492c5
Merge pull request #71 from zimbatm/echo-out
nix-bundle: print the output path instead
2020-12-02 17:04:16 -06:00
Matthew Bauer
1ceecc645f
Merge pull request #70 from zimbatm/fixup
fixes #68
2020-12-02 17:03:36 -06:00
zimbatm
e1e1000ec2
nix-bundle: print the output path instead
When nix-bundle is invoked without a TTY, output the store path instead
of catting the content. This allows more flexibility.
2020-12-02 15:46:49 +01: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
Matthew Bauer
c5f2dfc736
Merge pull request #67 from zimbatm/shellcheck
fix shellcheck warnings
2020-11-09 10:54:06 -06: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
zimbatm
b90d88d50f
nix-run.sh: fix shellcheck warnings 2020-10-22 15:43:55 +02:00
zimbatm
5672912336
nix-bootstrap.sh: fix shellcheck warnings
It also changes how the arguments are being passed around.
2020-10-22 15:43:48 +02:00
zimbatm
565770f037
nix-bundle.sh: fix shellcheck warnings 2020-10-22 15:42:39 +02:00
Thibault Lemaire
83742ac8ea Add ivan to the examples. An SDL game 2020-08-29 22:35:06 -05:00
Thibault Lemaire
d62327676e Add xskat to the examples
A small enough graphical app
2020-08-29 22:34:59 -05:00
Matthew Bauer
f7417243f7 Rename "exporter" to "bundler" 2020-07-30 15:37:21 -05:00
Matthew Bauer
0350a57dcd Restrict nix-user-chroot platforms to linux 2020-07-30 15:33:06 -05:00
Matthew Bauer
cad462508b Remove darwin system 2020-07-30 11:37:50 -05:00
Matthew Bauer
1bffaa07f3 Add flake.nix 2020-07-30 11:32:21 -05:00
Matthew Bauer
5caec2e85a
Merge pull request #64 from symphorien/fix-system
symlink /bin to /usr/bin
2020-07-23 11:08:09 -05:00
Symphorien Gibol
2d68863003 symlink /bin to /usr/bin
If the content of the appimage contains $out/bin/sh, then /bin/sh exists
and system() works.
2020-07-21 11:25:44 +02:00
Matthew Bauer
abd463366b Release 0.4.0 2020-05-20 11:06:15 -05:00
Matthew Bauer
5ba831bd8d Quote properly in nix-run.sh 2020-05-09 15:30:16 -05:00
Matthew Bauer
bdd1a0fe79 Actually exec on linux 2020-05-09 15:30:02 -05:00
Matthew Bauer
e0ea9901f7 Fix Exec= detection in nix-run.sh
Fixes #59
2020-05-09 15:28:40 -05:00
Matthew Bauer
2a8b914e1b Revert "Merge pull request #48 from haslersn/enhancement/modern-cli"
This reverts commit 4300437ede, reversing
changes made to f028e10ffb.
2020-05-09 15:20:29 -05:00
Matthew Bauer
4300437ede
Merge pull request #48 from haslersn/enhancement/modern-cli
nix-bundle.sh: Modernize CLI
2019-11-03 12:00:18 -05:00
Matthew Bauer
f028e10ffb
Merge pull request #51 from tomberek/preserve_pwd
Preserve PWD
2019-07-15 17:55:17 -04:00
tom@rebelliondefense.com
25b7dfa407 Preserve PWD 2019-07-13 16:27:04 -04:00
Matthew Bauer
0912342bf4
Merge pull request #49 from tomberek/bundler
Allow bundle to handle an evaluated nix expression
2019-06-29 18:58:26 -04:00
Tom Bereknyei
ee29621831 Simplify appimage generation 2019-06-26 17:32:46 -04:00
Tom Bereknyei
9323b9ca68 Remove symbolic link resolution, closure should contain all links 2019-06-26 11:43:30 -04:00
haslersn
bb26366fea nix-bundle.sh: Also take app-specific extra targets from the given FILE or default
Previously, they were just taken from the `import <nixpkgs> {}` inside `./default.nix`.
2019-06-25 23:52:08 +02:00
haslersn
3e54397176 nix-bundle.sh: Quote target paths 2019-06-25 23:52:08 +02:00
haslersn
8a7793bf7a nix-bundle.sh: Fix a bug where the wrong nix build out-link was read 2019-06-25 23:50:10 +02:00
Tom Bereknyei
d18d34c2db Allow bundle to handle an evaluated nix expression
Example (note the --arg vs --argstr for the package argument):
nix-build appimage-bundle.nix --arg package 'with import <nixpkgs>{}; writers.writePython3Bin "helloThere.py" {} "print(1)\n"' --argstr exec helloThere.py
2019-06-25 16:10:54 -04:00
haslersn
138ff3a395 nix-bundle.sh: Add a default for --bin 2019-06-24 20:01:14 +02:00
haslersn
14157e052f nix-bundle.sh: Modernize CLI
TODOs:

* [ ] Update `README.md`
* [ ] What about `nix2appimage.sh`?
2019-06-24 19:52:00 +02:00
Matthew Bauer
f7e25e668f
Merge pull request #46 from tomberek/bundler
Appimage bundler
2019-06-24 01:16:34 -04:00
Tom Bereknyei
943985abb0 Appimage bundler
Create fake icon and .desktop to bundle most CLI applications
Usage: nix-build appimage-bundle.nix --argstr package hello --argstr exec hello
2019-06-23 23:35:38 -04:00
Matthew Bauer
e65faad14f
Merge pull request #42 from input-output-hk/add-shebang
fix the startup script to run on dash based systems
2019-01-30 22:30:54 -05:00
Matthew Bauer
523fb85c51
Merge pull request #43 from balsoft/patch-1
Pass /root through chroot
2019-01-30 22:30:31 -05:00
Александр Бантьев
69c5553aeb
Pass /root through chroot
This PR adds a `/root:root` mapping so that users with UID 0 can run bundles that use `$HOME`. Related to #33 .
2019-01-30 22:30:43 +03:00
Michael Bishop
e8d57a08bc
fix the startup script to run on dash based systems 2018-12-07 05:00:32 -04:00
Matthew Bauer
113d8c6b42
Merge pull request #41 from input-output-hk/escape-hatch
add an escape-hatch option to allow things like xdg-open to work inside the sandbox
2018-10-21 19:41:26 -05:00