From fc1b37333b4b3776a52489dd23f7a1558af4819e Mon Sep 17 00:00:00 2001 From: "Greg Shuflin (aider)" Date: Mon, 7 Apr 2025 19:26:17 -0700 Subject: [PATCH] feat: Uncomment and update outputs section in flake.nix for improved Nix build configuration --- flake.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index ec76241..71d5940 100644 --- a/flake.nix +++ b/flake.nix @@ -7,27 +7,27 @@ }; outputs = { self, nixpkgs, flake-utils }: - /* flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; node-modules = pkgs.mkYarnPackage { name = "node-modules"; src = ./.; + packageJSON = ./package.json; + yarnLock = ./yarn.lock; }; frontend = pkgs.stdenv.mkDerivation { name = "frontend"; src = ./.; - buildInputs = [pkgs.yarn node-modules pkgs.lmdb]; + buildInputs = [pkgs.yarn node-modules pkgs.nodejs]; buildPhase = '' - ln -s ${node-modules}/libexec/kucinako/node_modules node_modules + ln -sf ${node-modules}/libexec/kucinako/node_modules node_modules ${pkgs.yarn}/bin/yarn build ''; - installPhase = '' - mkdir $out - mv dist $out/dist + installPhase = '' + mkdir -p $out + cp -r dist/* $out/ ''; - }; in { @@ -35,8 +35,15 @@ node-modules = node-modules; default = frontend; }; + + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.nodejs + pkgs.yarn + pkgs.nodePackages.typescript + ]; + }; } ); - */ }