build: package for nix
- change ID
- qsvuxuqoqqutmtlylyxqklrmkstxuwrv
- git commit
- 6c032e82b878d3ca0293dfd4297492efa3c938cb
- author
- Grace Yoder <grace_yoder@outlook.com> - 2026-09-10T11:43:22-04:00
- committer
- Grace Yoder <grace_yoder@outlook.com> - 2026-09-10T12:26:26-04:00
- parents
- zxwnlotmtutm
- refs
- refs/heads/main, refs/tags/latest
- signature
- Present (not validated)
build: package for nix
tree
| type | name | size |
|---|---|---|
| file | .crow/build.yml | 1532 bytes |
| file | .crow/release.yml | 566 bytes |
| file | .gitignore | 354 bytes |
| file | LICENSE | 1073 bytes |
| file | README.md | 632 bytes |
| file | build.zig | 2345 bytes |
| file | build.zig.zon | 247 bytes |
| file | default.nix | 1036 bytes |
| file | flake.lock | 569 bytes |
| file | flake.nix | 583 bytes |
| file | src/Clip/ForkOut.zig | 621 bytes |
| file | src/Clip/NSPBBridge.m | 382 bytes |
| file | src/Clip/NSPasteboard.zig | 1456 bytes |
| file | src/Clip/OSC52.zig | 6016 bytes |
| file | src/Clip.zig | 1560 bytes |
| file | src/main.zig | 3003 bytes |
diff
default.nix
added (absent → file)
+{
+ pkgs ? import <nixpkgs> { },
+}:
+
+pkgs.stdenv.mkDerivation {
+ pname = "tpb";
+ version = "0.1.2";
+
+ src = pkgs.lib.fileset.toSource {
+ root = ./.;
+ fileset = pkgs.lib.fileset.unions [
+ ./build.zig
+ ./build.zig.zon
+ ./src
+ ./LICENSE
+ ];
+ };
+
+ nativeBuildInputs = [
+ pkgs.zig_0_16
+ ]
+ ++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.makeWrapper;
+
+ zigBuildFlags = pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin [
+ "--sysroot"
+ "${pkgs.apple-sdk}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
+ ];
+
+ postFixup = pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isLinux ''
+ wrapProgram "$out/bin/tpb" \
+ --prefix PATH : ${
+ pkgs.lib.makeBinPath [
+ pkgs.wl-clipboard
+ pkgs.xclip
+ ]
+ }
+ '';
+
+ doCheck = false;
+
+ meta = {
+ description = "Tee your Paste Board";
+ homepage = "https://git.gae.moe/grace/tpb";
+ license = pkgs.lib.licenses.mit;
+ mainProgram = "tpb";
+ platforms = pkgs.lib.platforms.unix;
+ };
+}
flake.lock
added (absent → file)
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1789012029,
+ "narHash": "sha256-1CBkBf+Nhggykzlx0jvXrj5rk20btl+tK8Fa8Ml/BL4=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "d5dfd8e6716dde34398bc14bc87c10dece9c8c68",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
flake.nix
added (absent → file)
+{
+ description = "Tee standard input into the system clipboard";
+
+ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
+
+ outputs = { nixpkgs, ... }:
+ let
+ systems = [
+ "aarch64-darwin"
+ "aarch64-linux"
+ "x86_64-linux"
+ ];
+ forAllSystems = nixpkgs.lib.genAttrs systems;
+ in
+ {
+ packages = forAllSystems (system:
+ let
+ pkgs = nixpkgs.legacyPackages.${system};
+ tpb = import ./default.nix { inherit pkgs; };
+ in
+ {
+ inherit tpb;
+ default = tpb;
+ });
+ };
+}