Make nix do things
This commit is contained in:
parent
a570aa4e6d
commit
49295ab573
2 changed files with 32 additions and 0 deletions
10
README.md
10
README.md
|
@ -13,6 +13,14 @@ NOTE: Instructions are written with the assumption that the command `python` poi
|
|||
|
||||
### NixOS
|
||||
|
||||
```
|
||||
nix-shell
|
||||
python pomodoroprompt.py
|
||||
```
|
||||
...or:
|
||||
`alias pom="nix-shell --command 'python pomodoroprompt.py'`
|
||||
|
||||
You need not install Python (and it is not recommended). Should you insist, this may be correct:
|
||||
```
|
||||
python
|
||||
python311Packages.playsound
|
||||
|
@ -20,6 +28,8 @@ python311Packages.pycairo
|
|||
python311Packages.pygobject3
|
||||
python311Packages.pytz
|
||||
python311Packages.tzlocal
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
```
|
||||
|
||||
(And skip the last two lines below, the pip install, as the above is the Nix way of doing that.)
|
||||
|
|
22
shell.nix
Normal file
22
shell.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
# shell.nix
|
||||
let
|
||||
# We pin to a specific nixpkgs commit for reproducibility.
|
||||
# Last updated: 2024-04-29. Check for new commits at https://status.nixos.org.
|
||||
pkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/aebe249544837ce42588aa4b2e7972222ba12e8f.tar.gz") {};
|
||||
in pkgs.mkShell {
|
||||
packages = [
|
||||
(pkgs.python3.withPackages (python-pkgs: with python-pkgs; [
|
||||
# select Python packages here
|
||||
playsound
|
||||
pycairo
|
||||
pytz
|
||||
tzlocal
|
||||
# For Qt:
|
||||
# pyside6
|
||||
# Using GTK:
|
||||
pygobject3
|
||||
]))
|
||||
pkgs.wrapGAppsHook
|
||||
pkgs.gobject-introspection
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue