Add darktable ghost publish plugin

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-12-22 21:39:55 +02:00
parent 98ce774210
commit f44dac4158
17 changed files with 2624 additions and 19 deletions

View File

@@ -0,0 +1,29 @@
{ pkgs, lib, ... }:
pkgs.stdenv.mkDerivation rec {
pname = "darktable-publish";
version = "1.0.0";
src = ./.;
npmSrc = pkgs.buildNpmPackage ({
inherit src pname version;
npmDepsHash = "sha256-vBJIIuryC/zRvp9oKBVuCDTycPOpzgsLebU55CiIb7I=";
dontNpmBuild = true;
installPhase = ''
cp -r . $out
'';
});
# FIXME: https://github.com/NixOS/nixpkgs/issues/255890
wrapper = pkgs.writeShellApplication {
name = pname;
runtimeInputs = with pkgs; [ bun ];
text = ''
bun ${npmSrc}/src/index.ts "$@"
'';
};
installPhase = ''
mkdir -p $out/bin
cp ${lib.meta.getExe wrapper} $out/bin/
'';
}