From 6f5e26e90fe9ec1c4299d67fc52b71af5b3708bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 31 Oct 2019 18:57:34 +0100 Subject: [PATCH] add rank_photos package --- default.nix | 3 +++ pkgs/rank_photos/default.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/rank_photos/default.nix diff --git a/default.nix b/default.nix index 46c4090..01ef791 100644 --- a/default.nix +++ b/default.nix @@ -17,5 +17,8 @@ example-package = pkgs.callPackage ./pkgs/example-package { }; # some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { }; # ... + + rank_photos = pkgs.callPackage ./pkgs/rank_photos { }; + } diff --git a/pkgs/rank_photos/default.nix b/pkgs/rank_photos/default.nix new file mode 100644 index 0000000..b90ecfe --- /dev/null +++ b/pkgs/rank_photos/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitLab, python3}: + +stdenv.mkDerivation { + name = "rank_photos"; + version = "1.0.0"; + + src = fetchFromGitLab { + domain = "git.dodsorf.as"; + owner = "dandellion"; + repo = "elo-rank-photos"; + rev = "7db05f656515f89e837efdc2661363c131f3a6c0"; + sha256 = "08fkv348vgivxpqrx36q7y0ax069i4ypp8ya46jnj8fnx40dzxzk"; + }; + + buildInputs = [(python3.withPackages (pythonPackages: with pythonPackages; [ + matplotlib + tkinter + numpy + exifread + pillow + ]))]; + + installPhase = '' + mkdir -p $out/bin + cp ./rank_photos.py $out/bin/rank_photos + chmod +x $out/bin/rank_photos + ''; + + meta = { + description = "Compare and rank images by select which one is best and assigning elo ranking."; + }; + +}