summaryrefslogtreecommitdiff
path: root/ofborg/ofborg-viewer/bin/yarn2nix-update.sh
blob: c085156971e41b34f42d10c91170a50e451f7f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env nix-shell
#!nix-shell -p bash -p git -p nix-prefetch-git -i bash

set -eux
set -o pipefail

nix-prefetch-git https://github.com/moretea/yarn2nix.git > yarn2nix.json

rm -rf scratch
mkdir scratch

(
    cd scratch

    git clone git@github.com:moretea/yarn2nix.git

    (
        cd yarn2nix
        nix-build . -A yarn2nix
    )
)

./scratch/yarn2nix/result/bin/yarn2nix > yarn.nix
rm -rf scratch