about summary refs log tree commit diff
path: root/users/grfn/gws.fyi/orgExportHTML.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/grfn/gws.fyi/orgExportHTML.nix')
-rw-r--r--users/grfn/gws.fyi/orgExportHTML.nix12
1 files changed, 2 insertions, 10 deletions
diff --git a/users/grfn/gws.fyi/orgExportHTML.nix b/users/grfn/gws.fyi/orgExportHTML.nix
index e918e697d9..ac28580a59 100644
--- a/users/grfn/gws.fyi/orgExportHTML.nix
+++ b/users/grfn/gws.fyi/orgExportHTML.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ pkgs, depot, ... }:
 
 with pkgs;
 with lib;
@@ -22,21 +22,13 @@ let
   bn = builtins.baseNameOf src;
   filename = elemAt (splitString "." bn) 0;
 
-  isDirectory = import (runCommand "isDirectory" {} ''
-    if [ -d ${src} ]; then
-      echo "true" > $out
-    else
-      echo "false" > $out
-    fi
-  '');
-
   outName =
     if isNull headline
     then
       let bn = builtins.baseNameOf src;
           filename = elemAt (splitString "." bn) 0;
       in
-        if isDirectory
+        if depot.nix.utils.isDirectory src
         then filename
         else filename + ".html"
     else "${filename}-${replaceStrings [" "] ["-"] filename}.html";