diff --git a/flake.nix b/flake.nix index 30fb5cb..df733a1 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,7 @@ }; packages.think = pkgs.think-gtcm; packages.think-be = pkgs.think-backend-gtcm; + packages.file-uploader = pkgs.file-uploader; }; } ); diff --git a/pkgs/file-uploader.nix b/pkgs/file-uploader.nix index 19b2efd..a588649 100644 --- a/pkgs/file-uploader.nix +++ b/pkgs/file-uploader.nix @@ -7,27 +7,29 @@ let repoSrc = fetchgit { url = "https://git.b4l.co.th/newedge/think-greaterchiangmai"; rev = "6f8c8d7dfaf5a0c1eb2077de1d6fb35ceaf3d4ec"; - hash = ""; + hash = "sha256-2mCdn8xGjWZrANclctGTmxQhkNc43VzlzMTVwVIFJcM="; }; src = "${repoSrc}/upload-large-file"; in buildNpmPackage { - pname = "upload-large-file"; + pname = "file-uploader"; version = "1.0.0"; - nativeBuildInputs = with pkgs; [ nodejs_18 ]; + nativeBuildInputs = with pkgs; [ + nodejs_20 + breakpointHook + ]; inherit src; - npmDepsHash = ""; + npmDepsHash = "sha256-JEp2F1CQfuV9fSYZRdRO+BiOE9dy1ReK6doJcqCuxu4="; buildPhase = '' npm install - npm run build ''; installPhase = '' mkdir -p $out - cp -r dist $out/dist + cp -r * $out ''; }