-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdefault.nix
More file actions
54 lines (41 loc) · 1020 Bytes
/
Copy pathdefault.nix
File metadata and controls
54 lines (41 loc) · 1020 Bytes
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
52
53
54
# This file can be included in your NixOS configuration or as a standalone package
{
lib,
pkgs ? import <nixpkgs> { },
}:
pkgs.stdenv.mkDerivation {
name = "pastebin-r2";
src = ./.;
buildInputs = with pkgs; [
nodejs
yarn
];
# Make sure build environment is set up properly
nativeBuildInputs = with pkgs; [
nodePackages.typescript-language-server
nodePackages.prettier
];
# Nix build steps
buildPhase = ''
runHook preBuild
# Set up node modules
export NODE_PATH=$(pwd)/node_modules:$NODE_PATH
# Build the project
yarn install --frozen-lockfile
yarn build
runHook postBuild
'';
# Installation phase
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r dist/* $out/
runHook postInstall
'';
meta = with lib; {
description = "A simple pastebin service using Cloudflare Workers";
homepage = "https://github.com/codebam/pastebin-r2";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}