mirror of
https://codeberg.org/icewind/vbsp-to-gltf.git
synced 2026-06-03 18:24:07 +02:00
move from npmlock2nix to importNpmLock
This commit is contained in:
parent
5eeca75fb5
commit
47081b1de3
3 changed files with 9 additions and 30 deletions
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -58,28 +58,11 @@
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmlock2nix": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673447413,
|
|
||||||
"narHash": "sha256-sJM82Sj8yfQYs9axEmGZ9Evzdv/kDcI9sddqJ45frrU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "npmlock2nix",
|
|
||||||
"rev": "9197bbf397d76059a76310523d45df10d2e4ca81",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "npmlock2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cross-naersk": "cross-naersk",
|
"cross-naersk": "cross-naersk",
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"npmlock2nix": "npmlock2nix",
|
|
||||||
"rust-overlay": "rust-overlay",
|
"rust-overlay": "rust-overlay",
|
||||||
"steam-fetcher": "steam-fetcher",
|
"steam-fetcher": "steam-fetcher",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@
|
||||||
url = "github:nix-community/steam-fetcher";
|
url = "github:nix-community/steam-fetcher";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
npmlock2nix.url = "github:nix-community/npmlock2nix";
|
|
||||||
npmlock2nix.flake = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
|
@ -26,16 +24,12 @@
|
||||||
rust-overlay,
|
rust-overlay,
|
||||||
cross-naersk,
|
cross-naersk,
|
||||||
steam-fetcher,
|
steam-fetcher,
|
||||||
npmlock2nix,
|
|
||||||
}:
|
}:
|
||||||
utils.lib.eachDefaultSystem (system: let
|
utils.lib.eachDefaultSystem (system: let
|
||||||
overlays = [
|
overlays = [
|
||||||
steam-fetcher.overlays.default
|
steam-fetcher.overlays.default
|
||||||
(import rust-overlay)
|
(import rust-overlay)
|
||||||
(import ./overlay.nix)
|
(import ./overlay.nix)
|
||||||
(final: prev: {
|
|
||||||
npmlock2nix = final.callPackage npmlock2nix {};
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
pkgs = (import nixpkgs) {
|
pkgs = (import nixpkgs) {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
|
|
|
||||||
16
viewer.nix
16
viewer.nix
|
|
@ -1,16 +1,18 @@
|
||||||
{
|
{
|
||||||
npmlock2nix,
|
buildNpmPackage,
|
||||||
|
importNpmLock,
|
||||||
nodejs_20,
|
nodejs_20,
|
||||||
lib,
|
lib,
|
||||||
}: let
|
}: buildNpmPackage rec {
|
||||||
inherit (lib.sources) sourceByRegex;
|
|
||||||
in npmlock2nix.v2.build rec {
|
|
||||||
pname = "vbsp-server-viewer";
|
pname = "vbsp-server-viewer";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
|
|
||||||
src = ./src/server/viewer;
|
src = ./src/server/viewer;
|
||||||
nodejs = nodejs_20;
|
|
||||||
|
npmDeps = importNpmLock {
|
||||||
|
npmRoot = src;
|
||||||
|
};
|
||||||
|
|
||||||
|
npmConfigHook = importNpmLock.npmConfigHook;
|
||||||
|
|
||||||
installPhase = "cp -r dist $out";
|
installPhase = "cp -r dist $out";
|
||||||
buildCommands = ["npm run build"];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue