ctucx.git: nixfiles

ctucx' nixfiles

commit 93a042f201548878418f966ae1f13a3d5c9fd8d8
parent 835e42defaa42ca8d188aeba086e232e6e5ff06d
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 7 May 2022 13:22:42 +0200

pkgs: add phockup
1 file changed, 41 insertions(+), 0 deletions(-)
A
pkgs/phockup.nix
|
41
+++++++++++++++++++++++++++++++++++++++++
diff --git a/pkgs/phockup.nix b/pkgs/phockup.nix
@@ -0,0 +1,41 @@
+{ pkgs, lib, python3Packages, fetchFromGitHub }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "phockup";
+  version = "1.9.0";
+
+  src = fetchFromGitHub {
+    owner  = "ivandokov";
+    repo   = "phockup";
+    rev    = version;
+    sha256 = "0js37fzfsxfgb9qs4sh1kxlgmf1xlbxcm0kn4yvq2dvzr6h2kaxh";
+  };
+
+  doCheck = false;
+
+  propagatedBuildInputs = [
+    pkgs.exiftool
+    python3Packages.tqdm
+  ];
+
+  preBuild = ''
+    cat >setup.py <<'EOF'
+    from setuptools import setup
+    setup(
+      name='${pname}',
+      packages=['src'],
+      install_requires=[
+        'tqdm'
+      ],
+      scripts=['phockup.py'],
+      # ...
+    )
+    EOF
+  '';
+
+  meta = with lib; {
+    homepage    = "https://github.com/ivandokov/phockup";
+    description = "Media sorting tool to organize photos and videos from your camera in folders by year, month and day.";
+    license     = licenses.mit;
+  };
+}