Add darktable ghost publish plugin
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
29
hosts/common/configs/user/gui/darktable/publish/default.nix
Normal file
29
hosts/common/configs/user/gui/darktable/publish/default.nix
Normal 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/
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user