diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-08 16:01:12 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-08 16:01:12 +0000 |
commit | 9ee0a9df9bc69e72278b8d34093238428fa3ea82 (patch) | |
tree | 5b074e2ebbc2aba8c957753bfb9e549ed7689585 /maintainers | |
parent | 0b90cd41b2fe467f53d9a082c91e6f6438ba6a2b (diff) | |
parent | 47288a22242b0cd554efc45d446e67573ca308f7 (diff) |
svn merge ^/nixpkgs/trunk
A few trivial conflicts svn path=/nixpkgs/branches/stdenv-updates/; revision=31434
Diffstat (limited to 'maintainers')
-rwxr-xr-x | maintainers/scripts/debian-patches.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/maintainers/scripts/debian-patches.sh b/maintainers/scripts/debian-patches.sh new file mode 100755 index 0000000000000..78678473a49fd --- /dev/null +++ b/maintainers/scripts/debian-patches.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +# Download patches from debian project +# Usage $0 debian-patches.txt debian-patches.nix +# An example input and output files can be found in applications/graphics/xara/ + +DEB_URL=http://patch-tracker.debian.org/patch/series/dl +declare -a deb_patches +mapfile -t deb_patches < $1 + +prefix="${DEB_URL}/${deb_patches[0]}" + +if [[ -n "$2" ]]; then + exec 1> $2 +fi + +cat <<EOF +# Generated by $(basename $0) from $(basename $1) +let + prefix = "${prefix}"; +in +[ +EOF +for ((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 " }" +done +echo "]" |