Files
random-script-for-discordrpc/flake.nix
2025-06-10 12:02:50 +02:00

59 lines
1.5 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
pypresence.url = "github:qwertyquerty/pypresence";
pypresence.flake = false;
};
outputs =
inputs@{ self, nixpkgs, ... }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f {
pkgs = import nixpkgs { inherit system; };
}
);
in
{
packages = forEachSupportedSystem (
{ pkgs }:
{
default = pkgs.python313Packages.buildPythonPackage {
pname = "pypresence";
version = "4.4.0"; # Replace with the actual version or a placeholder
format = "setuptools";
src = inputs.pypresence;
doCheck = false; # tests require internet connection
pythonImportsCheck = [ "pypresence" ];
};
}
);
devShells = forEachSupportedSystem (
{ pkgs }:
{
default = pkgs.mkShell {
packages = with pkgs; [
nixd
nixfmt-rfc-style
python313
self.packages.${pkgs.system}.default
python313Packages.icalendar
python313Packages.pytz
python313Packages.python-dotenv
python313Packages.requests
];
};
}
);
};
}