gitpod-samples / template-nix Goto Github PK
View Code? Open in Web Editor NEWThe nix template, configured for Gitpod (www.gitpod.io) to give you pre-built, nix based ephemeral development environments in the cloud.
License: MIT License
The nix template, configured for Gitpod (www.gitpod.io) to give you pre-built, nix based ephemeral development environments in the cloud.
License: MIT License
Hi! I'd love to add support for gitpod, like for codespaces,
could you help me make this happen?
Here's the Dockerfile: https://github.com/cachix/devenv/blob/main/devcontainer/Dockerfile
I got the following error:
error: syntax error, unexpected DOLLAR_CURLY, expecting ';', at /nix/store/5vs1z0gaws5529mip9d1m5srm66sgd41-nixpkgs-23.11pre527787.e12483116b3b/nixpkgs/pkgs/development/compilers/cudatoolkit/redist/extension.nix:92:65
#11 ERROR: process "/bin/sh -c . /home/gitpod/.nix-profile/etc/profile.d/nix.sh && nix-env -i git git-lfs" did not complete successfully: exit code: 1
error: failed to solve: process "/bin/sh -c . /home/gitpod/.nix-profile/etc/profile.d/nix.sh && nix-env -i git git-lfs" did not complete successfully: exit code: 1
{"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","command":"build","error":"exit status 1","file":"build.go:44","func":"func1","level":"error","message":"build failed","serviceContext":{"service":"bob","version":""},"severity":"ERROR","time":"2023-09-27T07:30:48.692878121Z"}
exit
Error: headless task failed: exit status 1
Add direnv whitelist configuration in dockerfile
&& mkdir -p .config/direnv
&& echo '[whitelist]' > .config/direnv/config.toml
&& echo prefix = [ "/workspace" ] >> .config/direnv/config.toml \
I am inside nixpkgs-wayland
's shell environment in an environment based on this GitPod template and am having a smattering of random weird failures that I can't seem to correlate.
strip is /nix/store/fh9f7pr9kxfwvs8lm4479lvhrkzmmkdw-binutils-2.35.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/rhxfzai0ljwa6fiq27s8yjxplc09zsbm-meson-0.58.1/lib /nix/store/rhxfzai0ljwa6fiq27s8yjxplc09zsbm-meson-0.58.1/bin
patching script interpreter paths in /nix/store/rhxfzai0ljwa6fiq27s8yjxplc09zsbm-meson-0.58.1
checking for references to /tmp/nix-build-meson-0.58.1.drv-0/ in /nix/store/rhxfzai0ljwa6fiq27s8yjxplc09zsbm-meson-0.58.1...
Rewriting #!/nix/store/yqjhkdarf7p74wcha7aypzsb751n7wl2-python3-3.9.5/bin/python3.9 to #!/nix/store/yqjhkdarf7p74wcha7aypzsb751n7wl2-python3-3.9.5
wrapping `/nix/store/rhxfzai0ljwa6fiq27s8yjxplc09zsbm-meson-0.58.1/bin/meson'...
Builder called die: Cannot wrap '/nix/store/rhxfzai0ljwa6fiq27s8yjxplc09zsbm-meson-0.58.1/bin/meson' because it is not an executable file
Backtrace:
or
+ exit 0
+ rm /tmp/tmp.VWQdM2Mfbx
rm: cannot remove '/tmp/tmp.VWQdM2Mfbx': Operation not permitted
[nix-shell:/workspace/nixpkgs-wayland]$ ls -al /tmp/tmp.VWQdM2Mfbx
-rw------- 1 gitpod gitpod 0 Jul 27 22:10 /tmp/tmp.VWQdM2Mfbx
[nix-shell:/workspace/nixpkgs-wayland]$ rm /tmp/tmp.VWQdM2Mfbx
rm: cannot remove '/tmp/tmp.VWQdM2Mfbx': Operation not permitted
So far I can't seem to get much working in general.
Presumably this is executing as a privileged container since I can use sudo
, etc. I wonder if it's the base or how nix is setup? Have you tried a nixos-based base container? (I'm not sure how much it takes to fulfill gitpod's workspace requirements)
ls: cannot access '/home/gitpod/.bashrc.d/*': No such file or directory
direnv: error /workspace/template-nix/.envrc is blocked. Run `direnv allow` to approve its content
How do I fix these?
Hi, I have a new Dockerfile that I've modified for flakes and a nix-shell ps1 indicator. I'm interested in using this across many projects, and hopefully not having to copy/paste that Dockerfile across projects.
Since I'm still in Docker land and not Nix, that means figuring out infra for publishing a new "nix base" image and then using that as my .gitpod.Dockerfile base.
Does GitPod already have infra for publishing these images regularly, or is it manual? If it's automated, is there interest in having another named/tagged gitpod base image for nix that includes unstable nix?
Hi! I was looking at this template and it seems that it installs Nix at build-time and then builds & enters the nix-shell at runtime.
However, it would be nicer if the nix-shell could be built and containerized at build time. Is this possible?
In that case, the container image wouldn't even need to have Nix installed, because it's not required at runtime. This is just like a nix-shell with --pure
where Nix is not installed by default. Users who want to have Nix in their development environment can add nix
to the nativeBuildInputs
in shell.nix
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.