summary refs log tree commit diff
path: root/pkgs/build-support/autonix/manifest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/autonix/manifest.sh')
-rwxr-xr-xpkgs/build-support/autonix/manifest.sh44
1 files changed, 0 insertions, 44 deletions
diff --git a/pkgs/build-support/autonix/manifest.sh b/pkgs/build-support/autonix/manifest.sh
deleted file mode 100755
index 5be69cc6175..00000000000
--- a/pkgs/build-support/autonix/manifest.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!@bash@/bin/bash
-
-@coreutils@/bin/mkdir tmp; cd tmp
-
-@wget@/bin/wget -nH -r -c --no-parent $*
-
-cat >../manifest.json <<EOF
-[
-EOF
-
-workdir=$(pwd)
-sep=""
-
-@findutils@/bin/find . | while read path; do
-    if [[ -f "${path}" ]]; then
-        [[ -n "${sep}" ]] && echo "$sep" >>../manifest.json
-        url="${path:2}"
-        # Sanitize file name
-        filename=$(@coreutils@/bin/basename "${path}" | tr '@' '_')
-        nameversion="${filename%.tar.*}"
-        name="${nameversion%-*}"
-        dirname=$(@coreutils@/bin/dirname "${path}")
-        mv "${workdir}/${path}" "${workdir}/${dirname}/${filename}"
-        # Prefetch and hash source file
-        sha256=$(@nix@/bin/nix-prefetch-url "file://${workdir}/${dirname}/${filename}")
-        store=$(@nix@/bin/nix-store --print-fixed-path sha256 "$sha256" "$filename")
-        cat >>../manifest.json <<EOF
-  {
-    "name": "${nameversion}",
-    "store": "${store}",
-    "src": {
-      "url": "${url}",
-      "sha256": "${sha256}",
-      "name": "${filename}"
-    }
-  }
-EOF
-        sep=","
-    fi
-done
-
-echo "]" >>../manifest.json
-
-cd ..