feat: Uncomment and update outputs section in flake.nix for improved Nix build configuration
This commit is contained in:
parent
c59e0a0324
commit
fc1b37333b
23
flake.nix
23
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
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user