npm script for nix

Signed-off-by: dzdidi <deniszalessky@gmail.com>
This commit is contained in:
dzdidi
2023-10-08 17:53:12 +02:00
parent b7d47f9084
commit dcb3513373
3 changed files with 20 additions and 5 deletions

View File

@@ -11,21 +11,31 @@ To enable clone or fetch or pull using `git <clone|fetch|pull> pear:<public key>
## Installation
It is necessary for corresponding binaries to be in `$PATH`, thus gitpear needs to be installed globally
It is necessary for corresponding binaries to be in `$PATH`, thus gitpear needs to be installed globally.
NOTE: application home directory will be created in `~/.gitpear` - this may require `sudo`.
### From remote
### From npm
```sh
npm install -g git@github.com:dzdidi/gitpear.git
npm install -g gitpear
```
### From local
### From git
```sh
git clone git@github.com:dzdidi/gitpear.git
cd gitpear
npm install
npm link
```
NOTE: application home directory will be created in `~/.gitpear` - this may require `sudo`
### From git + Nix
```sh
git clone git@github.com:dzdidi/gitpear.git
cd gitpear
npm install
npm nix
```
See `./result` - for binaries build by nix. To make the available add to path by running `PATH="${PATH:+${PATH}:}${PWD}/result/bin/"`
##

4
bin/nix.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
rm -rf result
nix build '.#'

View File

@@ -7,6 +7,7 @@
"types": "tsc src/*.js --declaration --allowJs --emitDeclarationOnly --outDir types --target es2015",
"lint": "standard --fix",
"preinstall": "./bin/preinstall.sh",
"nix": "./bin/nix.sh",
"pretest": "tar xzf test_home.tar.gz -C . "
},
"bin": {