flake
This commit is contained in:
parent
8364260ec0
commit
9b07740b53
6 changed files with 153 additions and 0 deletions
42
flake.nix
Normal file
42
flake.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
description = "music-light: dev environment (Python + playerctl) for NixOS/Nix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
# Use a stable Python version with good binary coverage for Pillow.
|
||||
py = pkgs.python312.withPackages (ps: [
|
||||
ps.requests
|
||||
ps.pillow
|
||||
]);
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
py
|
||||
pkgs.playerctl
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "music-light devShell ready: $(python --version)"
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue