• Stars
    star
    3,227
  • Rank 13,513 (Top 0.3 %)
  • Language
    Nix
  • License
    Apache License 2.0
  • Created over 1 year ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast, Declarative, Reproducible, and Composable Developer Environments

devenv.sh - Fast, Declarative, Reproducible, and Composable Developer Environments

Built with Nix Discord channel License: Apache 2.0 Version CI

logo

Running devenv init generates devenv.nix:

{ pkgs, ... }:

{
  # https://devenv.sh/basics/
  env.GREET = "devenv";

  # https://devenv.sh/packages/
  packages = [ pkgs.git ];

  enterShell = ''
    hello
  '';

  # https://devenv.sh/tests/
  enterTest = ''
    echo "Running tests"
    git --version | grep "2.42.0"
  '';

  # https://devenv.sh/languages/
  languages.nix.enable = true;

  # https://devenv.sh/scripts/
  scripts.hello.exec = "echo hello from $GREET";

  # https://devenv.sh/services/
  services.postgres.enable = true;

  # https://devenv.sh/pre-commit-hooks/
  pre-commit.hooks.shellcheck.enable = true;

  # https://devenv.sh/processes/
  processes.ping.exec = "ping example.com";
}

And devenv shell activates the environment.

Commands

$ devenv
https://devenv.sh 1.0.1: Fast, Declarative, Reproducible, and Composable Developer Environments

Usage: devenv [OPTIONS] <COMMAND>

Commands:
  init       Scaffold devenv.yaml, devenv.nix, .gitignore and .envrc.
  shell      Activate the developer environment. https://devenv.sh/basics/
  update     Update devenv.lock from devenv.yaml inputs. http://devenv.sh/inputs/
  search     Search for packages and options in nixpkgs. https://devenv.sh/packages/#searching-for-a-file
  info       Print information about this developer environment.
  up         Start processes in the foreground. https://devenv.sh/processes/
  processes  Start or stop processes.
  test       Run tests. http://devenv.sh/tests/
  container  Build, copy, or run a container. https://devenv.sh/containers/
  inputs     Add an input to devenv.yaml. https://devenv.sh/inputs/
  gc         Deletes previous shell generations. See http://devenv.sh/garbage-collection
  build      Build any attribute in devenv.nix.
  version    Print the version of devenv.
  help       Print this message or the help of the given subcommand(s)

Options:
  -v, --verbose
          Enable debug log level.
  -j, --max-jobs <MAX_JOBS>
          Maximum number of Nix builds at any time. [default: 8]
  -j, --cores <CORES>
          Maximum number CPU cores being used by a single build.. [default: 2]
  -s, --system <SYSTEM>
          [default: x86_64-linux]
  -i, --impure
          Relax the hermeticity of the environment.
  -c, --clean [<CLEAN>...]
          Ignore existing environment variables when entering the shell. Pass a list of comma-separated environment variables to let through.
  -d, --nix-debugger
          Enter Nix debugger on failure.
  -n, --nix-option <NIX_OPTION> <NIX_OPTION>
          Pass additional options to nix commands, see `man nix.conf` for full list.
  -o, --override-input <OVERRIDE_INPUT> <OVERRIDE_INPUT>
          Override inputs in devenv.yaml.
  -h, --help
          Print help

Documentation

More Repositories

1

cachix

Command line client for Nix binary cache hosting:
Haskell
780
star
2

git-hooks.nix

Seamless integration of https://pre-commit.com git hooks with Nix.
Nix
456
star
3

install-nix-action

Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.
Shell
418
star
4

cachix-action

Build software only once and put it in a global cache
TypeScript
209
star
5

nixpkgs-python

All Python versions, kept up-to-date on hourly basis using Nix.
Nix
106
star
6

elm2nix

Convert Elm project into Nix expressions
Haskell
105
star
7

ghcide-nix

Nix installation for ghcide
Nix
76
star
8

docs.cachix.org

Documentation for Cachix service.
Python
58
star
9

cachix-deploy-hetzner-dedicated

Bootstrap Hetzner Dedicated machines with a single command and deploy using GitHub Actions
Nix
22
star
10

stamina.hs

Retrying for humans using Haskell.
Haskell
20
star
11

haskell-release-action

Automation for releasing haskell packages
17
star
12

paddle

Haskell API for Paddle payments
Haskell
10
star
13

cachix-ci-agents

self-hosted github runners
Nix
8
star
14

nixpkgs-unfree-redistributable

Nix
6
star
15

katip-raven

Katip scribe for raven client (https://sentry.io)
Haskell
5
star
16

clickhouse-haskell

Haskell
5
star
17

cachix-deploy-flake

Functions to help manage Cachix Deploy when using flakes.
Nix
5
star
18

cachix-deploy-terraform

HCL
3
star
19

websockets-simple

High-level library for Client/Server websocket communication in Haskell
Haskell
3
star
20

mixpanel-client

Haskell client implementation of mixpanel HTTP api
Haskell
3
star
21

fastspring

Haskell API for https://fastspring.com/
Haskell
3
star
22

buildkite-example

2
star
23

travis-ci-example

Nix
2
star
24

circleci-example

Nix
2
star
25

feedback

Feedback about https://cachix.org service
2
star
26

cachix-deploy-amis

AMIs for using Cachix Deploy
HCL
1
star
27

haskell-wishlist

Things we wish Haskell had
1
star
28

cachix-deploy-aws

HCL
1
star
29

parse-range-header.js

TypeScript
1
star
30

fastcdc-rs2hs

A Haskell wrapper around fastcdc-rs.
Haskell
1
star