From 879d7e20ebfd1acbe2e78e02c19f04dc8a371dfb Mon Sep 17 00:00:00 2001 From: "Victor M. Varela" Date: Fri, 1 May 2026 17:22:08 +0200 Subject: [PATCH] chore: remove redundant in-repo Nix and AUR packaging files - flake.nix, default.nix, packaging/nix/: duplicated exactly by vmvarela/nix-packages (canonical flake); CI already pushes versions.json only to the external repo, so local files would become stale on every release - packaging/aur/PKGBUILD, .SRCINFO: CI generates PKGBUILD inline via heredoc and pushes directly to AUR; static templates were already stale at v0.2.0 while AUR tracks v0.7.0 Closes #122 (cleanup follow-up) --- default.nix | 4 --- flake.nix | 33 --------------------- packaging/aur/.SRCINFO | 18 ------------ packaging/aur/PKGBUILD | 24 --------------- packaging/nix/package.nix | 58 ------------------------------------- packaging/nix/update.sh | 51 -------------------------------- packaging/nix/versions.json | 22 -------------- 7 files changed, 210 deletions(-) delete mode 100644 default.nix delete mode 100644 flake.nix delete mode 100644 packaging/aur/.SRCINFO delete mode 100644 packaging/aur/PKGBUILD delete mode 100644 packaging/nix/package.nix delete mode 100755 packaging/nix/update.sh delete mode 100644 packaging/nix/versions.json diff --git a/default.nix b/default.nix deleted file mode 100644 index fa3b121..0000000 --- a/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -# For nix-env, nix-build, and nix-shell compatibility (non-flake usage). -# Flake users: use `nix run`, `nix profile install`, or `nix shell` instead. -{ pkgs ? import { } }: -pkgs.callPackage ./packaging/nix/package.nix { } diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 5925133..0000000 --- a/flake.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - description = "sql-pipe — Read CSV from stdin, query with SQL, write CSV to stdout"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - - outputs = { self, nixpkgs }: - let - supportedSystems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - forAllSystems = nixpkgs.lib.genAttrs supportedSystems; - in - { - packages = forAllSystems (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - sql-pipe = pkgs.callPackage ./packaging/nix/package.nix { }; - default = self.packages.${system}.sql-pipe; - } - ); - - overlays.default = final: _prev: { - sql-pipe = final.callPackage ./packaging/nix/package.nix { }; - }; - }; -} diff --git a/packaging/aur/.SRCINFO b/packaging/aur/.SRCINFO deleted file mode 100644 index b8ccf3e..0000000 --- a/packaging/aur/.SRCINFO +++ /dev/null @@ -1,18 +0,0 @@ -pkgbase = sql-pipe - pkgdesc = Read CSV via stdin, run SQL, emit CSV via stdout - pkgver = 0.2.0 - pkgrel = 1 - url = https://github.com/vmvarela/sql-pipe - arch = x86_64 - arch = aarch64 - license = MIT - provides = sql-pipe - conflicts = sql-pipe - source = LICENSE::https://raw.githubusercontent.com/vmvarela/sql-pipe/v0.2.0/LICENSE - sha256sums = 3f3d9e0024b1921b067d6f7f88deb4a60cbe7a78e76c64e3f1d7fc3b779b9d04 - source_x86_64 = sql-pipe-0.2.0-x86_64::https://github.com/vmvarela/sql-pipe/releases/download/v0.2.0/sql-pipe-x86_64-linux - sha256sums_x86_64 = f3a3235e33aba0aa0c42741c0aa207738405a40ee88a52985d4280059c4989ff - source_aarch64 = sql-pipe-0.2.0-aarch64::https://github.com/vmvarela/sql-pipe/releases/download/v0.2.0/sql-pipe-aarch64-linux - sha256sums_aarch64 = f4acf74d56cf7f882c6eca1507ad2d30ff07ee81715b6d33f1c43ba074c42a96 - -pkgname = sql-pipe diff --git a/packaging/aur/PKGBUILD b/packaging/aur/PKGBUILD deleted file mode 100644 index 9c2b615..0000000 --- a/packaging/aur/PKGBUILD +++ /dev/null @@ -1,24 +0,0 @@ -# Maintainer: vmvarela -pkgname=sql-pipe -pkgver=0.2.0 -pkgrel=1 -pkgdesc="Read CSV via stdin, run SQL, emit CSV via stdout" -arch=('x86_64' 'aarch64') -url="https://github.com/vmvarela/sql-pipe" -license=('MIT') -provides=("${pkgname}") -conflicts=("${pkgname}") - -source=("LICENSE::https://raw.githubusercontent.com/vmvarela/sql-pipe/v${pkgver}/LICENSE") -sha256sums=('3f3d9e0024b1921b067d6f7f88deb4a60cbe7a78e76c64e3f1d7fc3b779b9d04') - -source_x86_64=("${pkgname}-${pkgver}-x86_64::https://github.com/vmvarela/sql-pipe/releases/download/v${pkgver}/sql-pipe-x86_64-linux") -sha256sums_x86_64=('f3a3235e33aba0aa0c42741c0aa207738405a40ee88a52985d4280059c4989ff') - -source_aarch64=("${pkgname}-${pkgver}-aarch64::https://github.com/vmvarela/sql-pipe/releases/download/v${pkgver}/sql-pipe-aarch64-linux") -sha256sums_aarch64=('f4acf74d56cf7f882c6eca1507ad2d30ff07ee81715b6d33f1c43ba074c42a96') - -package() { - install -Dm755 "${pkgname}-${pkgver}-${CARCH}" "${pkgdir}/usr/bin/${pkgname}" - install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" -} diff --git a/packaging/nix/package.nix b/packaging/nix/package.nix deleted file mode 100644 index b2ee80b..0000000 --- a/packaging/nix/package.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - stdenvNoCC, - fetchurl, - testers, -}: - -let - versions = lib.importJSON ./versions.json; - platformKey = stdenvNoCC.hostPlatform.system; - versionInfo = - versions.${platformKey} - or (throw "sql-pipe: unsupported platform '${platformKey}'"); -in - -stdenvNoCC.mkDerivation (finalAttrs: { - pname = "sql-pipe"; - inherit (versionInfo) version; - - src = fetchurl { - inherit (versionInfo) url sha256; - }; - - # The release assets are raw binaries (not archives) - dontUnpack = true; - dontConfigure = true; - dontBuild = true; - - # Linux binaries are statically linked via musl — no dynamic linker to - # patch, no libraries to strip. macOS binaries are self-contained. - dontStrip = true; - dontPatchELF = true; - dontFixup = stdenvNoCC.hostPlatform.isLinux; - - installPhase = '' - runHook preInstall - install -Dm755 $src $out/bin/sql-pipe - runHook postInstall - ''; - - passthru = { - updateScript = ./update.sh; - tests.version = testers.testVersion { - package = finalAttrs.finalPackage; - command = "sql-pipe --version"; - }; - }; - - meta = { - description = "Read CSV from stdin, query with SQL, write CSV to stdout"; - homepage = "https://github.com/vmvarela/sql-pipe"; - changelog = "https://github.com/vmvarela/sql-pipe/releases/tag/v${finalAttrs.version}"; - license = lib.licenses.mit; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - mainProgram = "sql-pipe"; - platforms = builtins.attrNames versions; - }; -}) diff --git a/packaging/nix/update.sh b/packaging/nix/update.sh deleted file mode 100755 index 39be1a1..0000000 --- a/packaging/nix/update.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl jq -# Regenerates versions.json with the latest sql-pipe release. -# Used by nixpkgs' r-ryantm bot via passthru.updateScript, and can -# also be run manually: ./update.sh - -set -euo pipefail -cd "$(dirname "${BASH_SOURCE[0]}")" - -REPO="vmvarela/sql-pipe" - -VERSION=$(curl -s "https://api.github.com/repos/${REPO}/releases/latest" \ - | jq -r '.tag_name | ltrimstr("v")') - -CHECKSUMS=$(curl -fsSL \ - "https://github.com/${REPO}/releases/download/v${VERSION}/sha256sums.txt") - -get_sha() { - echo "$CHECKSUMS" | awk -v asset="$1" '$2 == asset { print $1 }' -} - -jq -n \ - --arg ver "$VERSION" \ - --arg sha_x64_linux "$(get_sha sql-pipe-x86_64-linux)" \ - --arg sha_a64_linux "$(get_sha sql-pipe-aarch64-linux)" \ - --arg sha_x64_macos "$(get_sha sql-pipe-x86_64-macos)" \ - --arg sha_a64_macos "$(get_sha sql-pipe-aarch64-macos)" \ - '{ - "x86_64-linux": { - url: "https://github.com/vmvarela/sql-pipe/releases/download/v\($ver)/sql-pipe-x86_64-linux", - sha256: $sha_x64_linux, - version: $ver - }, - "aarch64-linux": { - url: "https://github.com/vmvarela/sql-pipe/releases/download/v\($ver)/sql-pipe-aarch64-linux", - sha256: $sha_a64_linux, - version: $ver - }, - "x86_64-darwin": { - url: "https://github.com/vmvarela/sql-pipe/releases/download/v\($ver)/sql-pipe-x86_64-macos", - sha256: $sha_x64_macos, - version: $ver - }, - "aarch64-darwin": { - url: "https://github.com/vmvarela/sql-pipe/releases/download/v\($ver)/sql-pipe-aarch64-macos", - sha256: $sha_a64_macos, - version: $ver - } - }' > versions.json - -echo "Updated versions.json to ${VERSION}" diff --git a/packaging/nix/versions.json b/packaging/nix/versions.json deleted file mode 100644 index 0f67cf9..0000000 --- a/packaging/nix/versions.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "x86_64-linux": { - "url": "https://github.com/vmvarela/sql-pipe/releases/download/v0.3.0/sql-pipe-x86_64-linux", - "sha256": "f2d8619561f0b0f946f1ef51d899eebf239548d5a2d88b70fffbd13d437175db", - "version": "0.3.0" - }, - "aarch64-linux": { - "url": "https://github.com/vmvarela/sql-pipe/releases/download/v0.3.0/sql-pipe-aarch64-linux", - "sha256": "c66c8743b00799d03eac462cb0c5d51c16e6c330bd8a3c8ebd20828a563ac541", - "version": "0.3.0" - }, - "x86_64-darwin": { - "url": "https://github.com/vmvarela/sql-pipe/releases/download/v0.3.0/sql-pipe-x86_64-macos", - "sha256": "9b95accb1256ce3e2d2da836a425ff57d6aae967e16488d152c089ae86c2883d", - "version": "0.3.0" - }, - "aarch64-darwin": { - "url": "https://github.com/vmvarela/sql-pipe/releases/download/v0.3.0/sql-pipe-aarch64-macos", - "sha256": "24f0f09aa20430c3fc5d5e0b2d6da15c098df5e70577f68bc62052c7dc56f660", - "version": "0.3.0" - } -}