-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: devenv environment #2083
Open
joscha
wants to merge
1
commit into
dlt-hub:devel
Choose a base branch
from
joscha:joscha/devenv-scaffold
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k=" | ||
|
||
use devenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
{ | ||
"nodes": { | ||
"devenv": { | ||
"locked": { | ||
"dir": "src/modules", | ||
"lastModified": 1732121232, | ||
"owner": "cachix", | ||
"repo": "devenv", | ||
"rev": "6ff1e5f92c0d74bbb12f7454a239ca2f02e05ea1", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"dir": "src/modules", | ||
"owner": "cachix", | ||
"repo": "devenv", | ||
"type": "github" | ||
} | ||
}, | ||
"flake-compat": { | ||
"flake": false, | ||
"locked": { | ||
"lastModified": 1696426674, | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"type": "github" | ||
} | ||
}, | ||
"flake-compat_2": { | ||
"flake": false, | ||
"locked": { | ||
"lastModified": 1696426674, | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "edolstra", | ||
"repo": "flake-compat", | ||
"type": "github" | ||
} | ||
}, | ||
"gitignore": { | ||
"inputs": { | ||
"nixpkgs": [ | ||
"pre-commit-hooks", | ||
"nixpkgs" | ||
] | ||
}, | ||
"locked": { | ||
"lastModified": 1709087332, | ||
"owner": "hercules-ci", | ||
"repo": "gitignore.nix", | ||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "hercules-ci", | ||
"repo": "gitignore.nix", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs": { | ||
"locked": { | ||
"lastModified": 1716977621, | ||
"owner": "cachix", | ||
"repo": "devenv-nixpkgs", | ||
"rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "cachix", | ||
"ref": "rolling", | ||
"repo": "devenv-nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs-python": { | ||
"inputs": { | ||
"flake-compat": "flake-compat", | ||
"nixpkgs": [ | ||
"nixpkgs" | ||
] | ||
}, | ||
"locked": { | ||
"lastModified": 1730716553, | ||
"owner": "cachix", | ||
"repo": "nixpkgs-python", | ||
"rev": "8fcdb8ec34a1c2bae3f5326873a41b310e948ccc", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "cachix", | ||
"repo": "nixpkgs-python", | ||
"type": "github" | ||
} | ||
}, | ||
"nixpkgs-stable": { | ||
"locked": { | ||
"lastModified": 1731797254, | ||
"owner": "NixOS", | ||
"repo": "nixpkgs", | ||
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "NixOS", | ||
"ref": "nixos-24.05", | ||
"repo": "nixpkgs", | ||
"type": "github" | ||
} | ||
}, | ||
"pre-commit-hooks": { | ||
"inputs": { | ||
"flake-compat": "flake-compat_2", | ||
"gitignore": "gitignore", | ||
"nixpkgs": [ | ||
"nixpkgs" | ||
], | ||
"nixpkgs-stable": "nixpkgs-stable" | ||
}, | ||
"locked": { | ||
"lastModified": 1732021966, | ||
"owner": "cachix", | ||
"repo": "pre-commit-hooks.nix", | ||
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c", | ||
"type": "github" | ||
}, | ||
"original": { | ||
"owner": "cachix", | ||
"repo": "pre-commit-hooks.nix", | ||
"type": "github" | ||
} | ||
}, | ||
"root": { | ||
"inputs": { | ||
"devenv": "devenv", | ||
"nixpkgs": "nixpkgs", | ||
"nixpkgs-python": "nixpkgs-python", | ||
"pre-commit-hooks": "pre-commit-hooks" | ||
} | ||
} | ||
}, | ||
"root": "root", | ||
"version": 7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ pkgs, lib, config, inputs, ... }: | ||
|
||
{ | ||
# https://devenv.sh/packages/ | ||
packages = [ | ||
pkgs.git | ||
pkgs.gnumake | ||
]; | ||
|
||
# https://devenv.sh/languages/ | ||
languages.python.enable = true; | ||
languages.python.poetry.enable = true; | ||
languages.python.poetry.activate.enable = true; | ||
# languages.python.version = "3.8"; | ||
|
||
# https://devenv.sh/scripts/ | ||
scripts.hello.exec = '' | ||
echo "Run 'setup' to prepare this repository for development" | ||
''; | ||
scripts.setup.exec = '' | ||
make dev | ||
make help | ||
''; | ||
|
||
enterShell = '' | ||
hello | ||
''; | ||
|
||
# https://devenv.sh/tests/ | ||
enterTest = '' | ||
echo "Running tests" | ||
git --version | grep --color=auto "${pkgs.git.version}" | ||
make has-poetry | ||
''; | ||
|
||
# https://devenv.sh/pre-commit-hooks/ | ||
git-hooks.hooks.lint = { | ||
enable = true; | ||
|
||
# The name of the hook (appears on the report table): | ||
name = "Lint"; | ||
|
||
# The command to execute (mandatory): | ||
entry = "make lint"; | ||
|
||
# The language of the hook - tells pre-commit | ||
# how to install the hook (default: "system") | ||
# see also https://pre-commit.com/#supported-languages | ||
language = "system"; | ||
|
||
# Set this to false to not pass the changed files | ||
# to the command (default: true): | ||
pass_filenames = false; | ||
}; | ||
|
||
# See full reference at https://devenv.sh/reference/options/ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
inputs: | ||
nixpkgs-python: | ||
url: github:cachix/nixpkgs-python | ||
inputs: | ||
nixpkgs: | ||
follows: nixpkgs | ||
nixpkgs: | ||
url: github:cachix/devenv-nixpkgs/rolling |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this runs the linter before commit. Can be omitted by passing
-n
, however I am also happy to remove this, if in question.