Skip to content

Commit

Permalink
simplify nix shell and devbox setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbovo committed Mar 29, 2024
1 parent ac385f9 commit 8492764
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
11 changes: 6 additions & 5 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.1/.schema/devbox.schema.json",
"packages": [
"poetry@latest",
"[email protected]",
"go-task@latest",
"pre-commit@latest",
"[email protected]",
"poetry@latest",
"docker@latest",
"path:./"
"pre-commit@latest"
],
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
"task setup",
"source .venv/bin/activate",
"poetry install"
],
"scripts": {
"test": [
Expand Down
30 changes: 14 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,27 @@
}
);
});
myappEnv = p2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
my-app = ./src;
};
preferWheels = true;
overrides = override;
};
in
{
packages.default = p2nix.mkPoetryApplication {
projectDir = ./.;
overrides = override;
preferWheels = true;
};
devShell = (p2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
my-app = ./src;
};
preferWheels = true;
overrides = override;
}).env;
devShell = pkgs.mkShell {
buildInputs = [
pkgs.pre-commit
pkgs.go-task
pkgs.python311
pkgs.poetry
pkgs.docker
];
shellHook = ''
task setup
source .venv/bin/activate
poetry install
'';
};
}
);
}

0 comments on commit 8492764

Please sign in to comment.