diff options
Diffstat (limited to 'pkgs/by-name/yo')
-rw-r--r-- | pkgs/by-name/yo/yofi/package.nix | 50 | ||||
-rw-r--r-- | pkgs/by-name/yo/yoink/package.nix | 28 | ||||
-rw-r--r-- | pkgs/by-name/yo/youplot/package.nix | 2 | ||||
-rw-r--r-- | pkgs/by-name/yo/your_spotify/client.nix | 58 | ||||
-rw-r--r-- | pkgs/by-name/yo/your_spotify/package.json | 10 | ||||
-rw-r--r-- | pkgs/by-name/yo/your_spotify/package.nix | 85 | ||||
-rw-r--r-- | pkgs/by-name/yo/yourkit-java/forbid-desktop-item-creation | 16 | ||||
-rw-r--r-- | pkgs/by-name/yo/yourkit-java/package.nix | 95 | ||||
-rwxr-xr-x | pkgs/by-name/yo/yourkit-java/update.sh | 54 | ||||
-rw-r--r-- | pkgs/by-name/yo/youtrack/package.nix | 8 |
10 files changed, 401 insertions, 5 deletions
diff --git a/pkgs/by-name/yo/yofi/package.nix b/pkgs/by-name/yo/yofi/package.nix new file mode 100644 index 0000000000000..5fa38d280aef0 --- /dev/null +++ b/pkgs/by-name/yo/yofi/package.nix @@ -0,0 +1,50 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, autoPatchelfHook +, fontconfig +, libxkbcommon +, pkg-config +, libgcc +, wayland +}: +rustPlatform.buildRustPackage rec { + pname = "yofi"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "l4l"; + repo = "yofi"; + rev = "refs/tags/${version}"; + hash = "sha256-cepAZyA4RBgqeF20g6YOlZTM0aRqErw17yuQ3U24UEg="; + }; + + cargoHash = "sha256-iSy/y1iwhR8x3wDIfazMeROSrJ8uRyA10hoNo6y2OQc="; + nativeBuildInputs = [ + autoPatchelfHook + pkg-config + ]; + + buildInputs = [ + libgcc + libxkbcommon + ]; + + appendRunpaths = [ + (lib.makeLibraryPath [ fontconfig wayland ]) + ]; + + checkFlags = [ + # Fail to run in sandbox environment. + "--skip=screen::context::test" + ]; + + meta = { + description = "Minimalist app launcher in Rust"; + homepage = "https://github.com/l4l/yofi"; + license = lib.licenses.mit; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ rayslash ]; + mainProgram = "yofi"; + }; +} diff --git a/pkgs/by-name/yo/yoink/package.nix b/pkgs/by-name/yo/yoink/package.nix new file mode 100644 index 0000000000000..83c767fe0c174 --- /dev/null +++ b/pkgs/by-name/yo/yoink/package.nix @@ -0,0 +1,28 @@ +{ lib +, fetchFromGitHub +, buildGoModule +}: + +let + version = "0.5.0"; +in +buildGoModule { + pname = "yoink"; + inherit version; + + src = fetchFromGitHub { + owner = "MrMarble"; + repo = "yoink"; + rev = "v${version}"; + hash = "sha256-9ftlAECywF4khH279h2qcSvKRDQX2I7GDQ7EYcEybL0="; + }; + + vendorHash = "sha256-cnfh2D/k4JP9BNlI+6FVLBFyk5XMIYG/DotUdAZaY0Q="; + + meta = { + homepage = "https://github.com/MrMarble/yoink"; + description = "Automatically download freeleech torrents"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ hogcycle ]; + }; +} diff --git a/pkgs/by-name/yo/youplot/package.nix b/pkgs/by-name/yo/youplot/package.nix index d858c8764e835..b1fcb76795ad4 100644 --- a/pkgs/by-name/yo/youplot/package.nix +++ b/pkgs/by-name/yo/youplot/package.nix @@ -9,7 +9,7 @@ bundlerApp { passthru.updateScript = bundlerUpdateScript "youplot"; meta = with lib; { - description = "A command line tool that draws plots on the terminal"; + description = "Command line tool that draws plots on the terminal"; homepage = "https://github.com/red-data-tools/YouPlot"; mainProgram = "uplot"; license = licenses.mit; diff --git a/pkgs/by-name/yo/your_spotify/client.nix b/pkgs/by-name/yo/your_spotify/client.nix new file mode 100644 index 0000000000000..420498821bf93 --- /dev/null +++ b/pkgs/by-name/yo/your_spotify/client.nix @@ -0,0 +1,58 @@ +{ + apiEndpoint ? "http://localhost:3000", + fetchYarnDeps, + your_spotify, + mkYarnPackage, + fixup-yarn-lock, + src, + version, + yarn, +}: +mkYarnPackage rec { + inherit version src; + pname = "your_spotify_client"; + name = "your_spotify_client-${version}"; + packageJSON = ./package.json; + offlineCache = fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-5SgknaRVzgO2Dzc8MhAaM8UERWMv+PrItzevoWHbWnA="; + }; + configurePhase = '' + runHook preConfigure + + export HOME=$(mktemp -d) + yarn config --offline set yarn-offline-mirror $offlineCache + fixup-yarn-lock yarn.lock + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules/ + + runHook postConfigure + ''; + buildPhase = '' + runHook preBuild + pushd ./apps/client/ + yarn --offline run build + export API_ENDPOINT="${apiEndpoint}" + substituteInPlace scripts/run/variables.sh --replace-quiet '/app/apps/client/' "./" + + chmod +x ./scripts/run/variables.sh + patchShebangs --build ./scripts/run/variables.sh + + ./scripts/run/variables.sh + + popd + runHook postBuild + ''; + nativeBuildInputs = [yarn fixup-yarn-lock]; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r ./apps/client/build/* $out + runHook postInstall + ''; + doDist = false; + meta = { + inherit (your_spotify.meta) homepage changelog description license maintainers; + }; +} diff --git a/pkgs/by-name/yo/your_spotify/package.json b/pkgs/by-name/yo/your_spotify/package.json new file mode 100644 index 0000000000000..8c10988ffb6d2 --- /dev/null +++ b/pkgs/by-name/yo/your_spotify/package.json @@ -0,0 +1,10 @@ +{ + "name": "@your_spotify/root", + "version": "1.10.1", + "repository": "git@github.com:Yooooomi/your_spotify.git", + "author": "Timothee <timothee.boussus@gmail.com>", + "private": true, + "workspaces": [ + "apps/*" + ] +} diff --git a/pkgs/by-name/yo/your_spotify/package.nix b/pkgs/by-name/yo/your_spotify/package.nix new file mode 100644 index 0000000000000..0296b9d22c028 --- /dev/null +++ b/pkgs/by-name/yo/your_spotify/package.nix @@ -0,0 +1,85 @@ +{ + callPackage, + fetchFromGitHub, + fetchYarnDeps, + lib, + makeWrapper, + mkYarnPackage, + nodejs, + fixup-yarn-lock, + yarn, +}: let + version = "1.10.1"; + src = fetchFromGitHub { + owner = "Yooooomi"; + repo = "your_spotify"; + rev = "refs/tags/${version}"; + hash = "sha256-e82j2blGxQLWAlBNuAnFvlD9vwMk4/mRI0Vf7vuaPA0="; + }; + client = callPackage ./client.nix {inherit src version;}; +in + mkYarnPackage rec { + inherit version src; + pname = "your_spotify_server"; + name = "your_spotify_server-${version}"; + packageJSON = ./package.json; + offlineCache = fetchYarnDeps { + yarnLock = src + "/yarn.lock"; + hash = "sha256-5SgknaRVzgO2Dzc8MhAaM8UERWMv+PrItzevoWHbWnA="; + }; + + configurePhase = '' + runHook preConfigure + + export HOME=$(mktemp -d) + yarn config --offline set yarn-offline-mirror $offlineCache + fixup-yarn-lock yarn.lock + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules/ + + pushd ./apps/server/ + yarn --offline run build + popd + + rm -r node_modules + export NODE_ENV="production" + yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive + patchShebangs node_modules/ + + runHook postBuild + ''; + nativeBuildInputs = [makeWrapper yarn fixup-yarn-lock]; + installPhase = '' + runHook preInstall + + mkdir -p $out/share/your_spotify + cp -r node_modules $out/share/your_spotify/node_modules + cp -r ./apps/server/{lib,package.json} $out + mkdir -p $out/bin + makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_migrate" \ + --add-flags "$out/lib/migrations.js" --set NODE_PATH "$out/share/your_spotify/node_modules" + makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_server" \ + --add-flags "$out/lib/index.js" --set NODE_PATH "$out/share/your_spotify/node_modules" + + runHook postInstall + ''; + doDist = false; + passthru = { + inherit client; + }; + meta = with lib; { + homepage = "https://github.com/Yooooomi/your_spotify"; + changelog = "https://github.com/Yooooomi/your_spotify/releases/tag/${version}"; + description = "Self-hosted application that tracks what you listen and offers you a dashboard to explore statistics about it"; + license = licenses.gpl3Only; + maintainers = with maintainers; [patrickdag]; + mainProgram = "your_spotify_server"; + }; + } diff --git a/pkgs/by-name/yo/yourkit-java/forbid-desktop-item-creation b/pkgs/by-name/yo/yourkit-java/forbid-desktop-item-creation new file mode 100644 index 0000000000000..df068b97d1944 --- /dev/null +++ b/pkgs/by-name/yo/yourkit-java/forbid-desktop-item-creation @@ -0,0 +1,16 @@ +CONFIG_DIR=$YS/config +if [ ! -d $CONFIG_DIR ]; then + mkdir -p $CONFIG_DIR +fi + +REGISTRY=$CONFIG_DIR/registry8.xml +if [ ! -e $REGISTRY ]; then + cat >$REGISTRY <<EOF +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<registry8> + <desktop-file.created> + <boolean value="true"/> + </desktop-file.created> +</registry8> +EOF +fi diff --git a/pkgs/by-name/yo/yourkit-java/package.nix b/pkgs/by-name/yo/yourkit-java/package.nix new file mode 100644 index 0000000000000..b2d5451a93131 --- /dev/null +++ b/pkgs/by-name/yo/yourkit-java/package.nix @@ -0,0 +1,95 @@ +{ fetchzip +, lib +, stdenvNoCC +, copyDesktopItems +, imagemagick +, makeDesktopItem +, jre +}: +let + vPath = v: lib.elemAt (lib.splitString "-" v) 0; + + version = "2024.3-b157"; + + arches = { + aarch64-linux = "arm64"; + x86_64-linux = "x64"; + }; + + arch = + arches.${stdenvNoCC.targetPlatform.system} or (throw "Unsupported system"); + + hashes = { + arm64 = "sha256-0a9maZhgtXH21Ph0o3Rb+rCPhAmZRxjZCRyDmTvusLk="; + x64 = "sha256-nLaOOkPG2QEHkHd0S2AYLT2IpkMchGw9adyUDLCNQFg="; + }; + + desktopItem = makeDesktopItem { + name = "YourKit Java Profiler"; + desktopName = "YourKit Java Profiler " + version; + type = "Application"; + exec = "yourkit-java-profiler %f"; + icon = "yourkit-java-profiler"; + categories = [ "Development" "Java" "Profiling" ]; + terminal = false; + startupWMClass = "YourKit Java Profiler"; + }; +in +stdenvNoCC.mkDerivation { + inherit version; + + pname = "yourkit-java"; + + src = fetchzip { + url = "https://download.yourkit.com/yjp/${vPath version}/YourKit-JavaProfiler-${version}-${arch}.zip"; + hash = hashes.${arch}; + }; + + nativeBuildInputs = [ copyDesktopItems imagemagick ]; + + buildInputs = [ jre ]; + + desktopItems = [ desktopItem ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out + cp -pr bin lib license.html license-redist.txt probes samples $out + cp ${./forbid-desktop-item-creation} $out/bin/forbid-desktop-item-creation + mv $out/bin/profiler.sh $out/bin/yourkit-java-profiler + mkdir -p $out/share/icons + convert $out/bin/profiler.ico\[0] \ + -size 256x256 \ + $out/share/icons/yourkit-java-profiler.png + rm $out/bin/profiler.ico + rm -rf $out/bin/{windows-*,mac,linux-{*-32,musl-*,ppc-*}} + if [[ ${arch} = x64 ]]; then + rm -rf $out/bin/linux-arm-64 + else + rm -rf $out/bin/linux-x86-64 + fi + substituteInPlace $out/bin/yourkit-java-profiler \ + --replace 'JAVA_EXE="$YD/jre64/bin/java"' JAVA_EXE=${jre}/bin/java + # Use our desktop item, which will be purged when this package + # gets removed + sed -i -e "/^YD=/isource $out/bin/forbid-desktop-item-creation\\ + " \ + $out/bin/yourkit-java-profiler + + runHook postInstall + ''; + + passthru.updateScript = ./update.sh; + + meta = with lib; { + description = "Award winning, fully featured low overhead profiler for Java EE and Java SE platforms"; + homepage = "https://www.yourkit.com"; + changelog = "https://www.yourkit.com/changes/"; + license = licenses.unfree; + mainProgram = "yourkit-java-profiler"; + platforms = attrNames arches; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + maintainers = with maintainers; [ herberteuler ]; + }; +} diff --git a/pkgs/by-name/yo/yourkit-java/update.sh b/pkgs/by-name/yo/yourkit-java/update.sh new file mode 100755 index 0000000000000..0b95732f6b74a --- /dev/null +++ b/pkgs/by-name/yo/yourkit-java/update.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p coreutils curl gawk gnused nix-prefetch + +set -euo pipefail + +ROOT="$(dirname "$(readlink -f "$0")")" +DRV_BASE=package.nix +NIX_DRV="$ROOT/$DRV_BASE" +if [[ ! -f "$NIX_DRV" ]]; then + echo "ERROR: cannot find $DRV_BASE in $ROOT" + exit 1 +fi + +function retrieve_latest_version () { + curl https://www.yourkit.com/java/profiler/download/ \ + | grep -Eo '(Version|Build): ([a-z0-9#.-])+' \ + | awk '{ print $2 }' \ + | tr -d '\n' \ + | sed 's/#/-b/' +} + +function calc_hash () { + local version=$1 + local url=$2 + nix-prefetch --option extra-experimental-features flakes \ + "{ stdenv, fetchzip }: +stdenv.mkDerivation { + pname = \"yourkit-java-binary\"; + version = \"$version\"; + src = fetchzip { + url = \"$url\"; + }; +}" +} + +function update_hash () { + local arch=$1 + local version=$2 + local date=$(echo $version | sed 's/-.*//') + local url=https://download.yourkit.com/yjp/$date/YourKit-JavaProfiler-$version-$arch.zip + local hash=$(calc_hash $version $url) + sed -i -e "s|^.*$arch.*=.*\"sha256-.*$| $arch = \"$hash\";|" $NIX_DRV +} + +version=$(retrieve_latest_version) +sed -i -e "s|^.*version.*=.*\".*$| version = \"$version\";|" $NIX_DRV +for arch in arm64 x64; do + update_hash $arch $version +done + +# Local variables: +# mode: shell-script +# eval: (sh-set-shell "bash") +# End: diff --git a/pkgs/by-name/yo/youtrack/package.nix b/pkgs/by-name/yo/youtrack/package.nix index 61788d193b564..9695dd3e0a8fb 100644 --- a/pkgs/by-name/yo/youtrack/package.nix +++ b/pkgs/by-name/yo/youtrack/package.nix @@ -1,12 +1,12 @@ -{ lib, stdenvNoCC, fetchzip, makeBinaryWrapper, jdk17_headless, gawk, statePath ? "/var/lib/youtrack" }: +{ lib, stdenvNoCC, fetchzip, makeBinaryWrapper, jdk21_headless, gawk, statePath ? "/var/lib/youtrack" }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "youtrack"; - version = "2024.1.28928"; + version = "2024.2.34646"; src = fetchzip { url = "https://download.jetbrains.com/charisma/youtrack-${finalAttrs.version}.zip"; - hash = "sha256-8+dZ1YTpvOX0IEEbFzv4t8T/U/BZMeDCZL7Ju25WBpE="; + hash = "sha256-9htjtB1TC+p+eETsXH5B36NKnZsFA/Og/PIW9gHQefc="; }; nativeBuildInputs = [ makeBinaryWrapper ]; @@ -20,7 +20,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { cp -r * $out makeWrapper $out/bin/youtrack.sh $out/bin/youtrack \ --prefix PATH : "${lib.makeBinPath [ gawk ]}" \ - --set JRE_HOME ${jdk17_headless} + --set JRE_HOME ${jdk21_headless} rm -rf $out/internal/java mv $out/conf $out/conf.orig ln -s ${statePath}/backups $out/backups |