summary refs log tree commit diff
path: root/pkgs/development/tools/poetry2nix/update
blob: 4840c23c3b813d792bed3ef5444dbc36f81cd5b8 (plain) (blame)
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
#!/usr/bin/env bash
pwd=$(pwd)
workdir=$(mktemp -d)

function cleanup {
    cd "$pwd"
    rm -rf $workdir
}
trap cleanup EXIT

cd "$workdir"

curl -L -s https://github.com/nix-community/poetry2nix/archive/master.tar.gz | tar -xz
mv poetry2nix-master/* .

mkdir build
cp *.nix *.json *.py build/
cp -r hooks bin build/
rm build/shell.nix build/generate.py build/overlay.nix build/flake.nix

cat > build/README.md << EOF
Dont change these files here, they are maintained at https://github.com/nix-community/poetry2nix

The update procedure is as-follows:
1. Send your change to the upstream poetry2nix repository
2. Get it approved with tests passing
3. Run the update script in pkgs/development/tools/poetry2nix
EOF

rm -rf "$pwd/poetry2nix"
mv build "$pwd/poetry2nix"