Trying to add Zen Linux Kernel
svn path=/nixpkgs/trunk/; revision=17050
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#! /bin/sh
|
||||
|
||||
[ -z "$1" ] && {
|
||||
echo "Use $0 expression-basename repo-url branch-name package-base-name"
|
||||
echo "Like:"
|
||||
echo "$0 default http://git.example.com/repo origin/master hello"
|
||||
exit 1;
|
||||
} >&2
|
||||
|
||||
own_dir="$(cd "$(dirname "$0")"; sh -c pwd)"
|
||||
|
||||
cp "$own_dir/../builder-defs/template-bdp-uud.nix" "$1.nix"
|
||||
sed -e "s@src-for-default.nix@src-for-$1.nix@g;
|
||||
s@fetchUrlFromSrcInfo@fetchGitFromSrcInfo@g" -i "$1.nix"
|
||||
echo '{}' > "src-for-$1.nix"
|
||||
cat << EOF > src-info-for-$1.nix
|
||||
{
|
||||
repoUrl = "$2";
|
||||
rev = "$3";
|
||||
baseName = "$4";
|
||||
method = "fetchgit";
|
||||
}
|
||||
EOF
|
||||
|
||||
@@ -75,7 +75,7 @@ prefetchClause=""
|
||||
"
|
||||
export NIX_HASH_ALGO=sha256
|
||||
rev="$(getAttr rev '')";
|
||||
rev_and_hash="$("$own_dir"/../fetchgit/nix-prefetch-git "$repoUrl" "$rev" | tail -2)"
|
||||
rev_and_hash="$("$own_dir"/../fetchgit/nix-prefetch-git "$repoUrl" "$rev" | tee /dev/stderr | tail -2)"
|
||||
|
||||
rev="$(echo "$rev_and_hash" | head -1)"
|
||||
url="$repoUrl";
|
||||
|
||||
Reference in New Issue
Block a user