diff --git a/flake.nix b/flake.nix index a2da7949..461b49bb 100644 --- a/flake.nix +++ b/flake.nix @@ -43,22 +43,16 @@ license = licenses.agpl3Plus; platforms = platforms.all; mainProgram = "start-bundle"; + maintainers = with maintainers; [ RorySys ]; # lol. }; src = ./.; - nativeBuildInputs = with pkgs; [ - python3 - nodePackages.patch-package - jq - ]; npmDepsHash = hashesFile.npmDepsHash; npmBuildScript = "build:src"; makeCacheWritable = true; - postPatch = '' - echo "Patching postinstall to use OS-provided patch-package" - jq -r '.scripts["postinstall"] = "patch-package"' package.json > package.tmp.json - mv package.tmp.json package.json - ''; + nativeBuildInputs = with pkgs; [ + python3 + ]; installPhase = '' runHook preInstall # set -x @@ -118,7 +112,7 @@ containers.docker = pkgs.dockerTools.buildLayeredImage { name = "spacebar-server-ts"; - tag = "latest"; + tag = self.packages.${system}.default.version; contents = [ self.packages.${system}.default ]; config = { Cmd = [ "${self.outputs.packages.${system}.default}/bin/start-bundle" ]; @@ -145,6 +139,7 @@ pkgs.lib.recursiveUpdate (pkgs.lib.attrsets.unionOfDisjoint { } self.packages) { x86_64-linux = { spacebar-server-tests = self.packages.x86_64-linux.default.passthru.tests; + docker-image = self.containers.x86_64-linux.docker; }; }; }; diff --git a/hashes.json b/hashes.json index 0dc4ff93..3d95c360 100644 --- a/hashes.json +++ b/hashes.json @@ -1,3 +1,3 @@ { - "npmDepsHash": "sha256-45XGoErD/Lm0QunatMHZnUtrlpcmYmlwUyUGhwjrBHU=" + "npmDepsHash": "sha256-v3RAXTGnVkLK2KpQLHfT9BBh27L9f/N9F1MMAUghkV4=" } diff --git a/package-lock.json b/package-lock.json index e43c18b0..c1942619 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index a1d2f554..01a705db 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A Spacebar server written in Node.js", "scripts": { "prepare": "husky install", - "postinstall": "npx patch-package", + "postinstall": "patch-package", "start": "node --enable-source-maps dist/bundle/start.js", "start:api": "node --enable-source-maps dist/api/start.js", "start:cdn": "node --enable-source-maps dist/cdn/start.js", @@ -65,6 +65,7 @@ "eslint": "^9.39.1", "globals": "^16.5.0", "husky": "^9.1.7", + "patch-package": "^8.0.1", "prettier": "^3.6.2", "pretty-quick": "^4.2.2", "ts-node": "^10.9.2",