Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
797 B · 34 lines
Shell
1234567891011121314151617181920212223242526272829303132333435#!/usr/bin/env bash
# Download patches from debian project# Usage $0 debian-patches.txt debian-patches.nix# An example input and output files can be found in tools/graphics/plotutils
DEB_URL=https://sources.debian.org/data/maindeclare -a deb_patchesmapfile -t deb_patches < $1
# First letterdeb_prefix="${deb_patches[0]:0:1}"prefix="${DEB_URL}/${deb_prefix}/${deb_patches[0]}/debian/patches"
if [[ -n "$2" ]]; then exec 1> $2fi
cat <<EOF# Generated by $(basename $0) from $(basename $1)let prefix = "${prefix}";in[EOFfor ((i=1;i < ${#deb_patches[@]}; ++i)); do url="${prefix}/${deb_patches[$i]}" sha256=$(nix-prefetch-url $url) echo " {" echo " url = \"\${prefix}/${deb_patches[$i]}\";" echo " sha256 = \"$sha256\";" echo " }"doneecho "]"