-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdefault.nix
More file actions
51 lines (44 loc) · 1.13 KB
/
default.nix
File metadata and controls
51 lines (44 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
pkgs ? let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
in
import nixpkgs {overlays = [];},
...
}: let
manifest = pkgs.lib.importJSON ./package.json;
in
# pkgs.stdenv.mkDerivation {
pkgs.buildNpmPackage {
pname = manifest.name;
version = manifest.version;
src = ./.;
npmDepsHash = "sha256-fbzOsLoqKVa8wFxn3zj4r5nVPABKME5L4Chb2CNAVlk=";
installPhase = ''
# Create output directory
mkdir -p $out
# Copy standalone as library
cp -R ./out/* $out/
'';
nativeBuildInputs = with pkgs; [
nodejs
pnpm
corepack
typescript
];
buildInputs = with pkgs; [
vips
openssl
];
NODE_TLS_REJECT_UNAUTHORIZED = 0;
meta = with pkgs.lib; {
homepage = "https://ecma.uz";
description = manifest.description;
license = with licenses; [cc-by-40];
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [orzklv];
};
}