diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..96f37ec --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1780243769, + "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..966bbe4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,37 @@ +{ + description = "Nixpkgs tracker notifier"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils}: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in { + packages.default = pkgs.python314Packages.buildPythonApplication { + pname = "nixpkgs-notifier"; + version = "1.0"; + src = ./.; + + pyproject = true; + build-system = [ pkgs.python314Packages.setuptools ]; + + propagatedBuildInputs = with pkgs.python314Packages; [ + pycurl + beautifulsoup4 + notify2 + ]; + buildInputs = [ + pkgs.matrix-commander-rs + ]; + }; + mainProgram = "nixpkgs-notifier.py"; + apps.default = { + type = "app"; + program = "${self.packages.${system}.default}/bin/nixpkgs-notifier"; + }; + }); +} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4b27235 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,12 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "nixpkgs-notifier" +version = "1.0" +description = "Nixpkgs tracker notifier" +requires-python = ">=3.10" + +[project.scripts] +nixpkgs-notifier = "nixpkgs_notifier:main"