diff --git a/pkgs/by-name/pr/proton-drive/package.nix b/pkgs/by-name/pr/proton-drive/package.nix new file mode 100644 index 0000000000000..05486c71ca491 --- /dev/null +++ b/pkgs/by-name/pr/proton-drive/package.nix @@ -0,0 +1,71 @@ +{ + lib, + stdenvNoCC, + _7zz, + common-updater-scripts, + curl, + fetchurl, + jq, + writeShellScript, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "proton-drive"; + version = "2.10.2"; + + src = finalAttrs.passthru.sources.${stdenvNoCC.hostPlatform.system}; + + sourceRoot = "."; + + strictDeps = true; + nativeBuildInputs = [ _7zz ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/Applications + cp -R "./Proton Drive.app" $out/Applications + + runHook postInstall + ''; + + passthru = { + sources = { + "aarch64-darwin" = fetchurl { + url = "https://proton.me/download/drive/macos/${finalAttrs.version}/ProtonDrive-${finalAttrs.version}.dmg"; + hash = "sha256-0rj2ZwMJ4aHmq6QU4+Kd3SIIgxASL6eBC06/c/iJ3/Q="; + }; + "x86_64-darwin" = finalAttrs.passthru.sources."aarch64-darwin"; + }; + updateScript = writeShellScript "update-proton-drive" '' + set -o errexit + export PATH="${ + lib.makeBinPath [ + curl + jq + common-updater-scripts + ] + }" + NEW_VERSION=$(curl --silent https://proton.me/download/drive/macos/version.json | jq -r '[.Releases[] | select(.CategoryName == "Stable")] | first | .Version') + if [[ "${finalAttrs.version}" = "$NEW_VERSION" ]]; then + echo "The new version is the same as the old version." + exit 0 + fi + for platform in ${lib.escapeShellArgs finalAttrs.meta.platforms}; do + update-source-version "proton-drive" "$NEW_VERSION" --ignore-same-version --source-key="sources.$platform" + done + ''; + }; + + meta = { + description = "Official ProtonDrive app for darwin"; + homepage = "https://proton.me/drive"; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [ delafthi ]; + platforms = [ + "x86_64-darwin" + "aarch64-darwin" + ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) diff --git a/pkgs/by-name/qu/QuadProgpp/package.nix b/pkgs/by-name/qu/QuadProgpp/package.nix deleted file mode 100644 index 50861e076df69..0000000000000 --- a/pkgs/by-name/qu/QuadProgpp/package.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, -}: - -stdenv.mkDerivation { - pname = "quadprogpp"; - version = "1.2.2-unstable-2025-12-03"; - - src = fetchFromGitHub { - owner = "liuq"; - repo = "QuadProgpp"; - rev = "0c25447365c980876fdc395f55d60300a5e5793c"; - hash = "sha256-yXKctOTBbUNiSM2j7hKfSvd1i7FH7kcgP990DXVkrRY="; - }; - - nativeBuildInputs = [ - cmake - ]; - - meta = { - description = "C++ library for Quadratic Programming"; - longDescription = '' - QuadProg++ is a C++ library for Quadratic Programming which implements - the Goldfarb-Idnani active-set dual method. - ''; - homepage = "https://github.com/liuq/QuadProgpp"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ wegank ]; - platforms = lib.platforms.all; - }; -} diff --git a/pkgs/by-name/un/unixODBC/package.nix b/pkgs/by-name/un/unixODBC/package.nix deleted file mode 100644 index 15393de858d5d..0000000000000 --- a/pkgs/by-name/un/unixODBC/package.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - lib, - stdenv, - fetchurl, -}: - -stdenv.mkDerivation rec { - pname = "unixODBC"; - version = "2.3.12"; - - src = fetchurl { - urls = [ - "ftp://ftp.unixodbc.org/pub/unixODBC/${pname}-${version}.tar.gz" - "https://www.unixodbc.org/${pname}-${version}.tar.gz" - ]; - sha256 = "sha256-8hBQFEXOIb9ge6Ue+MEl4Q4i3/3/7Dd2RkYt9fAZFew="; - }; - - configureFlags = [ - "--disable-gui" - "--sysconfdir=/etc" - ]; - - meta = { - description = "ODBC driver manager for Unix"; - homepage = "https://www.unixodbc.org/"; - license = lib.licenses.lgpl2; - platforms = lib.platforms.unix; - }; -} diff --git a/pkgs/by-name/xx/xxHash/package.nix b/pkgs/by-name/xx/xxHash/package.nix deleted file mode 100644 index bb6ef12918a2a..0000000000000 --- a/pkgs/by-name/xx/xxHash/package.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "xxHash"; - version = "0.8.3"; - - src = fetchFromGitHub { - owner = "Cyan4973"; - repo = "xxHash"; - rev = "v${finalAttrs.version}"; - hash = "sha256-h6kohM+NxvQ89R9NEXZcYBG2wPOuB4mcyPfofKrx9wQ="; - }; - - nativeBuildInputs = [ - cmake - ]; - - # Using unofficial CMake build script to install CMake module files. - cmakeDir = "../cmake_unofficial"; - - meta = { - description = "Extremely fast hash algorithm"; - longDescription = '' - xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. - It successfully completes the SMHasher test suite which evaluates - collision, dispersion and randomness qualities of hash functions. Code is - highly portable, and hashes are identical on all platforms (little / big - endian). - ''; - homepage = "https://github.com/Cyan4973/xxHash"; - license = with lib.licenses; [ - bsd2 - gpl2 - ]; - mainProgram = "xxhsum"; - maintainers = [ ]; - platforms = lib.platforms.all; - pkgConfigModules = [ - "libxxhash" - ]; - }; -})