Although I'm wondering about how fast it starts on the 2nd run after the dependencies have been download and how it deals with language specify dependencies, e.g. npm/pip packages. Read somewhere thst it can be a pain deal with those in nix.
Although I'm wondering about how fast it starts on the 2nd run after the dependencies have been download and how it deals with language specify dependencies, e.g. npm/pip packages. Read somewhere thst it can be a pain deal with those in nix.
To answer your questions: On the second run all packages are saved in the local store, so it's super fast. Language specific dependencies are treated like all other Nix packages, so Python dependencies can depend on Node, etc.
There’s no shebang support in nix3 (the new, flakes-native CLI with a single “nix” command). The closest you can get is probably “nix run”—can’t be distilled down to a single file, but can fetch and cache even online Git repos (use “nix registry pin” to freeze the commit hash).
This is a pain point, but there appears to be discussions and a PR for Shebang support with flakes: https://github.com/NixOS/nix/pull/5189
So would you want to fit everything into just flake.nix? I don’t see why. Could you? Yeah, sure: http://ix.io/4ll5 is an example for a single shell script.
2. AppFS appears to be written by a user named rkeene, and I am replying to a comment by rkeene2. I think a disclosure would be helpful when comparing AppFS with other tools.
Additionally, I'm the author of AppFS.net just redirects you to AppFS.rkeene.org -- I'm not sure what kind of disclosure is needed when discussing it in this context though.
Not true. See "Using Nix to run software with no installation steps" https://determinate.systems/posts/nix-run for example.
This feature has been one of the main use cases of Nix.
> Nix has an install step ... AppFS does not... I'm the author of AppFS.net...
I appreciate the disclosure, as it helps readers (like me) to judge the merits of your claims, especially regarding AppFS vs other options, and whether those claims could be biased (due to differences in familiarity, for example).
> I'm not sure what kind of disclosure is needed...
Over Hacker News and other forums, when the author of a tool wants to promote their work (nothing wrong with this, I learnt a lot with such promotions) in the context of competing tools, the following disclosures are common:
1. Disclosure: I wrote AppFS.
2. Author of AppFS here. (Just like what you did.)
3. Shameless plug. (Note: I personally do not see this as a shame, but I just want to give examples of common disclosure styles in such contexsts.)
$ cat /tmp/hello.py
#! /opt/appfs/rkeene.org/python3/platform/latest/bin/python3
print("Hello, world!".rjust(20, "-"))
$ /tmp/hello.py
-------Hello, world!Additionally any external dependencies can be specified by just accessing them the same way you would in `nix-shell`, just using the path instead of installing. For example, if you wanted to use the "awscli" (the only Python package I already created within AppFS) you would do:
$ cat /tmp/aws.py
#! /opt/appfs/rkeene.org/python3/platform/latest/bin/python3
import sys
sys.path.append('/opt/appfs/rkeene.org/aws-cli/platform/latest/lib/python3.6/site-packages')
import awscli
print(awscli)
$ /tmp/aws.py
<module 'awscli' from '/opt/appfs/rkeene.org/aws-cli/platform/latest/lib/python3.6/site-packages/awscli/__init__.py'>
[0] https://browser.appfs.net/rkeene.org/python3/linux-x86_64/3....