diff options
Diffstat (limited to 'pkgs/by-name/sk')
-rw-r--r-- | pkgs/by-name/sk/sketchybar-app-font/package.nix | 13 | ||||
-rw-r--r-- | pkgs/by-name/sk/sketchybar/package.nix | 2 | ||||
-rw-r--r-- | pkgs/by-name/sk/skia-aseprite/deps.nix | 23 | ||||
-rw-r--r-- | pkgs/by-name/sk/skia-aseprite/package.nix | 115 | ||||
-rwxr-xr-x | pkgs/by-name/sk/skia-aseprite/update.sh | 71 | ||||
-rw-r--r-- | pkgs/by-name/sk/skypeexport/package.nix | 36 |
6 files changed, 252 insertions, 8 deletions
diff --git a/pkgs/by-name/sk/sketchybar-app-font/package.nix b/pkgs/by-name/sk/sketchybar-app-font/package.nix index ff1a2fe7c742c..7e34a1041db13 100644 --- a/pkgs/by-name/sk/sketchybar-app-font/package.nix +++ b/pkgs/by-name/sk/sketchybar-app-font/package.nix @@ -18,7 +18,7 @@ lib.checkListOfEnum "sketchybar-app-font: artifacts" artifacts artifactList in { pname = "sketchybar-app-font"; - version = "2.0.17"; + version = "2.0.19"; srcs = selectedSources; @@ -52,15 +52,15 @@ lib.checkListOfEnum "sketchybar-app-font: artifacts" artifacts artifactList sources = { font = fetchurl { url = "https://github.com/kvndrsslr/sketchybar-app-font/releases/download/v${finalAttrs.version}/sketchybar-app-font.ttf"; - hash = "sha256-iVSWFqhzf0ZxfQODAf+uvGIiWMjWbir6ZWurlx3n6/w="; + hash = "sha256-AH4Zkaccms1gNt7ZHZRHYPOx/iLpbcA4MiyBStHRDfU="; }; lua = fetchurl { url = "https://github.com/kvndrsslr/sketchybar-app-font/releases/download/v${finalAttrs.version}/icon_map.lua"; - hash = "sha256-/N16zLflQ2sONBFOZiIdC8KR1rd5pZvXftiXjXJvTVA="; + hash = "sha256-AGcHBgOZY2EBR0WEfaQhEsTRdo8QfEawx6Q2rdBuKIg="; }; shell = fetchurl { url = "https://github.com/kvndrsslr/sketchybar-app-font/releases/download/v${finalAttrs.version}/icon_map.sh"; - hash = "sha256-nPBiNz+3oHwiertjMJ6YW6g6WZglGjassUGrsQVvnRM="; + hash = "sha256-fdKnweYF92zCLVBVXTjLWK9vdzMD8FvOHjEo2vqPbhQ="; }; }; @@ -73,14 +73,13 @@ lib.checkListOfEnum "sketchybar-app-font: artifacts" artifacts artifactList exit 0 fi for artifact in ${lib.escapeShellArgs (lib.mapAttrsToList(a: _: a) finalAttrs.passthru.sources)}; do - update-source-version "sketchybar-app-font" "0" "${lib.fakeHash}" --source-key="sources.$artifact" - update-source-version "sketchybar-app-font" "$NEW_VERSION" --source-key="sources.$artifact" + update-source-version "sketchybar-app-font" "$NEW_VERSION" --ignore-same-version --source-key="sources.$artifact" done ''; }; meta = { - description = "A ligature-based symbol font and a mapping function for sketchybar"; + description = "Ligature-based symbol font and a mapping function for sketchybar"; longDescription = '' A ligature-based symbol font and a mapping function for sketchybar, inspired by simple-bar's usage of community-contributed minimalistic app icons. ''; diff --git a/pkgs/by-name/sk/sketchybar/package.nix b/pkgs/by-name/sk/sketchybar/package.nix index 37a9849b2830c..0b1b4e21acd16 100644 --- a/pkgs/by-name/sk/sketchybar/package.nix +++ b/pkgs/by-name/sk/sketchybar/package.nix @@ -75,7 +75,7 @@ stdenv'.mkDerivation (finalAttrs: { }; meta = { - description = "A highly customizable macOS status bar replacement"; + description = "Highly customizable macOS status bar replacement"; homepage = "https://github.com/FelixKratz/SketchyBar"; license = lib.licenses.gpl3; mainProgram = "sketchybar"; diff --git a/pkgs/by-name/sk/skia-aseprite/deps.nix b/pkgs/by-name/sk/skia-aseprite/deps.nix new file mode 100644 index 0000000000000..a51fe82d9bcec --- /dev/null +++ b/pkgs/by-name/sk/skia-aseprite/deps.nix @@ -0,0 +1,23 @@ +{ fetchgit }: +{ + angle2 = fetchgit { + url = "https://chromium.googlesource.com/angle/angle.git"; + rev = "8718783526307a3fbb35d4c1ad4e8101262a0d73"; + hash = "sha256-UXYCqn++WCyncwNyuuq8rIkxlB7koMK9Ynx7TRzCIDE="; + }; + dng_sdk = fetchgit { + url = "https://android.googlesource.com/platform/external/dng_sdk.git"; + rev = "c8d0c9b1d16bfda56f15165d39e0ffa360a11123"; + hash = "sha256-lTtvBUGaia0jhrxpw7k7NIq2SVyGmBJPCvjIqAQCmNo="; + }; + piex = fetchgit { + url = "https://android.googlesource.com/platform/external/piex.git"; + rev = "bb217acdca1cc0c16b704669dd6f91a1b509c406"; + hash = "sha256-IhAfxlu0UmllihBP9wbg7idT8azlbb9arLKUaZ6qNxY="; + }; + sfntly = fetchgit { + url = "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git"; + rev = "b55ff303ea2f9e26702b514cf6a3196a2e3e2974"; + hash = "sha256-/zp1MsR31HehoC5OAI4RO8QBlm7mldQNiTI7Xr/LJeI="; + }; +} diff --git a/pkgs/by-name/sk/skia-aseprite/package.nix b/pkgs/by-name/sk/skia-aseprite/package.nix new file mode 100644 index 0000000000000..3b34ad631862f --- /dev/null +++ b/pkgs/by-name/sk/skia-aseprite/package.nix @@ -0,0 +1,115 @@ +{ + aseprite, + clangStdenv, + expat, + fetchFromGitHub, + fetchgit, + fontconfig, + gn, + harfbuzzFull, + icu, + lib, + libglvnd, + libjpeg, + libpng, + libwebp, + libX11, + mesa, + ninja, + python3, + zlib, +}: + +let + # deps.nix is generated by ./update.sh + depSrcs = import ./deps.nix { inherit fetchgit; }; +in +clangStdenv.mkDerivation (finalAttrs: { + pname = "skia-aseprite"; + version = "m102-861e4743af"; + + src = fetchFromGitHub { + owner = "aseprite"; + repo = "skia"; + rev = finalAttrs.version; + hash = "sha256-IlZbalmHl549uDUfPG8hlzub8TLWhG0EsV6HVAPdsl0="; + }; + + nativeBuildInputs = [ + gn + ninja + python3 + ]; + + preConfigure = with depSrcs; '' + mkdir -p third_party/externals + ln -s ${angle2} third_party/externals/angle2 + ln -s ${dng_sdk} third_party/externals/dng_sdk + ln -s ${piex} third_party/externals/piex + ln -s ${sfntly} third_party/externals/sfntly + ''; + + configurePhase = '' + runHook preConfigure + gn gen lib --args="is_debug=false is_official_build=true extra_cflags=[\"-I${harfbuzzFull.dev}/include/harfbuzz\"]" + runHook postConfigure + ''; + + buildInputs = [ + expat + fontconfig + harfbuzzFull + icu + libglvnd + libjpeg + libpng + libwebp + libX11 + mesa + zlib + ]; + + buildPhase = '' + runHook preBuild + ninja -C lib skia modules + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out + + # Glob will match all subdirs. + shopt -s globstar + + # All these paths are used in some way when building Aseprite. + cp -r --parents -t $out/ \ + include/codec \ + include/config \ + include/core \ + include/effects \ + include/gpu \ + include/private \ + include/utils \ + include/third_party/skcms/*.h \ + lib/*.a \ + modules/skshaper/include/*.h \ + src/core/*.h \ + src/gpu/**/*.h \ + third_party/externals/angle2/include \ + third_party/skcms/**/*.h + + runHook postInstall + ''; + + passthru.updateScript = [ ./update.sh ] ++ builtins.attrNames depSrcs; + + meta = { + description = "Complete 2D graphic library for drawing Text, Geometries, and Images (Aseprite's fork)"; + homepage = "https://skia.org/"; + downloadPage = "https://github.com/aseprite/skia"; + license = lib.licenses.bsd3; + inherit (aseprite.meta) maintainers; + platforms = lib.platforms.all; + }; +}) diff --git a/pkgs/by-name/sk/skia-aseprite/update.sh b/pkgs/by-name/sk/skia-aseprite/update.sh new file mode 100755 index 0000000000000..78f7e67da6e90 --- /dev/null +++ b/pkgs/by-name/sk/skia-aseprite/update.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env nix-shell +#!nix-shell --pure -i bash +#!nix-shell -p cacert curl git jq nix-prefetch-git +# shellcheck shell=bash +# vim: set tabstop=2 shiftwidth=2 expandtab: +set -euo pipefail +shopt -s inherit_errexit + +[ $# -gt 0 ] || { + printf >&2 'usage: %s <deps>' "$0" + exit 1 +} + +pkgpath=$(git rev-parse --show-toplevel)/pkgs/by-name/sk/skia-aseprite +depfilter=$(tr ' ' '|' <<< "$*") +depfile=$pkgpath/deps.nix +pkgfile=$pkgpath/package.nix + +update_deps() { + local deps third_party_deps name url rev hash prefetch + + version=$(sed -n 's|.*version = "\(.*\)".*|\1|p' < "$pkgfile") + deps=$(curl -fsS https://raw.githubusercontent.com/aseprite/skia/$version/DEPS) + third_party_deps=$(sed -n 's|[ ",]||g; s|:| |; s|@| |; s|^third_party/externals/||p' <<< "$deps") + filtered=$(grep -E -- "$depfilter" <<< "$third_party_deps") + if [[ -z $filtered ]]; then + printf >&2 '%s: error: filter "%s" matched nothing' "$0" "$depfilter" + return 1 + fi + + printf '{ fetchgit }:\n{\n' + while read -r name url rev; do + printf >&2 'Fetching %s@%s\n' "$name" "$rev" + prefetch=$(nix-prefetch-git --quiet --rev "$rev" "$url") + hash=$(jq -r '.hash' <<< "$prefetch") + + cat << EOF + $name = fetchgit { + url = "$url"; + rev = "$rev"; + hash = "$hash"; + }; +EOF + # `read` could exit with a non-zero code without a newline at the end + done < <(printf '%s\n' "$filtered") + printf '}\n' +} + +update_version() { + local newver newrev + newver=$( + curl --fail \ + --header 'Accept: application/vnd.github+json' \ + --location --show-error --silent \ + ${GITHUB_TOKEN:+ --user \":$GITHUB_TOKEN\"} \ + https://api.github.com/repos/aseprite/skia/releases/latest \ + | jq -r .tag_name + ) + newhash=$(nix-prefetch-git --quiet --rev "$newver" https://github.com/aseprite/skia.git | jq -r '.hash') + sed \ + -e 's|version = ".*"|version = "'$newver'"|' \ + -e 's|hash = ".*"|hash = "'$newhash'"|' \ + -- "$pkgfile" +} + +temp=$(mktemp) +trap 'ret=$?; rm -rf -- "$temp"; exit $ret' EXIT +update_version > "$temp" +cp "$temp" "$pkgfile" +update_deps > "$temp" +cp "$temp" "$depfile" diff --git a/pkgs/by-name/sk/skypeexport/package.nix b/pkgs/by-name/sk/skypeexport/package.nix new file mode 100644 index 0000000000000..2e6d72866073f --- /dev/null +++ b/pkgs/by-name/sk/skypeexport/package.nix @@ -0,0 +1,36 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, boost }: + +stdenv.mkDerivation (finalAttrs: { + pname = "skypeexport"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "Temptin"; + repo = "SkypeExport"; + rev = "v${finalAttrs.version}"; + sha256 = "1ilkh0s3dz5cp83wwgmscnfmnyck5qcwqg1yxp9zv6s356dxnbak"; + }; + + patches = [ + (fetchpatch { + name = "boost167.patch"; + url = "https://github.com/Temptin/SkypeExport/commit/ef60f2e4fc9e4a5764c8d083a73b585457bc10b1.patch"; + sha256 = "sha256-t+/v7c66OULmQCD/sNt+iDJeQ/6UG0CJ8uQY2PVSFQo="; + }) + ]; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ boost ]; + + preConfigure = "cd src/SkypeExport/_gccbuild/linux"; + installPhase = "install -Dt $out/bin SkypeExport"; + + meta = with lib; { + description = "Export Skype history to HTML"; + mainProgram = "SkypeExport"; + homepage = "https://github.com/Temptin/SkypeExport"; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ yana ]; + }; +}) |