aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorDemonKingSwarn <rockingswarn@gmail.com>2026-04-19 21:52:40 +0530
committerDemonKingSwarn <rockingswarn@gmail.com>2026-04-19 21:52:40 +0530
commit0dc53f2c6a5093344e6188b5510d1505cd3a4a2a (patch)
treee04f92287506d12f69b30d9a7cc198b7ddf40deb /flake.nix
parent7b79ecdd16d0f87b96cb5f16e5a86f8910ce8b40 (diff)
downloadhypr-wellbeing-0dc53f2c6a5093344e6188b5510d1505cd3a4a2a.zip
hypr-wellbeing-0dc53f2c6a5093344e6188b5510d1505cd3a4a2a.tar.gz
chore: made sure the binary is static
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix69
1 files changed, 69 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..8ade55c
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,69 @@
+{
+description = "hypr-wellbeing - An app usage logger for hyprland and niri";
+
+inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+
+outputs = { self, nixpkgs }:
+ let
+ systems = [ "x86_64-linux" ];
+ forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
+ in
+ {
+ packages = forAllSystems (system:
+ let
+ pkgs = nixpkgs.legacyPackages.${system};
+
+ version = "0.0.9";
+
+ binaryName = {
+ "x86_64-linux" = "hypr-wellbeing";
+ }.${system};
+
+ sha256 = {
+ "x86_64-linux" = "sha256-sem/XST8hSfyFGbAhnLXxFtkhp7uo9k91mL/sEIVBlM=";
+ }.${system};
+
+ in
+ {
+ hypr-wellbeing = pkgs.stdenvNoCC.mkDerivation {
+ pname = "hypr-wellbeing";
+ inherit version;
+
+ src = pkgs.fetchurl {
+ url = "https://github.com/DemonKingSwarn/hypr-wellbeing/releases/download/${version}/${binaryName}";
+ inherit sha256;
+ };
+
+ dontUnpack = true;
+ dontBuild = true;
+
+ nativeBuildInputs = [ pkgs.makeWrapper ];
+
+ propagatedBuildInputs = with pkgs; [ ];
+
+ installPhase = ''
+ install -Dm755 $src $out/bin/hypr-wellbeing
+ '';
+
+ meta = with pkgs.lib; {
+ description = "An app usage logger for hyprland and niri";
+ homepage = "https://github.com/DemonKingSwarn/hypr-wellbeing";
+ license = licenses.gpl3Only;
+ maintainers = [ ];
+ platforms = [ "x86_64-linux" ];
+ mainProgram = "hypr-wellbeing";
+ };
+ };
+
+ default = self.packages.${system}.hypr-wellbeing;
+ }
+ );
+
+ apps = forAllSystems (system: {
+ default = {
+ type = "app";
+ program = "${self.packages.${system}.hypr-wellbeing}/bin/hypr-wellbeing";
+ };
+ });
+ };
+}