Merge master into staging-next

This commit is contained in:
github-actions[bot]
2022-07-17 06:01:34 +00:00
committed by GitHub
15 changed files with 568 additions and 400 deletions
+150 -14
View File
@@ -2,30 +2,159 @@
#! nix-shell -i bash -p coreutils findutils gnused nix wget
set -efuo pipefail
export LC_COLLATE=C # fix sort order
SRCS=
if [ -d "$1" ]; then
SRCS="$(pwd)/$1/srcs.nix"
. "$1/fetch.sh"
else
SRCS="$(pwd)/$(dirname $1)/srcs.nix"
. "$1"
# parse files and folders from https://download.kde.org/ and https://download.qt.io/
# you can override this function in fetch.sh
function PARSE_INDEX() {
cat "$1" | grep -o -E -e '\s+href="[^"]+\.tar\.xz"' -e '\s+href="[-_a-zA-Z0-9]+/"' | cut -d'"' -f2 | sort | uniq
}
if [ $# != 1 ]; then
echo "example use:" >&2
echo "cd nixpkgs/" >&2
echo "./maintainers/scripts/fetch-kde-qt.sh pkgs/development/libraries/qt-5/5.12" >&2
exit 1
fi
tmp=$(mktemp -d)
pushd $tmp >/dev/null
wget -nH -r -c --no-parent "${WGET_ARGS[@]}" >/dev/null
if ! echo "$1" | grep -q '^pkgs/'; then
echo "error: path argument must start with pkgs/" >&2
exit 1
fi
csv=$(mktemp)
find . -type f | while read src; do
# need absolute path for the pushd-popd block
if [ -f "$1" ]; then
echo "ok: using fetchfile $1"
fetchfilerel="$1"
fetchfile="$(readlink -f "$fetchfilerel")" # resolve absolute path
basedir="$(dirname "$fetchfile")"
basedirrel="$(dirname "$fetchfilerel")"
elif [ -d "$1" ]; then
echo "ok: using basedir $1"
basedirrel="$1"
basedir="$(readlink -f "$basedirrel")" # resolve absolute path
if ! [ -d "$basedir" ]; then
basedir="$(dirname "$basedir")"
fi
fetchfile="$basedir/fetch.sh"
else
echo 'error: $1 must be file or dir' >&2
exit 1
fi
pkgname=$(basename "$basedir")
SRCS="$basedir/srcs.nix"
srcsrel="$basedirrel/srcs.nix"
source "$fetchfile"
if [ -n "$WGET_ARGS" ]; then # old format
BASE_URL="${WGET_ARGS[0]}" # convert to new format
# validate
if ! echo "$BASE_URL" | grep -q -E '^(http|https|ftp)://'; then
printf 'error: from WGET_ARGS, converted invalid BASE_URL: %q\n' "$BASE_URL" >&2
exit 1
fi
printf 'ok: from WGET_ARGS, converted BASE_URL: %q\n' "$BASE_URL"
elif [ -n "$BASE_URL" ]; then # new format
:
else
echo "error: fetch.sh must set either WGET_ARGS or BASE_URL" >&2
exit 1
fi
tmptpl=tmp.fetch-kde-qt.$pkgname.XXXXXXXXXX
tmp=$(mktemp -d $tmptpl)
pushd $tmp >/dev/null
echo "tempdir is $tmp"
wgetargs='--quiet --show-progress'
#wgetargs='' # debug
dirlist="$BASE_URL"
filelist=""
base_url_len=${#BASE_URL}
clean_urls() {
# // -> /
sed -E 's,//+,/,g' | sed -E 's,^(http|https|ftp):/,&/,'
}
while [ -n "$dirlist" ]
do
for dirurl in $dirlist
do
echo "fetching index.html from $dirurl"
relpath=$(echo "./${dirurl:$base_url_len}" | clean_urls)
mkdir -p "$relpath"
indexfile=$(echo "$relpath/index.html" | clean_urls)
wget $wgetargs -O "$indexfile" "$dirurl"
echo "parsing $indexfile"
filedirlist="$(PARSE_INDEX "$indexfile")"
filelist_next="$(echo "$filedirlist" | grep '\.tar\.xz$' | while read file; do echo "$dirurl/$file"; done)"
filelist_next="$(echo "$filelist_next" | clean_urls)"
[ -n "$filelist" ] && filelist+=$'\n'
filelist+="$filelist_next"
dirlist="$(echo "$filedirlist" | grep -v '\.tar\.xz$' | while read dir; do echo "$dirurl/$dir"; done || true)"
dirlist="$(echo "$dirlist" | clean_urls)"
done
done
filecount=$(echo "$filelist" | wc -l)
if [ -z "$filelist" ]
then
echo "error: no files parsed from $tmp/index.html"
exit 1
fi
echo "parsed $filecount tar.xz files:"; echo "$filelist"
# most time is spent here
echo "fetching $filecount sha256 files ..."
urllist="$(echo "$filelist" | while read file; do echo "$file.sha256"; done)"
# wget -r: keep directory structure
echo "$urllist" | xargs wget $wgetargs -nH -r -c --no-parent && {
actual=$(find . -type f -name '*.sha256' | wc -l)
echo "fetching $filecount sha256 files done: got $actual files"
} || {
# workaround: in rare cases, the server does not provide the sha256 files
# for example when the release is just a few hours old
# and the servers are not yet fully synced
actual=$(find . -type f -name '*.sha256' | wc -l)
echo "fetching $filecount sha256 files failed: got only $actual files"
# TODO fetch only missing tar.xz files
echo "fetching $filecount tar.xz files ..."
urllist="$(echo "$filelist" | while read file; do echo "$BASE_URL/$file"; done)"
echo "$urllist" | xargs wget $wgetargs -nH -r -c --no-parent
echo "generating sha256 files ..."
find . -type f -name '*.tar.xz' | while read src; do
name=$(basename "$src")
sha256=$(sha256sum "$src" | cut -d' ' -f1)
echo "$sha256 $name" >"$src.sha256"
done
}
csv=$(mktemp $tmptpl.csv)
echo "writing temporary file $csv ..."
find . -type f -name '*.sha256' | while read sha256file; do
src="${sha256file%.*}" # remove extension
sha256=$(cat $sha256file | cut -d' ' -f1) # base16
sha256=$(nix-hash --type sha256 --to-base32 $sha256)
# Sanitize file name
filename=$(basename "$src" | tr '@' '_')
nameVersion="${filename%.tar.*}"
name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,' | sed -e 's,-everywhere-src$,,')
version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
echo "$name,$version,$src,$filename" >>$csv
echo "$name,$version,$src,$filename,$sha256" >>$csv
done
files_before=$(grep -c 'src = ' "$SRCS")
echo "writing output file $SRCS ..."
cat >"$SRCS" <<EOF
# DO NOT EDIT! This file is generated automatically.
# Command: $0 $@
@@ -39,8 +168,8 @@ gawk -F , "{ print \$1 }" $csv | sort | uniq | while read name; do
latestVersion=$(echo "$versions" | sort -rV | head -n 1)
src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" $csv)
filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" $csv)
sha256=$(gawk -F , "/^$name,$latestVersion,/ { print \$5 }" $csv)
url="${src:2}"
sha256=$(nix-hash --type sha256 --base32 --flat "$src")
cat >>"$SRCS" <<EOF
$name = {
version = "$latestVersion";
@@ -55,6 +184,13 @@ done
echo "}" >>"$SRCS"
files_after=$(grep -c 'src = ' "$SRCS")
echo "files before: $files_before"
echo "files after: $files_after"
echo "compare:"
echo "git diff $srcsrel"
popd >/dev/null
rm -fr $tmp >/dev/null
@@ -37,17 +37,14 @@ in appimageTools.wrapType2 rec {
extraInstallCommands = ''
# directory in /nix/store so readonly
cp -r ${appimageContents}/* $out
cd $out
chmod -R +w $out
mv $out/bin/${name} $out/bin/${pname}
# fixup and install desktop file
${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value ${pname} standard-notes.desktop
mv usr/share/icons share
rm usr/lib/* AppRun standard-notes.desktop .so*
--set-key Exec --set-value ${pname} ${appimageContents}/standard-notes.desktop
ln -s ${appimageContents}/usr/share/icons share
'';
meta = with lib; {
File diff suppressed because it is too large Load Diff
@@ -1066,5 +1066,6 @@ https://github.com/folke/zen-mode.nvim/,,
https://github.com/jnurmine/zenburn/,,
https://github.com/glepnir/zephyr-nvim/,,
https://github.com/ziglang/zig.vim/,,
https://github.com/mickael-menu/zk-nvim/,HEAD,
https://github.com/troydm/zoomwintab.vim/,,
https://github.com/nanotee/zoxide.vim/,,
@@ -45,12 +45,12 @@ in
stdenv.mkDerivation rec {
pname = "imagemagick";
version = "7.1.0.43";
version = "7.1.0-43";
src = fetchFromGitHub {
owner = "ImageMagick";
repo = "ImageMagick";
rev = version;
rev = builtins.replaceStrings [ "-" ] [ "." ] version;
hash = "sha256-SOy7Ci1rzLB12ofSQBWmX86dfbr/ywsRPunHRswlAt4=";
};
@@ -1,16 +1,35 @@
{ lib, fetchFromGitHub, makeDesktopItem, prusa-slicer, wxGTK31-gtk3 }:
{ lib, fetchFromGitHub, fetchpatch, makeDesktopItem, prusa-slicer, wxGTK31-gtk3 }:
let
appname = "SuperSlicer";
pname = "super-slicer";
description = "PrusaSlicer fork with more features and faster development cycle";
versions = {
stable = { version = "2.3.57.12"; sha256 = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw=="; };
latest = { version = "2.3.57.12"; sha256 = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw=="; };
stable = {
version = "2.3.57.12";
sha256 = "sha256-lePhDRHI++9zs54bTt2/Lu6ZQ7egjJCWb752aI0s7Mw==";
patches = null;
};
latest = {
version = "2.4.58.3";
sha256 = "sha256-pEZcBEvK4Mq8nytiXLJvta7Bk6qZRJfTNrYz7N/aUAE=";
patches = [
# Fix detection of TBB, see https://github.com/prusa3d/PrusaSlicer/issues/6355
(fetchpatch {
url = "https://github.com/prusa3d/PrusaSlicer/commit/76f4d6fa98bda633694b30a6e16d58665a634680.patch";
sha256 = "1r806ycp704ckwzgrw1940hh1l6fpz0k1ww3p37jdk6mygv53nv6";
})
# Fix compile error with boost 1.79. See https://github.com/supermerill/SuperSlicer/issues/2823
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/81e3ca3b7c131e8345aede89e3bbcd700e1ad567/media-gfx/superslicer/files/superslicer-2.4.58.3-boost-1.79-port-v2.patch";
sha256 = "sha256-xMbUjumPZ/7ulyRuBA76CwIv4BOpd+yKXCINSf58FxI=";
})
];
};
};
override = { version, sha256 }: super: {
inherit version pname;
override = { version, sha256, patches }: super: {
inherit version pname patches;
src = fetchFromGitHub {
owner = "supermerill";
@@ -20,8 +39,6 @@ let
fetchSubmodules = true;
};
patches = null;
# We don't need PS overrides anymore, and gcode-viewer is embedded in the binary.
postInstall = null;
separateDebugInfo = true;
@@ -5,14 +5,14 @@
python3Packages.buildPythonApplication rec {
pname = "flexget";
version = "3.3.19";
version = "3.3.21";
# Fetch from GitHub in order to use `requirements.in`
src = fetchFromGitHub {
owner = "flexget";
repo = "flexget";
rev = "refs/tags/v${version}";
hash = "sha256-dt4XEGJGNq0njhuJBYA6xbyTx1jkrZlJ0Pl83Xjat6I=";
hash = "sha256-0XpToyy5Q3d2IpEMaeyhTri4xCBrI3Kmy5lMTqnAqC0=";
};
postPatch = ''
@@ -44,6 +44,7 @@ python3Packages.buildPythonApplication rec {
jsonschema
loguru
more-itertools
packaging
psutil
pynzb
PyRSS2Gen
@@ -10,21 +10,14 @@ let
canary = "0.0.283";
};
version = versions.${branch};
srcs = let
darwin-ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg";
sha256 = "sha256-LS7KExVXkOv8O/GrisPMbBxg/pwoDXIOo1dK9wk1yB8=";
};
in {
srcs = rec {
x86_64-linux = {
stable = fetchurl {
url =
"https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
sha256 = "1hl01rf3l6kblx5v7rwnwms30iz8zw6dwlkjsx2f1iipljgkh5q4";
};
ptb = fetchurl {
url =
"https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
sha256 = "d78NnQZ3MkLje8mHrI6noH2iD2oEvSJ3cDnsmzQsUYc=";
};
canary = fetchurl {
@@ -32,20 +25,25 @@ let
sha256 = "sha256-OrGg4jXziesHBhQORxREN/wq776RgNGaTyjJNV4pSAU=";
};
};
x86_64-darwin = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg";
sha256 = "1jvlxmbfqhslsr16prsgbki77kq7i3ipbkbn67pnwlnis40y9s7p";
aarch64-darwin = {
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/osx/${version}/DiscordPTB.dmg";
sha256 = "sha256-LS7KExVXkOv8O/GrisPMbBxg/pwoDXIOo1dK9wk1yB8=";
};
ptb = darwin-ptb;
canary = fetchurl {
url =
"https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg";
url = "https://dl-canary.discordapp.net/apps/osx/${version}/DiscordCanary.dmg";
sha256 = "0mqpk1szp46mih95x42ld32rrspc6jx1j7qdaxf01whzb3d4pi9l";
};
};
# Only PTB bundles a MachO Universal binary with ARM support.
aarch64-darwin = { ptb = darwin-ptb; };
# Stable does not (yet) provide aarch64-darwin support. PTB and Canary, however, do.
x86_64-darwin =
aarch64-darwin
// {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/osx/${version}/Discord.dmg";
sha256 = "1jvlxmbfqhslsr16prsgbki77kq7i3ipbkbn67pnwlnis40y9s7p";
};
};
};
src = srcs.${stdenv.hostPlatform.system}.${branch};
@@ -57,35 +55,40 @@ let
license = licenses.unfree;
maintainers = with maintainers; [ ldesgoui MP2E devins2518 ];
platforms = [ "x86_64-linux" "x86_64-darwin" ]
++ lib.optionals (branch == "ptb") [ "aarch64-darwin" ];
++ lib.optionals (branch != "stable") [ "aarch64-darwin" ];
};
package = if stdenv.isLinux then ./linux.nix else ./darwin.nix;
package =
if stdenv.isLinux
then ./linux.nix
else ./darwin.nix;
openasar = callPackage ./openasar.nix { };
packages = (builtins.mapAttrs
(_: value: callPackage package
(value // {
inherit src version openasar;
meta = meta // { mainProgram = value.binaryName; };
})
)
{
stable = rec {
pname = "discord";
binaryName = "Discord";
desktopName = "Discord";
};
ptb = rec {
pname = "discord-ptb";
binaryName = "DiscordPTB";
desktopName = "Discord PTB";
};
canary = rec {
pname = "discord-canary";
binaryName = "DiscordCanary";
desktopName = "Discord Canary";
};
}
packages = (
builtins.mapAttrs
(_: value:
callPackage package (value
// {
inherit src version openasar;
meta = meta // { mainProgram = value.binaryName; };
}))
{
stable = rec {
pname = "discord";
binaryName = "Discord";
desktopName = "Discord";
};
ptb = rec {
pname = "discord-ptb";
binaryName = "DiscordPTB";
desktopName = "Discord PTB";
};
canary = rec {
pname = "discord-canary";
binaryName = "DiscordCanary";
desktopName = "Discord Canary";
};
}
);
in packages.${branch}
in
packages.${branch}
@@ -5,16 +5,16 @@
buildGoModule rec {
pname = "rclone";
version = "1.58.1";
version = "1.59.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-Hh0IVNaLAUOmdYJ6cbYFyDCLwL+0HyZdRzKnXAT0CB8=";
sha256 = "sha256-SHUAEjdcqzNiIxSsmYb71JiOhWPoi8Z2nJAReRw2M5k=";
};
vendorSha256 = "sha256-MPo1t1gzlrzAzbTOv/dSs2BH8NwlXmf6vo1DOFP2TrM=";
vendorSha256 = "sha256-ajOUvZ/0D8QL4MY6xO+hZziyUtIB0WQERU6Ov06K9I8=";
subPackages = [ "." ];
@@ -10,23 +10,23 @@ let
rev = "v3.0.0";
sha256 = "O6p2PFB7c2KE9VqWvmTaFywbW1hSzAP5V42EuemX+ls=";
};
in stdenv.mkDerivation rec {
in stdenv.mkDerivation (finalAttrs: {
pname = "nlohmann_json";
version = "3.10.5";
src = fetchFromGitHub {
owner = "nlohmann";
repo = "json";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "DTsZrdB9GcaNkx7ZKxcgCA3A9ShM5icSF0xyGguJNbk=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBuildTests=${if doCheck then "ON" else "OFF"}"
"-DBuildTests=${if finalAttrs.doCheck then "ON" else "OFF"}"
"-DJSON_MultipleHeaders=ON"
] ++ lib.optional doCheck "-DJSON_TestDataDirectory=${testData}";
] ++ lib.optional finalAttrs.doCheck "-DJSON_TestDataDirectory=${testData}";
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
@@ -44,4 +44,4 @@ in stdenv.mkDerivation rec {
license = licenses.mit;
platforms = platforms.all;
};
}
})
@@ -46,7 +46,7 @@
buildPythonPackage rec {
pname = "sentry-sdk";
version = "1.7.0";
version = "1.7.2";
format = "setuptools";
disabled = pythonOlder "3.7";
@@ -55,7 +55,7 @@ buildPythonPackage rec {
owner = "getsentry";
repo = "sentry-python";
rev = version;
hash = "sha256-Wee4toHLbiwYXMtsxALetAJ+JxxN/DsNPIiZeeWNuI0=";
hash = "sha256-0VQ1P3xWC1keoXaPfIzh+uGXvRAK3nOrc6fLKIhfiHk=";
};
propagatedBuildInputs = [
@@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "transmission-rpc";
version = "3.3.0";
version = "3.3.2";
disabled = pythonOlder "3.6";
format = "pyproject";
@@ -20,8 +20,8 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "Trim21";
repo = "transmission-rpc";
rev = "v${version}";
sha256 = "sha256-Ys9trQMCHqxBSaTobWt8WZwi1F8HKTUKaIxvyo6ZPP0=";
rev = "refs/tags/v${version}";
sha256 = "sha256-GkhNOKatT/hJFw1l1xrf43jtgxvJ+WVvhz83Oe0MZ6w=";
};
# remove once upstream has tagged version with dumped typing-extensions
@@ -5,13 +5,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "sqlfluff";
version = "1.2.0";
version = "1.2.1";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-n5DprvSbli7wEV+oRA+U5UnaAGPit2Zd2gFb9fCgG8A=";
hash = "sha256-BTb01EKPBBTZR8g3RkW0llj169wk6Y7Ui4UoCR+YWsc=";
};
propagatedBuildInputs = with python3.pkgs; [
+2 -2
View File
@@ -6,13 +6,13 @@
buildGoModule rec {
pname = "boulder";
version = "2022-07-05";
version = "2022-07-11";
src = fetchFromGitHub {
owner = "letsencrypt";
repo = "boulder";
rev = "release-${version}";
sha256 = "sha256-WhQOpMeZe+oBitsHPe9kpFt0K1niU4Q9IvlOoDseXDM=";
sha256 = "sha256-fDKB7q2e+qdHt+t/BQWX7LkpyiZQtZSHp/x5uv0/c7c=";
leaveDotGit = true;
postFetch = ''
cd $out
+4 -3
View File
@@ -16,7 +16,7 @@ stdenv.mkDerivation {
doCheck = true;
meta = {
meta = with lib; {
description = "A tool for managing the installation of multiple software packages in the same run-time directory tree";
longDescription = ''
@@ -29,8 +29,9 @@ stdenv.mkDerivation {
as .../share, .../man, and so on.
'';
license = lib.licenses.gpl3Plus;
license = licenses.gpl3Plus;
homepage = "https://www.gnu.org/software/stow/";
platforms = lib.platforms.all;
maintainers = with maintainers; [ sarcasticadmin ];
platforms = platforms.all;
};
}