mirror of
https://github.com/icewind1991/mapboundaries.git
synced 2026-06-03 10:54:07 +02:00
flake reorg
This commit is contained in:
parent
68b895866d
commit
7132e6b277
3 changed files with 22 additions and 13 deletions
19
flake.nix
19
flake.nix
|
|
@ -19,25 +19,15 @@
|
|||
(final: prev: {
|
||||
npmlock2nix = prev.callPackage npmlock2nix {};
|
||||
})
|
||||
(import ./overlay.nix)
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system overlays;
|
||||
};
|
||||
lib = pkgs.lib;
|
||||
src = lib.sources.sourceByRegex (lib.cleanSource ./.) ["package.*" "src(/.*)?" "tsconfig.json" ".*.config.js"];
|
||||
nodeModules = pkgs.npmlock2nix.v2.node_modules {
|
||||
inherit src;
|
||||
nodejs = pkgs.nodejs_20;
|
||||
};
|
||||
in rec {
|
||||
packages = rec {
|
||||
map-boundaries = pkgs.npmlock2nix.v2.build {
|
||||
inherit src;
|
||||
installPhase = "cp -r build $out";
|
||||
buildCommands = [ "npm run build" ];
|
||||
nodejs = pkgs.nodejs_20;
|
||||
};
|
||||
node_modules = nodeModules;
|
||||
map-boundaries = pkgs.map-boundaries;
|
||||
default = map-boundaries;
|
||||
};
|
||||
devShells.default = pkgs.mkShell {
|
||||
|
|
@ -45,5 +35,8 @@
|
|||
nodejs_20
|
||||
];
|
||||
};
|
||||
});
|
||||
})
|
||||
// {
|
||||
overlays.default = import ./overlay.nix;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
3
overlay.nix
Normal file
3
overlay.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
prev: final: {
|
||||
map-boundaries = final.callPackage ./package.nix {};
|
||||
}
|
||||
13
package.nix
Normal file
13
package.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
npmlock2nix,
|
||||
nodejs_20,
|
||||
lib,
|
||||
}: let
|
||||
src = lib.sources.sourceByRegex (lib.cleanSource ./.) ["package.*" "src(/.*)?" "tsconfig.json" ".*.config.js"];
|
||||
in
|
||||
npmlock2nix.v2.build {
|
||||
inherit src;
|
||||
installPhase = "cp -r build $out";
|
||||
buildCommands = ["npm run build"];
|
||||
nodejs = nodejs_20;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue