all: purge a bunch of unused packages

This commit is contained in:
Aaron Bieber 2024-04-04 09:29:49 -06:00
parent 12ea25156e
commit 99b751f321
No known key found for this signature in database
28 changed files with 1 additions and 1350 deletions

View File

@ -314,29 +314,19 @@
spkgs = stablePkgsFor.${system};
in
{
ada_language_server =
spkgs.callPackage ./pkgs/ada_language_server.nix { inherit spkgs; };
alire = spkgs.callPackage ./pkgs/alire.nix { inherit spkgs; };
bearclaw = spkgs.callPackage ./pkgs/bearclaw.nix { inherit spkgs; };
rtlamr = spkgs.callPackage ./pkgs/rtlamr.nix { inherit spkgs; };
gqrss = spkgs.callPackage ./pkgs/gqrss.nix {
inherit spkgs;
isUnstable = true;
};
himitsu = upkgs.callPackage ./pkgs/himitsu.nix {
inherit upkgs;
};
icbirc = spkgs.callPackage ./pkgs/icbirc.nix {
inherit spkgs;
isUnstable = true;
};
femtolisp = upkgs.callPackage ./pkgs/femtolisp.nix { };
ttfs = upkgs.callPackage ./pkgs/ttfs.nix { };
fyne = upkgs.callPackage ./pkgs/fyne.nix { inherit upkgs; };
flake-warn =
spkgs.callPackage ./pkgs/flake-warn.nix { inherit spkgs; };
#kurinto = spkgs.callPackage ./pkgs/kurinto.nix {};
yaegi = spkgs.callPackage ./pkgs/yaegi.nix { inherit spkgs; };
gen-patches =
spkgs.callPackage ./bins/gen-patches.nix { inherit spkgs; };
yarr = spkgs.callPackage ./pkgs/yarr.nix {
@ -349,25 +339,10 @@
rtlamr2mqtt = spkgs.python3Packages.callPackage ./pkgs/rtlamr2mqtt.nix {
inherit spkgs;
};
kobuddy = upkgs.python3Packages.callPackage ./pkgs/kobuddy.nix {
inherit upkgs;
};
bandcamp-downloader = upkgs.python3Packages.callPackage ./pkgs/bandcamp-downloader.nix {
inherit upkgs;
};
ghexport = upkgs.python3Packages.callPackage ./pkgs/ghexport.nix {
inherit upkgs;
};
hpi =
upkgs.python3Packages.callPackage ./pkgs/hpi.nix { inherit upkgs; };
openevse =
upkgs.python312Packages.callPackage ./pkgs/openevse.nix { inherit upkgs; };
promnesia = upkgs.python3Packages.callPackage ./pkgs/promnesia.nix {
inherit upkgs;
};
sliding-sync =
spkgs.callPackage ./pkgs/sliding-sync.nix { inherit spkgs; };
golink = spkgs.callPackage ./pkgs/golink.nix { inherit spkgs; };
gokrazy = upkgs.callPackage ./pkgs/gokrazy.nix { inherit upkgs; };
gosignify = spkgs.callPackage ./pkgs/gosignify.nix { inherit spkgs; };
gotosocial =
@ -375,9 +350,6 @@
zutty = upkgs.callPackage ./pkgs/zutty.nix {
inherit upkgs;
};
mvoice = upkgs.callPackage ./pkgs/mvoice.nix {
inherit upkgs;
};
inherit (xintray.packages.${system}) xintray;
inherit (beyt.packages.${system}) beyt;
inherit (tsvnstat.packages.${system}) tsvnstat;

View File

@ -16,27 +16,7 @@ let
rpr =
pkgs.writeScriptBin "rpr"
(import ../bins/rpr.nix { inherit (pkgs) hut gh tea; });
promnesia =
pkgs.python3Packages.callPackage ../pkgs/promnesia.nix { inherit pkgs; };
hpi = pkgs.python3Packages.callPackage ../pkgs/hpi.nix { inherit pkgs; };
promnesiaService = {
promnesia = {
description = "Service for promnesia.server";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
script = ''
${promnesia}/bin/promnesia serve
'';
};
};
jobs = [
{
name = "promnesia-index";
script = "${promnesia}/bin/promnesia index";
startAt = "*:0/5";
path = [ promnesia hpi ];
}
];
fontSet = with pkgs; [
go-font
@ -116,11 +96,9 @@ with lib; {
exiftool
go-font
govulncheck
hpi
keepassxc
pcsctools
plan9port
promnesia
rage
rpr
traygent
@ -134,8 +112,7 @@ with lib; {
programs = { } // firefox.programs;
systemd.user.services =
(lib.listToAttrs (builtins.map xinlib.jobToUserService jobs))
// promnesiaService;
lib.listToAttrs (builtins.map xinlib.jobToUserService jobs);
security.rtkit.enable = true;
})
(mkIf config.pipewire.enable {

View File

@ -409,21 +409,7 @@ in
zig
(callPackage ../../pkgs/ttfs.nix { })
(callPackage ../../pkgs/kobuddy.nix {
inherit pkgs;
inherit
(pkgs.python39Packages)
buildPythonPackage
fetchPypi
setuptools-scm
pytz
banal
sqlalchemy
alembic
;
})
(callPackage ../../pkgs/gokrazy.nix { })
(callPackage ../../pkgs/mvoice.nix { })
(callPackage ../../pkgs/zutty.nix { })
restic

View File

@ -131,10 +131,6 @@ in
sopsFile = config.xin-secrets.h.secrets.services;
owner = config.users.users.tsvnstat.name;
};
#golink = {
# sopsFile = config.xin-secrets.h.secrets.services;
# owner = config.users.users.golink.name;
#};
gostart = {
sopsFile = config.xin-secrets.h.secrets.services;
owner = config.users.users.gostart.name;
@ -378,10 +374,6 @@ in
#registration = false;
listen = "127.0.0.1:8383";
};
#golink = {
# enable = true;
# envFile = "${config.sops.secrets.golink.path}";
#};
tsvnstat = {
enable = true;
#keyPath = "${config.sops.secrets.router_stats_ts_key.path}";

View File

@ -1,84 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, pkgs
, ...
}:
let
libadalang = stdenv.mkDerivation rec {
pname = "libadalang";
version = "22.0.0";
src = fetchFromGitHub {
owner = "AdaCore";
repo = pname;
rev = "v${version}";
sha256 = "sha256-/nInRma0OKmI6E8nPvQlIYStl0kcPfAudvzbEyO5jJM=";
};
buildInputs = with pkgs; [
gnat12
gprbuild
python3
gnatcoll-core
gnatcoll-iconv
gnatcoll-gmp
];
makeFlags = [ "PREFIX=$(out)" ];
};
vss = stdenv.mkDerivation rec {
pname = "vss";
version = "22.0.0";
src = fetchFromGitHub {
owner = "AdaCore";
repo = pname;
rev = "v${version}";
sha256 = "sha256-IDPcIJfavlqMsxLOGrvXYv98FdYVWkCiimLcMFp3ees=";
};
buildInputs = with pkgs; [ gnat12 gprbuild ];
makeFlags = [ "PREFIX=$(out)" ];
};
gnatdoc = stdenv.mkDerivation rec {
pname = "gnatdoc";
version = "2022-10-04";
src = fetchFromGitHub {
owner = "AdaCore";
repo = pname;
rev = "7cdc2eae12199bc74b84d5677288fbbd55f98c25";
sha256 = "sha256-kA5yOd3NDkRl08o38F5CyeFrihBZktNF6di3PC+/ZLU=";
};
buildInputs = with pkgs; [ gnat12 gprbuild libadalang ];
makeFlags = [ "PREFIX=$(out)" ];
};
in
stdenv.mkDerivation rec {
pname = "ada_language_server";
version = "23.0.10";
src = fetchFromGitHub {
owner = "AdaCore";
repo = pname;
rev = version;
sha256 = "sha256-ZUzym0aMjq14W9h/lDL5hVCF/i+1SFu6kccGqzmGO3E=";
};
buildInputs = with pkgs; [ gnat12 gprbuild python3 vss gnatdoc ];
meta = with lib; {
description = "Language server for Ada and SPARK";
longDescription = ''
Server implementing the Microsoft Language Protocol for Ada and SPARk
'';
homepage = "https://github.com/AdaCore/ada_language_server";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,36 +0,0 @@
{ stdenv
, lib
, fetchurl
, unzip
, autoPatchelfHook
, ...
}:
with lib;
stdenv.mkDerivation rec {
pname = "alire";
version = "1.2.1";
src = fetchurl {
url = "https://github.com/alire-project/alire/releases/download/v1.2.1/alr-1.2.1-bin-x86_64-linux.zip";
sha256 = "sha256-bN/H5CPN7uvUH9+p+y/sg01qTJI3asToxVSVnKVNHuM=";
};
nativeBuildInputs = [ unzip autoPatchelfHook ];
dontBuild = true;
doCheck = false;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -D alr $out/bin/
runHook postInstall
'';
meta = {
description = "ALIRE: Ada LIbrary REpository.";
homepage = "https://github.com/alire-project/alire";
license = licenses.gpl3;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,52 +0,0 @@
{ stdenv
, lib
, buildGoModule
, fetchFromGitHub
, isUnstable
, makeWrapper
, go
, git
, ...
}:
let
vendorHash =
if isUnstable
then ""
else "sha256-7CnkKMZ1so1lflmp4D9EAESR6/u9ys5CTuVOsYetp0I=";
in
with lib;
buildGoModule rec {
pname = "athens";
version = "0.11.0";
src = fetchFromGitHub {
owner = "gomods";
repo = pname;
rev = "v${version}";
sha256 = "sha256-hkewZ21ElkoDsbPPiCZNmWu4MBlKTlnrK72/xCX06Sk=";
};
doCheck = false;
ldflags = [ "-X github.com/gomods/athens/pkg/build.version=${version}" ];
nativeBuildInputs = lib.optionals stdenv.isLinux [ makeWrapper go ];
proxyVendor = true;
subPackages = [ "cmd/proxy" ];
inherit vendorHash;
postInstall = lib.optionalString stdenv.isLinux ''
mv $out/bin/proxy $out/bin/athens
wrapProgram $out/bin/athens --prefix PATH : ${lib.makeBinPath [git]}
'';
meta = {
description = "A Go module datastore and proxy";
homepage = "https://github.com/gomods/athens";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,81 +0,0 @@
{ lib
, beautifulsoup4
, browser-cookie3
, buildPythonPackage
, certifi
, charset-normalizer
, cryptography
, fetchFromGitHub
, idna
, importlib-metadata
, jaraco_classes
, jeepney
, keyring
, lz4
, more-itertools
, pbkdf2
, poetry-core
, pyaes
, pycparser
, pycryptodome
, requests
, secretstorage
, setuptools
, soupsieve
, tqdm
, urllib3
, zipp
, ...
}:
buildPythonPackage rec {
pname = "bandcamp-downloader";
version = "unstable-2023-09-22";
pyproject = true;
src = fetchFromGitHub {
owner = "easlice";
repo = pname;
rev = "871cedf285a8e8a60b156086ad3222ce49e90c7f";
hash = "sha256-hCQhzxuSqAQhEAmev+bTfMykFKaOItx/iLxaghLl79M=";
};
propagatedBuildInputs = [
beautifulsoup4
browser-cookie3
certifi
charset-normalizer
cryptography
idna
importlib-metadata
jaraco_classes
jeepney
keyring
lz4
more-itertools
pbkdf2
poetry-core
pyaes
pycparser
pycryptodome
requests
secretstorage
setuptools
soupsieve
tqdm
urllib3
zipp
];
#nativeBuildInputs = [ setuptools-scm ];
#doCheck = false;
#pythonImportsCheck = [ "dataset" ];
meta = with lib; {
description = "Download your bandcamp collection";
homepage = "https://github.com/easlice/bandcamp-downloader";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
mainProgram = "bandcamp-downloader.py";
};
}

View File

@ -1,26 +0,0 @@
{ lib
, buildGoModule
, fetchFromGitHub
, ...
}:
with lib;
buildGoModule rec {
pname = "bearclaw";
version = "1.1.0";
src = fetchFromGitHub {
owner = "donuts-are-good";
repo = pname;
rev = "${version}";
sha256 = "sha256-AhqW+AAEBbAPJO0hnZnC5a/u4IKyLII6OWYEQzoX0C8=";
};
vendorHash = "sha256-7XFvghT411YE+Y9bYEFOKR655EaFS4GZiDzUYiYRbMY=";
meta = {
description = "tiny static site generator";
homepage = "https://github.com/donuts-are-good/bearclaw";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,22 +0,0 @@
{ buildPythonPackage
, fetchPypi
, setuptools-scm
, appdirs
, sqlalchemy
, ...
}:
buildPythonPackage rec {
pname = "cachew";
version = "0.11.0";
nativeBuildInputs = [ setuptools-scm ];
doCheck = true;
propagatedBuildInputs = [ appdirs sqlalchemy ];
src = fetchPypi {
inherit pname version;
sha256 = "sha256-4qjgvffInKRpKST9xbwwC2+m8h3ups0ZePyJLUU+KhA=";
};
}

View File

@ -1,59 +0,0 @@
{ fetchurl
, appimageTools
, desktop-file-utils
, ...
}:
let
name = "cinny-desktop";
version = "2.0.4";
src = fetchurl {
name = "cinny_${version}_amd64.AppImage";
url = "https://github.com/cinnyapp/cinny-desktop/releases/download/v${version}/cinny_${version}_amd64.AppImage";
sha256 = "sha256-9ZQyVcTsHja67DhuIyniTK/xr0C6qN7fiCmjt8enUd8=";
};
appimageContents = appimageTools.extract { inherit name src; };
in
appimageTools.wrapType2 rec {
inherit name src;
extraInstallCommands = ''
cp -r ${appimageContents}/* $out
cd $out
chmod -R +w $out
${desktop-file-utils}/bin/desktop-file-install --dir $out/share/applications \
--set-key Exec --set-value ${name} "cinny.desktop"
mv usr/bin/cinny $out/${name}
#mv usr/share share
rm -rf usr/lib/* AppRun* *.desktop
'';
extraPkgs = pkgs:
with pkgs; [
atk
avahi
brotli
cairo
fontconfig
freetype
fribidi
glew-egl
gobject-introspection
gst_all_1.gstreamer
harfbuzz
icu
libdrm
libGLU
libgpg-error
librsvg
libthai
pango
xorg.libX11
xorg.libxcb
zlib
];
}

View File

@ -1,28 +0,0 @@
{ lib
, buildGoModule
, fetchgit
, ...
}:
buildGoModule rec {
pname = "clilol";
version = "1.0.4";
src = fetchgit {
url = "https://git.mcornick.dev/mcornick/clilol.git";
rev = "v${version}";
hash = "sha256-VlL5prd021JrOf33jUdqORk9MxpyRQHNMpqDoSLLYi8=";
};
vendorHash = "sha256-i4UG52Z1zTM4VHBaNf5IYfQKnpC5iZTkK6L5hyQ6f4s=";
# attempts to make calls to api.omg.lol
doCheck = false;
meta = with lib; {
description = "a CLI for omg.lol";
homepage = "https://mcornick.dev/clilol/";
changelog = "https://git.mcornick.dev/mcornick/clilol/releases/tag/${version}";
license = licenses.mpl20;
maintainers = [ maintainers.qbit ];
};
}

View File

@ -1,31 +0,0 @@
{ stdenv
, lib
, fetchgit
, gnumake
,
}:
stdenv.mkDerivation {
pname = "femtolisp";
version = "2023-03-27";
src = fetchgit {
url = "https://git.sr.ht/~ft/femtolisp";
rev = "52b98fac634a4bdd7cbc0154dcfad639013ed198";
hash = "sha256-mh7upbCmWXLhudtaaebBf1XTIv4nYPSh0OAJDOqaQnk=";
};
buildInputs = [ gnumake ];
installPhase = ''
mkdir -p $out/bin
cp flisp $out/bin
'';
meta = {
description = "A compact interpreter for a minimal lisp/scheme dialect.";
homepage = "https://git.sr.ht/~ft/femtolisp";
license = lib.licenses.bsd3;
maintainer = with lib.maintainers; [ qbit ];
mainProgram = "flisp";
};
}

View File

@ -1,30 +0,0 @@
{ lib
, buildGoModule
, fetchFromGitHub
, ...
}:
with lib;
buildGoModule rec {
pname = "fyne";
version = "2.3.5";
src = fetchFromGitHub {
owner = "fyne-io";
repo = pname;
rev = "v${version}";
sha256 = "sha256-iSQ1oqUePxDyjQTKNazX0IZyHAoz50bqukV2CmQjrAk=";
};
vendorHash = null;
proxyVendor = true;
subPackages = [ "cmd/fyne" ];
meta = {
description = "Fyne command line tool";
homepage = "https://github.com/fyne-io/fyne";
license = licenses.bsd3;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,31 +0,0 @@
{ buildPythonPackage
, setuptools-scm
, fetchFromGitHub
, PyGithub
, pytz
, ...
}:
buildPythonPackage rec {
pname = "ghexport";
version = "20220828";
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ PyGithub pytz ];
doCheck = true;
buildInputs = [ ];
preCheck = ''
export HOME=$(mktemp -d)
'';
SETUPTOOLS_SCM_PRETEND_VERSION = version;
src = fetchFromGitHub {
owner = "karlicoss";
repo = pname;
rev = "e7704dc5b984731a53e74cbcadcbc3dd9c3024cd";
hash = "sha256-m/iqeBvCXHlN7GsNW6A2AX1g+ZaH3W62+Ulcfgup0KQ=";
};
}

View File

@ -1,28 +0,0 @@
{ lib
, buildGoModule
, fetchFromGitHub
, ...
}:
with lib;
buildGoModule rec {
pname = "golink";
version = "0.0.0";
src = fetchFromGitHub {
owner = "tailscale";
repo = pname;
rev = "cada6f65af471470f85092a7152023e956ce0fb4";
sha256 = "sha256-YApJezFbihypIZx8UHqqhXQ/fw1Zz/XL6P6Z3gTFtrA=";
};
vendorHash = "sha256-0k+1G+ox9+NZI4GaHm2Ba2Q4Eybz20gTAPnGKkU5Iec=";
proxyVendor = true;
meta = {
description = "A private shortlink service for tailnets";
homepage = "https://github.com/tailscale/golink";
license = licenses.bsd3;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,181 +0,0 @@
{ lib
, stdenv
, fetchgit
, fetchFromSourcehut
, binutils-unwrapped
, makeWrapper
#, qbe # We use harec's override of qbe until 1.2 is released
, qbe
, scdoc
, ...
}:
let
qbe' = qbe.overrideAttrs (_old: {
version = "1.1-unstable-2023-08-18";
src = fetchgit {
url = "git://c9x.me/qbe.git";
rev = "36946a5142c40b733d25ea5ca469f7949ee03439";
hash = "sha256-bqxWFP3/aw7kRoD6ictbFcjzijktHvh4AgWAXBIODW8=";
};
});
harec' = stdenv.mkDerivation (_: {
pname = "harec";
version = "unstable-2023-10-22";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "harec";
rev = "64dea196ce040fbf3417e1b4fb11331688672aca";
hash = "sha256-2Aeb+OZ/hYUyyxx6aTw+Oxiac+p+SClxtg0h68ZBSHc=";
};
nativeBuildInputs = [
qbe'
];
buildInputs = [
qbe'
];
strictDeps = true;
enableParallelBuilding = true;
doCheck = true;
passthru = {
# We create this attribute so that the `hare` package can access the
# overwritten `qbe`.
qbeUnstable = qbe';
};
meta = {
homepage = "http://harelang.org/";
description = "Bootstrapping Hare compiler written in C for POSIX systems";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ onemoresuza ];
# The upstream developers do not like proprietary operating systems; see
# https://harelang.org/platforms/
# UPDATE: https://github.com/hshq/harelang provides a MacOS port
platforms = with lib.platforms;
lib.intersectLists (freebsd ++ linux) (aarch64 ++ x86_64 ++ riscv64);
badPlatforms = lib.platforms.darwin;
};
});
hare' = stdenv.mkDerivation (_: {
pname = "hare";
version = "unstable-2023-10-23";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "hare";
rev = "1048620a7a25134db370bf24736efff1ffcb2483";
hash = "sha256-slQPIhrcM+KAVAvjuRnqNdEAEr4Xa4iQNVEpI7Wl+Ks=";
};
nativeBuildInputs = [
binutils-unwrapped
harec'
makeWrapper
qbe'
scdoc
];
buildInputs = [
binutils-unwrapped
harec'
qbe'
];
strictDeps = true;
enableParallelBuilding = true;
# Append the distribution name to the version
env.LOCALVER = "nix";
configurePhase =
let
# https://harelang.org/platforms/
arch =
if stdenv.isx86_64 then "x86_64"
else if stdenv.isAarch64 then "aarch64"
else if stdenv.hostPlatform.isRiscV && stdenv.is64bit then "riscv64"
else "unsupported";
platform =
if stdenv.isLinux then "linux"
else if stdenv.isFreeBSD then "freebsd"
else "unsupported";
in
''
runHook preConfigure
cp config.example.mk config.mk
makeFlagsArray+=(
PREFIX="${builtins.placeholder "out"}"
HARECACHE="$(mktemp -d --tmpdir harecache.XXXXXXXX)"
BINOUT="$(mktemp -d --tmpdir bin.XXXXXXXX)"
PLATFORM="${platform}"
ARCH="${arch}"
)
runHook postConfigure
'';
doCheck = true;
postFixup =
let
binPath = lib.makeBinPath [
binutils-unwrapped
harec'
qbe'
];
in
''
wrapProgram $out/bin/hare --prefix PATH : ${binPath}
'';
setupHook = ./setup-hook.sh;
meta = {
homepage = "http://harelang.org/";
description =
"A systems programming language designed to be simple, stable, and robust";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ onemoresuza ];
inherit (harec'.meta) platforms badPlatforms;
};
});
in
stdenv.mkDerivation rec {
pname = "himitsu";
version = "0.4";
src = fetchFromSourcehut {
name = pname + "-src";
owner = "~sircmpwn";
repo = pname;
rev = version;
hash = "sha256-Y2QSzYfG1F9Z8MjeVvQ3+Snff+nqSjeK6VNzRaRDLYo=";
};
nativeBuildInputs = [
hare'
scdoc
];
preConfigure = ''
export HARECACHE=$(mktemp -d)
'';
installFlags = [ "PREFIX=" "DESTDIR=$(out)" ];
meta = with lib; {
homepage = "https://himitsustore.org/";
description = "A secret storage manager";
license = licenses.gpl3Only;
maintainers = with maintainers; [ auchter ];
inherit (hare'.meta) platforms badPlatforms;
};
}

View File

@ -1,67 +0,0 @@
{ pkgs
, buildPythonPackage
, setuptools-scm
, pytest
, fetchPypi
, appdirs
, click
, decorator
, geopy
, logzero
, lxml
, more-itertools
, mypy
, orjson
, pandas
, pytz
, simplejson
, ...
}:
with pkgs; let
orgparse = pkgs.python3Packages.callPackage ./orgparse.nix { inherit pkgs; };
kobuddy = pkgs.python3Packages.callPackage ./kobuddy.nix { inherit pkgs; };
ghexport = pkgs.python3Packages.callPackage ./ghexport.nix { inherit pkgs; };
in
buildPythonPackage rec {
pname = "HPI";
version = "0.3.20230207";
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
appdirs
click
decorator
geopy
kobuddy
logzero
lxml
ghexport
more-itertools
mypy
orgparse
orjson
pandas
pytest
pytz
simplejson
];
doCheck = true;
buildInputs = [ mypy kobuddy ];
makeWrapperArgs = [
# Add the installed directories to the python path so the daemon can find them
"--prefix PYTHONPATH : ${python3.pkgs.makePythonPath propagatedBuildInputs}"
"--prefix PYTHONPATH : $out/lib/${python3.libPrefix}/site-packages"
];
preCheck = ''
export HOME=$(mktemp -d)
'';
src = fetchPypi {
inherit pname version;
sha256 = "sha256-i3C1Lmj6K48zVG960uv1epQm38qQnxalwy8kHnLTZrE=";
};
}

View File

@ -1,25 +0,0 @@
{ lib
, rustPlatform
, fetchFromGitHub
,
}:
rustPlatform.buildRustPackage rec {
pname = "iamb";
version = "2023-03-09";
src = fetchFromGitHub {
owner = "ulyssa";
repo = pname;
rev = "066f60ad321eb7d16a9535744ec0193b36468c37";
hash = "sha256-IX28ZquUqt7GOTPWX9XgEZGbx7vWLrRS6jn5Y9smE1k=";
};
cargoHash = "sha256-5ujLOmtb9fZ4YhfA/OKHFxLWfcKBERndFMj7BbdTJZ4=";
meta = with lib; {
description = "A Matrix client for Vim addicts";
homepage = "https://github.com/ulyssa/iamb";
license = licenses.asl20;
maintainers = [ maintainers.qbit ];
};
}

View File

@ -1,183 +0,0 @@
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 68bf5db..92d375e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -42,6 +42,9 @@ jobs:
run: |
sudo apt-get -qq update
pip install -e ".[dev]"
+
+ - uses: mxschmitt/action-tmate@v3
+
- name: Run SQLite tests
env:
DATABASE_URL: "sqlite:///:memory:"
diff --git a/dataset/database.py b/dataset/database.py
index d8a07ad..4bc31fd 100644
--- a/dataset/database.py
+++ b/dataset/database.py
@@ -106,7 +106,7 @@ class Database(object):
@property
def metadata(self):
"""Return a SQLAlchemy schema cache object."""
- return MetaData(schema=self.schema, bind=self.executable)
+ return MetaData(schema=self.schema)
@property
def in_transaction(self):
@@ -127,6 +127,8 @@ class Database(object):
"""
if not hasattr(self.local, "tx"):
self.local.tx = []
+ if self.executable.in_transaction():
+ self.executable.commit()
self.local.tx.append(self.executable.begin())
def commit(self):
diff --git a/dataset/table.py b/dataset/table.py
index 08b806b..2f27060 100644
--- a/dataset/table.py
+++ b/dataset/table.py
@@ -116,7 +116,12 @@ class Table(object):
Returns the inserted row's primary key.
"""
row = self._sync_columns(row, ensure, types=types)
- res = self.db.executable.execute(self.table.insert(row))
+ res = self.db.executable.execute(self.table.insert(), row)
+ # SQLAlchemy 2.0.0b1 removes auto commit
+ if hasattr(self.db.local, "tx") and self.db.local.tx:
+ pass
+ else:
+ self.db.executable.commit()
if len(res.inserted_primary_key) > 0:
return res.inserted_primary_key[0]
return True
@@ -181,7 +186,8 @@ class Table(object):
# Insert when chunk_size is fulfilled or this is the last row
if len(chunk) == chunk_size or index == len(rows) - 1:
chunk = pad_chunk_columns(chunk, columns)
- self.table.insert().execute(chunk)
+ with self.db.engine.begin() as conn:
+ conn.execute(self.table.insert(), chunk)
chunk = []
def update(self, row, keys, ensure=None, types=None, return_count=False):
@@ -206,7 +212,7 @@ class Table(object):
clause = self._args_to_clause(args)
if not len(row):
return self.count(clause)
- stmt = self.table.update(whereclause=clause, values=row)
+ stmt = self.table.update().where(clause).values(row)
rp = self.db.executable.execute(stmt)
if rp.supports_sane_rowcount():
return rp.rowcount
@@ -241,10 +247,9 @@ class Table(object):
# Update when chunk_size is fulfilled or this is the last row
if len(chunk) == chunk_size or index == len(rows) - 1:
cl = [self.table.c[k] == bindparam("_%s" % k) for k in keys]
- stmt = self.table.update(
- whereclause=and_(True, *cl),
- values={col: bindparam(col, required=False) for col in columns},
- )
+ stmt = self.table.update()\
+ .where(and_(True, *cl))\
+ .values({col: bindparam(col, required=False) for col in columns})
self.db.executable.execute(stmt, chunk)
chunk = []
@@ -293,7 +298,7 @@ class Table(object):
if not self.exists:
return False
clause = self._args_to_clause(filters, clauses=clauses)
- stmt = self.table.delete(whereclause=clause)
+ stmt = self.table.delete().where(clause)
rp = self.db.executable.execute(stmt)
return rp.rowcount > 0
@@ -303,7 +308,7 @@ class Table(object):
self._columns = None
try:
self._table = SQLATable(
- self.name, self.db.metadata, schema=self.db.schema, autoload=True
+ self.name, self.db.metadata, schema=self.db.schema, autoload_with=self.db.engine,
)
except NoSuchTableError:
self._table = None
@@ -625,7 +630,7 @@ class Table(object):
order_by = self._args_to_order_by(order_by)
args = self._args_to_clause(kwargs, clauses=_clauses)
- query = self.table.select(whereclause=args, limit=_limit, offset=_offset)
+ query = self.table.select().where(args).limit(_limit).offset(_offset)
if len(order_by):
query = query.order_by(*order_by)
@@ -666,7 +671,7 @@ class Table(object):
return 0
args = self._args_to_clause(kwargs, clauses=_clauses)
- query = select([func.count()], whereclause=args)
+ query = select(func.count()).where(args)
query = query.select_from(self.table)
rp = self.db.executable.execute(query)
return rp.fetchone()[0]
@@ -703,12 +708,10 @@ class Table(object):
if not len(columns):
return iter([])
- q = expression.select(
- columns,
- distinct=True,
- whereclause=clause,
- order_by=[c.asc() for c in columns],
- )
+ q = expression.select(*columns)\
+ .distinct(True)\
+ .where(clause)\
+ .order_by(*(c.asc() for c in columns))
return self.db.query(q)
# Legacy methods for running find queries.
diff --git a/setup.py b/setup.py
index 0691373..fb794a4 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,6 @@ setup(
include_package_data=False,
zip_safe=False,
install_requires=[
- "sqlalchemy >= 1.3.2, < 2.0.0",
"alembic >= 0.6.2",
"banal >= 1.0.1",
],
diff --git a/test/test_dataset.py b/test/test_dataset.py
index f7c94eb..5861fbc 100644
--- a/test/test_dataset.py
+++ b/test/test_dataset.py
@@ -14,7 +14,10 @@ class DatabaseTestCase(unittest.TestCase):
def setUp(self):
self.db = connect()
self.tbl = self.db["weather"]
+ assert not self.db.has_table("weather")
self.tbl.insert_many(TEST_DATA)
+ # table is only created after insert statement
+ assert self.db.has_table("weather")
def tearDown(self):
for table in self.db.tables:
@@ -83,7 +86,6 @@ class DatabaseTestCase(unittest.TestCase):
def test_create_table_shorthand1(self):
pid = "int_id"
table = self.db.get_table("foo5", pid)
- assert table.table.exists
assert len(table.table.columns) == 1, table.table.columns
assert pid in table.table.c, table.table.c
@@ -98,7 +100,6 @@ class DatabaseTestCase(unittest.TestCase):
table = self.db.get_table(
"foo6", primary_id=pid, primary_type=self.db.types.string(255)
)
- assert table.table.exists
assert len(table.table.columns) == 1, table.table.columns
assert pid in table.table.c, table.table.c

View File

@ -1,63 +0,0 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, fetchPypi
, setuptools-scm
, pytz
, alembic
, banal
, sqlalchemy
, ...
}:
let
myDataset = buildPythonPackage rec {
pname = "dataset";
version = "1.6.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "pudo";
repo = pname;
rev = "0757b5010b600a66ed07fbb06a0e86c7bb0e09bc";
hash = "sha256-BfIGQvXKlsydV3p93/qLYtbVujTNWqWfMg16/aENHks=";
};
patches = [ ./kobuddy.diff ];
propagatedBuildInputs = [ alembic banal sqlalchemy ];
# checks attempt to import nonexistent module 'test.test' and fail
doCheck = false;
pythonImportsCheck = [ "dataset" ];
meta = with lib; {
description = "Toolkit for Python-based database access";
homepage = "https://dataset.readthedocs.io";
license = licenses.mit;
maintainers = with maintainers; [ xfnw ];
};
};
in
buildPythonPackage rec {
pname = "kobuddy";
version = "0.2.20221023";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-2Al1aDx9ymr0Pw+HC2S6mXkKvsDLhM1Oto+urr9i7BY=";
};
doCheck = true;
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ myDataset pytz ];
meta = with lib; {
homepage = "https://github.com/karlicoss/promnesia";
description = "Another piece of your extended mind";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,22 +0,0 @@
{ buildPythonPackage
, setuptools-scm
, pytest
, fetchPypi
, ...
}:
buildPythonPackage rec {
pname = "orgparse";
version = "0.3.2";
nativeBuildInputs = [ setuptools-scm ];
#propagatedBuildInputs = [ ];
nativeCheckInputs = [ pytest ];
doCheck = true;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-RRBQ55rLelHGXcmbkJXq5NUL1ZhUE1T552PLTL31mlU=";
};
}

View File

@ -1,91 +0,0 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, beautifulsoup4
, fastapi
, httptools
, logzero
, lxml
, mistletoe
, more-itertools
, mypy
, pytz
, setuptools
, tzlocal
, urlextract
, uvicorn
, uvloop
, watchfiles
, websockets
, setuptools-scm
, starlette
, pkgs
, ...
}:
with pkgs; let
hpi = pkgs.python3Packages.callPackage ./hpi.nix { inherit pkgs; };
sqlcipher3 =
pkgs.python3Packages.callPackage ./sqlcipher3.nix { inherit pkgs; };
cachew = pkgs.python3Packages.callPackage ./cachew.nix { inherit pkgs; };
python-dotenv = pkgs.python3Packages.callPackage ./python-dotenv.nix { };
in
buildPythonPackage rec {
pname = "promnesia";
version = "1.1.20231016";
pyproject = true;
src = fetchFromGitHub {
owner = "karlicoss";
repo = pname;
rev = "9ff734e6fde9ee42f9e8f895d1de54ee02e95d78";
hash = "sha256-TmLyHqa25I6NoTPsmd1AesYdxc8hmGPHdiMuFfw78uQ=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
doCheck = true;
nativeBuildInputs = [
setuptools-scm
];
# Optional
# bs4 lxml mistletoe logzero
propagatedBuildInputs = [
beautifulsoup4
cachew
fastapi
hpi
httptools
starlette
logzero
lxml
mistletoe
more-itertools
mypy
python-dotenv
pytz
setuptools
sqlcipher3
tzlocal
urlextract
uvicorn
uvloop
watchfiles
websockets
];
makeWrapperArgs = [
# Add the installed directories to the python path so the daemon can find them
"--prefix PYTHONPATH : ${python3.pkgs.makePythonPath propagatedBuildInputs}"
"--prefix PYTHONPATH : $out/lib/${python3.libPrefix}/site-packages"
];
meta = with lib; {
homepage = "https://github.com/karlicoss/promnesia";
description = "Another piece of your extended mind";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
};
}

View File

@ -1,36 +0,0 @@
{ lib
, buildPythonPackage
, click
, fetchPypi
, ipython
, mock
, pytestCheckHook
, pythonOlder
, sh
,
}:
buildPythonPackage rec {
pname = "python-dotenv";
version = "0.21.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-t30IJ0Y549NBRd+mxwCOZt8PBLe+enX9DVKSwZHXkEU=";
};
propagatedBuildInputs = [ click ];
nativeCheckInputs = [ ipython mock pytestCheckHook sh ];
disabledTests = [ "cli" ];
pythonImportsCheck = [ "dotenv" ];
meta = with lib; {
description = "Add .env support to your django/flask apps in development and deployments";
homepage = "https://github.com/theskumar/python-dotenv";
license = licenses.bsdOriginal;
maintainers = with maintainers; [ erikarvstedt ];
};
}

View File

@ -1,9 +0,0 @@
addHarepath() {
for haredir in third-party stdlib; do
if [[ -d "$1/src/hare/$haredir" ]]; then
addToSearchPath HAREPATH "$1/src/hare/$haredir"
fi
done
}
addEnvHooks "$hostOffset" addHarepath

View File

@ -1,20 +0,0 @@
{ buildPythonPackage
, setuptools-scm
, sqlcipher
, fetchPypi
, ...
}:
buildPythonPackage rec {
pname = "sqlcipher3";
version = "0.5.0";
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ sqlcipher ];
doCheck = true;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-+wa7UzaCWvIE6Obb/Ihema8UnFPr2P+HeDe1R4+iU+U=";
};
}

View File

@ -1,45 +0,0 @@
{ lib
, mkDerivation
, fetchFromGitHub
, kcoreaddons
, kwindowsystem
, plasma-framework
, systemsettings
,
}:
mkDerivation rec {
pname = "tile-gaps";
version = "8.0";
src = fetchFromGitHub {
owner = "nclarius";
repo = "tile-gaps";
rev = "window-gaps_v${version}";
sha256 = "sha256-IqmRazguCLSBe27Sy94gABCL+9lJFhFRYe1SPLF8jT8=";
};
buildInputs = [ kcoreaddons kwindowsystem plasma-framework systemsettings ];
dontBuild = true;
# 1. --global still installs to $HOME/.local/share so we use --packageroot
# 2. plasmapkg2 doesn't copy metadata.desktop into place, so we do that manually
installPhase = ''
runHook preInstall
plasmapkg2 --type kwinscript --install ${src} --packageroot $out/share/kwin/scripts
install -Dm644 ${src}/metadata.desktop $out/share/kservices5/tilegaps.desktop
runHook postInstall
'';
meta = with lib; {
description = ''
KWin script to add space around windows touching a screen edge or other window
'';
license = licenses.gpl3;
maintainers = with maintainers; [ qbit ];
inherit (src.meta) homepage;
inherit (kwindowsystem.meta) platforms;
};
}

View File

@ -1,26 +0,0 @@
{ lib
, buildGoModule
, fetchFromGitHub
, ...
}:
with lib;
buildGoModule rec {
pname = "yaegi";
version = "0.15.0";
src = fetchFromGitHub {
owner = "traefik";
repo = pname;
rev = "v${version}";
sha256 = "sha256-++WA6Xdo9YuMQgCL/c485LgKeV4XeodVZBBYCBsmh+M=";
};
vendorHash = null;
meta = {
description = "Yaegi is Another Elegant Go Interpreter";
homepage = "https://github.com/traefik/yaegi";
license = licenses.asl20;
maintainers = with maintainers; [ qbit ];
};
}