From 92db74acf3aa3b0e59d70c15763ab83379c6269a Mon Sep 17 00:00:00 2001 From: April John Date: Tue, 13 Aug 2024 12:04:46 +0200 Subject: [PATCH] rm: nix build --- flake.lock | 6 +++--- flake.nix | 60 ------------------------------------------------------ 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/flake.lock b/flake.lock index fb00c420..484fc45c 100644 --- a/flake.lock +++ b/flake.lock @@ -16,11 +16,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722957468, - "narHash": "sha256-SQ0TCC4aklOhN/OzcztrKqDLY8SjpIZcyvTulzhDXs0=", + "lastModified": 1723320709, + "narHash": "sha256-DeKCsLQsS58D8TB/cTjXs2x8XMvsyv2JVxcF0Hu6pu8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2a13929e1f191b3690dd2f2db13098b04adb9043", + "rev": "e1d92cda6fd1bcec60e4938ce92fcee619eea793", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index fd5ebd8d..6a40abcb 100644 --- a/flake.nix +++ b/flake.nix @@ -22,66 +22,6 @@ }); in { - packages = forAllSystems ({ pkgs }: { - default = let - pin = pkgs.lib.importJSON ./pin.json; - src = self; - node_modules = pkgs.stdenv.mkDerivation { - pname = "versiajs-node_modules"; - inherit src; - version = pin.version; - impureEnvVars = pkgs.lib.fetchers.proxyImpureEnvVars - ++ [ "GIT_PROXY_COMMAND" "SOCKS_SERVER" ]; - nativeBuildInputs = with pkgs; [ bun nodejs nodePackages.typescript nodePackages.typescript-language-server ]; - buildInputs = with pkgs; [ libstdcxx5 ]; - dontConfigure = true; - buildPhase = '' - bun install --production --frozen-lockfile --ignore-scripts - ''; - installPhase = '' - mkdir -p $out/node_modules - cp -R ./node_modules $out - ''; - outputHash = pin."${pkgs.stdenv.system}"; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - dontFixup = true; - }; - in pkgs.stdenv.mkDerivation { - name = "versiajs"; - version = pin.version; - - buildPhase = '' - runHook preBuild - - ln -s ${node_modules}/node_modules . - bun run build - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/bin - cp -R ./* $out - makeBinaryWrapper ${pkgs.bun}/bin/bun $out/bin/versiajs \ - --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.bun ]} \ - --add-flags "run --prefer-offline --no-install --cwd $out ./cli/index.ts start" - - runHook postInstall - ''; - - buildInputs = with pkgs; [ - nodejs - ]; - - nativeBuildInputs = with pkgs; [ makeBinaryWrapper bun ]; - - inherit src; - - dontConfigure = true; - }; - }); devShells = forAllSystems ({ pkgs }: { default = pkgs.mkShell { buildInputs = with pkgs; [