trying to write a flake

This commit is contained in:
TheK0tYaRa 2025-12-10 21:29:35 +02:00
parent 10ee8c3faa
commit 9ace38e77c
3 changed files with 103 additions and 129 deletions

40
flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
description = "run py2fa-gtk";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
python = pkgs.python312 or pkgs.python3;
in {
devShells.default = pkgs.mkShell {
name = "py2fa-gtk-shell";
nativeBuildInputs = [
pkgs.gobject-introspection
];
buildInputs = [
(python.withPackages (ps: with ps; [
cryptography
opencv4
pygobject3
pyotp
pyzbar
]))
pkgs.gtk3
pkgs.zbar
];
shellHook = ''
echo "Environment ready. Run the app with:"
echo " python main.py"
'';
};
});
}