summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-02-22 08:13:08 +0700
committerpolwex <polwex@sortug.com>2025-02-22 08:13:08 +0700
commit3af8fa41d6299c6b88038911cc091a152f189e12 (patch)
tree069a820cecdc07b71090dbc4a901761286c9aac0
parent73b7d2b9fcd3e1692823655f2b4bf23201e0ae1b (diff)
yek
-rw-r--r--derivations/windsurf/default.nix2
-rw-r--r--derivations/yek/flake.lock27
-rw-r--r--derivations/yek/flake.nix19
-rw-r--r--derivations/yek/package.nix57
-rw-r--r--flake.lock42
-rw-r--r--flake.nix4
-rw-r--r--hosts/pkgs.nix3
7 files changed, 140 insertions, 14 deletions
diff --git a/derivations/windsurf/default.nix b/derivations/windsurf/default.nix
index 9dc7cec..5ad4b71 100644
--- a/derivations/windsurf/default.nix
+++ b/derivations/windsurf/default.nix
@@ -10,7 +10,7 @@
}:
# https://windsurf-stable.codeium.com/api/update/linux-x64/stable/latest
let
- version = "1.2.2"; # "windsurfVersion"
+ version = "1.3.4";
hash = "c418a14b63f051e96dafb37fe06f1fe0b10ba3c8"; # "version"
in
callPackage "${nixpkgs}/pkgs/applications/editors/vscode/generic.nix" rec {
diff --git a/derivations/yek/flake.lock b/derivations/yek/flake.lock
new file mode 100644
index 0000000..bad2016
--- /dev/null
+++ b/derivations/yek/flake.lock
@@ -0,0 +1,27 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1739866667,
+ "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/derivations/yek/flake.nix b/derivations/yek/flake.nix
new file mode 100644
index 0000000..904d54f
--- /dev/null
+++ b/derivations/yek/flake.nix
@@ -0,0 +1,19 @@
+{
+ description = "yek flake";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ };
+
+ outputs = {
+ self,
+ nixpkgs,
+ }: let
+ system = "x86_64-linux";
+ pkgs = nixpkgs.legacyPackages.${system};
+ in {
+ packages.${system}.default = pkgs.callPackage ./package.nix {
+ inherit (pkgs) lib;
+ };
+ };
+}
diff --git a/derivations/yek/package.nix b/derivations/yek/package.nix
new file mode 100644
index 0000000..c8ddaf6
--- /dev/null
+++ b/derivations/yek/package.nix
@@ -0,0 +1,57 @@
+{
+ lib,
+ fetchFromGitHub,
+ rustPlatform,
+ pkg-config,
+ openssl,
+ nixpkgs,
+ nix-update-script,
+ versionCheckHook,
+}: let
+ version = "0.16.0";
+in
+ rustPlatform.buildRustPackage {
+ pname = "yek";
+ version = version;
+
+ src = fetchFromGitHub {
+ owner = "bodo-run";
+ repo = "yek";
+ tag = "v${version}";
+ hash = "sha256-dboKZuY6mlFZu/xCoLXFJ4ARXyYs5/yOYeGkAnUKRX4=";
+ };
+ useFetchCargoVendor = true;
+ cargoHash = "sha256-/J+11PRCWn0rzq3nILJYd3V8cxmwDegArUDp8i5rsTY=";
+
+ nativeBuildInputs = [pkg-config];
+ buildInputs = [openssl];
+
+ env.OPENSSL_NO_VENDOR = 1;
+
+ checkFlags = [
+ # Tests with git fail
+ "--skip=e2e_tests::test_git_boost_config"
+ "--skip=e2e_tests::test_git_integration"
+ "--skip=lib_tests::test_serialize_repo_with_git"
+ "--skip=priority_tests::test_get_recent_commit_times_empty_repo"
+ "--skip=priority_tests::test_get_recent_commit_times_with_git"
+ "--skip=priority_tests::test_get_recent_commit_times_git_failure"
+ ];
+
+ nativeInstallCheckInputs = [versionCheckHook];
+ versionCheckProgramArg = "--version";
+ doInstallCheck = true;
+ passthru.updateScript = nix-update-script {};
+
+ meta = {
+ description = "Serialize text files for LLM consumption";
+ longDescription = ''
+ Tool to read text-based files, chunk them, and serialize them for LLM consumption.
+ '';
+ homepage = "https://github.com/bodo-run/yek";
+ changelog = "https://github.com/bodo-run/yek/releases/tag/v${version}";
+ license = lib.licenses.mit;
+ mainProgram = "yek";
+ maintainers = with lib.maintainers; [louis-thevenet];
+ };
+ }
diff --git a/flake.lock b/flake.lock
index 119440f..a0c08a4 100644
--- a/flake.lock
+++ b/flake.lock
@@ -740,11 +740,11 @@
"nixpkgs": "nixpkgs_7"
},
"locked": {
- "lastModified": 1740102075,
- "narHash": "sha256-4ZFfFwcPTWVVxZKcfouAVx8eDBDTaHUSySHJCe+xQus=",
+ "lastModified": 1740162289,
+ "narHash": "sha256-jYhBd5VR2BKo75qDUQaWrhHVC5GJPJraTbGJVVQkfgM=",
"owner": "fufexan",
"repo": "nix-gaming",
- "rev": "e319f4c8f0082f2b69cf7580b41cf577211f3742",
+ "rev": "8172a58da94446a15ad5801a6d091a8d13f88e6c",
"type": "github"
},
"original": {
@@ -1073,11 +1073,11 @@
]
},
"locked": {
- "lastModified": 1740103589,
- "narHash": "sha256-i79q3sG+2ArHhp/e3ipbUFMd4w7JD39sllRI/fjwCac=",
+ "lastModified": 1740142881,
+ "narHash": "sha256-tJHzZd5T2YJ7P70wy1bda++Sax9edT/3Onv7x+lLAlY=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
- "rev": "127a41eaf7e8e55f592225bda7230b05bb2dd2c1",
+ "rev": "cd1e927d3e66c3af30e860a006da744bba2c7cad",
"type": "github"
},
"original": {
@@ -1283,11 +1283,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1740129850,
- "narHash": "sha256-dn7INoviCjX6mhHErHJ9IGQsJY26muWGZEdwiZacBuc=",
+ "lastModified": 1740186587,
+ "narHash": "sha256-kPaYbFAZYo4QAiDLAD+5YKw9FNBntxojgWS5TOY11Ls=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "883d1900bad792b7e9c6717cd5e7be92b19a7d3f",
+ "rev": "93be748a381ae0c5e97b64ffe9bafaa77312a974",
"type": "github"
},
"original": {
@@ -1403,7 +1403,8 @@
"polybar-themes": "polybar-themes",
"waybar": "waybar",
"windsurf": "windsurf",
- "wrapper-manager": "wrapper-manager"
+ "wrapper-manager": "wrapper-manager",
+ "yek": "yek"
}
},
"rust-overlay": {
@@ -1639,8 +1640,8 @@
]
},
"locked": {
- "lastModified": 1740128387,
- "narHash": "sha256-7nSTttkAXUSMi3onSp8Nk1vFxLLssSudtlASzb5hFXo=",
+ "lastModified": 1740186345,
+ "narHash": "sha256-Qox5x+FI4OhCs/7T/v4hZlR9Rm7ZfpXP7ISy+OrHCyw=",
"path": "/home/y/nixconf/derivations/windsurf",
"type": "path"
},
@@ -1666,6 +1667,23 @@
"repo": "wrapper-manager",
"type": "github"
}
+ },
+ "yek": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1740186522,
+ "narHash": "sha256-2UY5FdAqAhYV1qb9Ckd/L80nsjNP7+OxszUW6YqsCck=",
+ "path": "/home/y/nixconf/derivations/yek",
+ "type": "path"
+ },
+ "original": {
+ "path": "/home/y/nixconf/derivations/yek",
+ "type": "path"
+ }
}
},
"root": "root",
diff --git a/flake.nix b/flake.nix
index 267c943..05e4f39 100644
--- a/flake.nix
+++ b/flake.nix
@@ -79,6 +79,10 @@
url = "path:/home/y/nixconf/derivations/windsurf";
inputs.nixpkgs.follows = "nixpkgs";
};
+ yek = {
+ url = "path:/home/y/nixconf/derivations/yek";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
############# non flakes ############
diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix
index bbd7a35..4753c36 100644
--- a/hosts/pkgs.nix
+++ b/hosts/pkgs.nix
@@ -35,6 +35,7 @@
bottom
pigz
rclone
+ socat
# files/disk
nnn
ranger
@@ -66,7 +67,7 @@
# ai stuff!
# aider-chat
- # yek
+ inputs.yek.packages.x86_64-linux.default
# python312Packages.google-generativeai
]
++ lib.optionals pkgs.stdenv.isLinux [