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."; + }; + +}