mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
kde5.applications: 16.04.1 -> 16.04.2
The generated source hashes are now stored outside the Nixpkgs tree.
This commit is contained in:
parent
87b18083c0
commit
f87c251c98
@ -16,10 +16,14 @@
|
||||
|
||||
let
|
||||
|
||||
inherit (pkgs) lib stdenv;
|
||||
inherit (pkgs) fetchurl lib stdenv;
|
||||
|
||||
srcs = import ./srcs.nix { inherit (pkgs) fetchurl; inherit mirror; };
|
||||
mirror = "mirror://kde";
|
||||
remotesrcs = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/ttuegel/nixpkgs-kde-qt/580915a460b11820c0b671236255180af5264c0c/applications-srcs.nix";
|
||||
sha256 = "19lwhn468p9v8p97vyy23q5mv0yxs394lsfl41ij3glrxd92s8kf";
|
||||
};
|
||||
srcs = import remotesrcs { inherit (pkgs) fetchurl; inherit mirror; };
|
||||
|
||||
packages = self: with self; {
|
||||
|
||||
|
@ -1,56 +0,0 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p coreutils findutils gnused nix wget
|
||||
|
||||
set -x
|
||||
|
||||
# The trailing slash at the end is necessary!
|
||||
WGET_ARGS='http://download.kde.org/stable/applications/16.04.1/ -A *.tar.xz'
|
||||
|
||||
mkdir tmp; cd tmp
|
||||
|
||||
rm -f ../srcs.csv
|
||||
|
||||
wget -nH -r -c --no-parent $WGET_ARGS
|
||||
|
||||
find . | while read src; do
|
||||
if [[ -f "${src}" ]]; then
|
||||
# Sanitize file name
|
||||
filename=$(basename "$src" | tr '@' '_')
|
||||
nameVersion="${filename%.tar.*}"
|
||||
name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,')
|
||||
version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
|
||||
echo "$name,$version,$src,$filename" >>../srcs.csv
|
||||
fi
|
||||
done
|
||||
|
||||
cat >../srcs.nix <<EOF
|
||||
# DO NOT EDIT! This file is generated automatically by fetchsrcs.sh
|
||||
{ fetchurl, mirror }:
|
||||
|
||||
{
|
||||
EOF
|
||||
|
||||
gawk -F , "{ print \$1 }" ../srcs.csv | sort | uniq | while read name; do
|
||||
versions=$(gawk -F , "/^$name,/ { print \$2 }" ../srcs.csv)
|
||||
latestVersion=$(echo "$versions" | sort -rV | head -n 1)
|
||||
src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" ../srcs.csv)
|
||||
filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" ../srcs.csv)
|
||||
url="${src:2}"
|
||||
sha256=$(nix-hash --type sha256 --base32 --flat "$src")
|
||||
cat >>../srcs.nix <<EOF
|
||||
$name = {
|
||||
version = "$latestVersion";
|
||||
src = fetchurl {
|
||||
url = "\${mirror}/$url";
|
||||
sha256 = "$sha256";
|
||||
name = "$filename";
|
||||
};
|
||||
};
|
||||
EOF
|
||||
done
|
||||
|
||||
echo "}" >>../srcs.nix
|
||||
|
||||
rm -f ../srcs.csv
|
||||
|
||||
cd ..
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user