diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 00:18:15 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 01:48:11 +0200 |
commit | 90bfb9a814f26c154e34334f74a3582ba462b2e8 (patch) | |
tree | 74a22f32fd6eeba78750ee539d313ee4a488a476 /scripts/make-nur | |
parent | 5145061e9b679ea1e5d2709d22d0ee53467fed15 (diff) | |
download | Nix-90bfb9a814f26c154e34334f74a3582ba462b2e8.tar.gz Nix-90bfb9a814f26c154e34334f74a3582ba462b2e8.tar.zst Nix-90bfb9a814f26c154e34334f74a3582ba462b2e8.zip |
Add script to make NUR repo
Diffstat (limited to 'scripts/make-nur')
-rwxr-xr-x | scripts/make-nur | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/make-nur b/scripts/make-nur new file mode 100755 index 0000000..41097d2 --- /dev/null +++ b/scripts/make-nur | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | set -e | ||
4 | |||
5 | tmp=$(mktemp -d) | ||
6 | git clone . $tmp | ||
7 | cd $tmp | ||
8 | |||
9 | trap "rm -rf $tmp" EXIT | ||
10 | |||
11 | git remote add NUR gitolite@git.immae.eu:perso/Immae/Config/Nix/NUR | ||
12 | git fetch --tags NUR | ||
13 | # tag nur_root on perso/Immae/Config/Nix/NUR | ||
14 | nur_root="252dd7d899b7a0deea1537cc5d2d48b825afffb0" | ||
15 | # tag nur_publish on perso/Immae/Config/Nix | ||
16 | first_commit="5145061e9b679ea1e5d2709d22d0ee53467fed15" | ||
17 | git rebase --onto=$nur_root $first_commit master | ||
18 | |||
19 | clean_folder=' | ||
20 | rm -rf modules/private pkgs/private nixops | ||
21 | for bad in pkgs/crypto/cardano/default.nix; do | ||
22 | if [ -f $bad ]; then | ||
23 | rm -f $bad | ||
24 | cat > $bad <<-EOF | ||
25 | { runCommand, mylibs }: | ||
26 | runCommand "empty" { preferLocalBuild = true; } "mkdir -p \$out" | ||
27 | EOF | ||
28 | fi | ||
29 | done | ||
30 | ' | ||
31 | |||
32 | git filter-branch --tree-filter "$clean_folder" --prune-empty master | ||
33 | git push NUR +master | ||