initial commit
This commit is contained in:
40
flake.nix
Normal file
40
flake.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
description = "Dev Environment";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
|
||||
version = builtins.substring 0 8 lastModifiedDate;
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.bashInteractive
|
||||
pkgs.python314
|
||||
pkgs.virtualenv
|
||||
pkgs.ffmpeg_6
|
||||
];
|
||||
shellHook = ''
|
||||
if [ ! -d .venv ]; then
|
||||
echo "Creating Python virtual environment in .venv"
|
||||
python3 -m venv .venv
|
||||
fi
|
||||
.venv/bin/pip install -r ./app/requirements.txt
|
||||
source .venv/bin/activate
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user