ctucx.git: nixfiles

ctucx' nixfiles

commit c732bead49b6e1b978548513303f04760d514190
parent f9ab3a61c79e0483f73a22d333e567b90713e79a
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 21 May 2022 09:19:24 +0200

pkgs/garminexport: update -> 0.4.1
2 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/configurations/programs/cli/garminexport.nix b/configurations/programs/cli/garminexport.nix
@@ -1,21 +1,12 @@
 { pkgs, lib, ... }:
 
 let
-  garminexport = pkgs.python3Packages.buildPythonApplication {
-    pname = "garminexport";
-    version = "1.0";
+  garminexport = pkgs.callPackage ../../../pkgs/garminexport.nix {};
 
-    propagatedBuildInputs = with pkgs.python3Packages; [ cloudscraper requests python-dateutil ];
-
-    src = pkgs.fetchFromGitHub {
-      owner  = "jacobhell";
-      repo   = "garminexport";
-      rev    = "5d74c3ac9d925919141c467bac051dc688fbe312";
-      sha256 = "1kicabgdzscn3mx3zdkic7flcd32k52zzhxw0c2j67rcqz1pjacs";
-    };
-  };
 in {
+
   home-manager.users.leah = {
     home.packages = [ garminexport ];
   };
+
 }
diff --git a/pkgs/garminexport.nix b/pkgs/garminexport.nix
@@ -0,0 +1,19 @@
+{ python3Packages, fetchFromGitHub, ... }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "garminexport";
+  version = "0.4.1";
+
+  propagatedBuildInputs = with python3Packages; [
+    cloudscraper
+    requests
+    python-dateutil
+  ];
+
+  src = fetchFromGitHub {
+    owner  = "petergardfjall";
+    repo   = "garminexport";
+    rev    = "${version}";
+    sha256 = "126i9dsaancj4mmcb6096kypvac88saqfhlajhwnsikjf0k7xl9k";
+  };
+}