From 90bfb9a814f26c154e34334f74a3582ba462b2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 24 May 2019 00:18:15 +0200 Subject: Add script to make NUR repo --- scripts/make-nur | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 scripts/make-nur (limited to 'scripts') 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 @@ +#!/bin/bash + +set -e + +tmp=$(mktemp -d) +git clone . $tmp +cd $tmp + +trap "rm -rf $tmp" EXIT + +git remote add NUR gitolite@git.immae.eu:perso/Immae/Config/Nix/NUR +git fetch --tags NUR +# tag nur_root on perso/Immae/Config/Nix/NUR +nur_root="252dd7d899b7a0deea1537cc5d2d48b825afffb0" +# tag nur_publish on perso/Immae/Config/Nix +first_commit="5145061e9b679ea1e5d2709d22d0ee53467fed15" +git rebase --onto=$nur_root $first_commit master + +clean_folder=' + rm -rf modules/private pkgs/private nixops + for bad in pkgs/crypto/cardano/default.nix; do + if [ -f $bad ]; then + rm -f $bad + cat > $bad <<-EOF + { runCommand, mylibs }: + runCommand "empty" { preferLocalBuild = true; } "mkdir -p \$out" +EOF + fi + done +' + +git filter-branch --tree-filter "$clean_folder" --prune-empty master +git push NUR +master -- cgit v1.2.3