42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{
|
|
description = "Phototrie";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
utils.url = "github:numtide/flake-utils";
|
|
poetry2nix = {
|
|
url = "github:nix-community/poetry2nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, poetry2nix, utils }:
|
|
utils.lib.eachDefaultSystem (system: let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication overrides;
|
|
in rec {
|
|
# `nix build`
|
|
packages.phototrie = mkPoetryApplication {
|
|
projectDir = ./.;
|
|
|
|
postInstall = ''
|
|
# set -eu
|
|
for fn in $out/bin/*; do
|
|
wrapProgram $fn --suffix-each PATH : ${pkgs.exiftool}/bin
|
|
done
|
|
'';
|
|
|
|
python = pkgs.python3.override { x11Support = true; };
|
|
|
|
overrides = overrides.withDefaults (self: super: {
|
|
pyexiftool = super.pyexiftool.overridePythonAttrs (old: {
|
|
# 'No module named setuptools' for sdist
|
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.setuptools ];
|
|
});
|
|
});
|
|
};
|
|
|
|
defaultPackage = packages.phototrie;
|
|
});
|
|
}
|