All Projects → arrterian → nix-env-selector

arrterian / nix-env-selector

Licence: MIT license
Allows switch environment for Visual Studio Code using Nix Package Manager.

Programming Languages

clojure
4091 projects
Nix
1067 projects

Projects that are alternatives of or similar to nix-env-selector

nixify
Bootstrap nix-shell environments
Stars: ✭ 25 (-83.77%)
Mutual labels:  nix, nix-shell
GitHub-Web-IDE
⚡ Open GitHub repositories in online web IDE
Stars: ✭ 242 (+57.14%)
Mutual labels:  ide, visual-studio-code
Netlify
A VS Code extension that displays your Netlify build statuses and more!
Stars: ✭ 23 (-85.06%)
Mutual labels:  ide, visual-studio-code
Codenvy
Codenvy
Stars: ✭ 273 (+77.27%)
Mutual labels:  ide, workspace
Jhipster Ide
An IDE for the JHipster Domain Language
Stars: ✭ 109 (-29.22%)
Mutual labels:  ide, visual-studio-code
Vscode Gremlins
Gremlins tracker for Visual Studio Code: reveals invisible whitespace and other annoying characters
Stars: ✭ 78 (-49.35%)
Mutual labels:  ide, visual-studio-code
VSCode-Anywhere
VSCode with preconfigured tools for your programming languages : binaries, settings, extensions and documentations
Stars: ✭ 26 (-83.12%)
Mutual labels:  ide, visual-studio-code
Micropy Cli
Micropython Project Management Tool with VSCode support, Linting, Intellisense, Dependency Management, and more!
Stars: ✭ 112 (-27.27%)
Mutual labels:  ide, visual-studio-code
vscode-liquid
💧Liquid language support for VS Code
Stars: ✭ 137 (-11.04%)
Mutual labels:  ide, visual-studio-code
Python-Course
🐍 This is the most complete course in Python, completely practical and all the lessons are explained with examples, so that they can be easily understood. 🍫
Stars: ✭ 18 (-88.31%)
Mutual labels:  visual-studio-code
Cat-Face-Detector-with-OpenCV-and-JavaFX
📹 A Small OpenCV (Open Source Computer Vision) Example, who has the ability to detect multiple cat faces at the same time 🐱
Stars: ✭ 24 (-84.42%)
Mutual labels:  workspace
ride
Remote IDE for Dyalog APL
Stars: ✭ 144 (-6.49%)
Mutual labels:  ide
piston-cli
Universal shell supporting code highlighting, files, and interpretation without the need to download a language.
Stars: ✭ 43 (-72.08%)
Mutual labels:  nix
nix-unstable-installer
A place to host Nix unstable releases.
Stars: ✭ 96 (-37.66%)
Mutual labels:  nix
language-chef
Development repository for the language-chef plugin for the Atom text editor
Stars: ✭ 16 (-89.61%)
Mutual labels:  ide
Better-Less
Cross-compatible syntax highlighting for Less
Stars: ✭ 13 (-91.56%)
Mutual labels:  visual-studio-code
snipped
🖥️ 🖼️ Create fancy screenshots of your code without leaving the editor.
Stars: ✭ 98 (-36.36%)
Mutual labels:  visual-studio-code
nix-tutorials
Tutorials for Nix and Nixpkgs. Note so far it is a proof of concept.
Stars: ✭ 23 (-85.06%)
Mutual labels:  nix
tails
tails enables you to view, edit, and organize all your programming projects in one place
Stars: ✭ 20 (-87.01%)
Mutual labels:  ide
magento-advanced-code-editor
An advanced code editor that'll make it much easier to write clean markup for CMS pages, static blocks, product pages and Transactional Emails.
Stars: ✭ 19 (-87.66%)
Mutual labels:  ide

🇺🇦 Support Ukraine 🇺🇦

Hi folks, My name is Roman Valihura. I'm the author of this extension. I'm Ukrainian. I was born in Ukraine. I'm living here at the moment.

As you all know Russia invaded my country. Russia has already killed thousands of civilians and continues the war and terror in Ukraine. I have the luck that my region is pretty far from the frontline. But even here, I'm living in the air-alarm reality. The reality where you should wake up in the middle of the night and go into the shelter. Because a rocket flies over your region.

Like a lot of Ukrainians now I became a volunteer in this hard time for my country. We with a team producing Individual First Aid Kits for the Ukrainian army. If you have a wish and ability to support the activity, you can make a donation on our website, which we made to collect funds for producing First Aid Kits.

More datails on the aidkit.shop

Thank you for your attention!

Nix Environment Selector

nix-env-selector-logo

Extension that lets you use environments declared in .nix files in Visual Studio Code.

Motivation

Nix package manager provides a way of creating isolated environments with a specific configuration of packages. These environments are usually activated in the terminal and are not convenient to use within an IDE.

One option is to run nix-shell on the command line and then launch code within the activated shell. However, this process can quickly become tedious. Nix Environment Selector provides an alternative: can automatically apply the environment.

Getting started

  • Install Nix package manager.
  • Restart VS Code (to make sure that nix-shell is in the PATH)
  • Install the extension.
  • Create the Nix environment config (like default.nix or shell.nix) in the root of your project's workspace.
  • Open Command Palette (Ctrl + Shift + P) and run Nix-Env: Select Environment command.
  • Choose the Nix environment you'd like to apply.
  • Wait for the environment to build.
  • Restart VS Code to apply the built environment.

Example

Haskell project

To run a Haskell application you need to have GHC (Haskell compiler) installed. With Nix package manager we can create an isolated environment containing only the GHC version and the dependencies that the project needs without polluting the user's environment.

Environment configuration in shell.nix:

{ pkgs ? import <nixpkgs> { } }:
with pkgs;

let
  haskellDeps = ps: with ps; [
    base
    lens
    mtl
    random
  ];
  haskellEnv = haskell.packages.ghc865.ghcWithPackages haskellDeps;
in mkShell {
  buildInputs = [
    haskellEnv
    haskellPackages.cabal-install
    gdb
  ];
}

Now let's try to open our project in Visual Studio Code.

Without Env Demo

As you can see VS Code can't find the GHC compiler. Let's apply the environment declared in shell.nix.

With Env Demo

Bingo 🎉🎉🎉. Everything is working now 😈

Configuration

You can configure the extension in .vscode/settings.json file (located in the root of the workspace). Here are the configuration settings:

Setting Default Description
nixEnvSelector.nixFile null Path to the Nix config file
nixEnvSelector.packages [] List packages using as -p nix-shell args
nixEnvSelector.args null Custom args string for nix-shell. EX: -A <something> --pure
nixEnvSelector.nixShellPath null Custom path for nix-shell executable

Supported Platforms

  • MacOS
  • Linux
  • Windows (with Remote - WSL extension)

Support

If you like the extension and want to support author, click the button bellow.

donate

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].