⚘ use your pds as a git remote if you want to ⚘
at main 73 lines 1.9 kB view raw
1{ 2 description = "git-remote-pds - Git remote helper for ATProto PDS"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 6 }; 7 8 outputs = { self, nixpkgs }: 9 let 10 supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 11 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 12 in 13 { 14 packages = forAllSystems (system: 15 let 16 pkgs = nixpkgs.legacyPackages.${system}; 17 in 18 { 19 git-remote-pds = pkgs.rustPlatform.buildRustPackage { 20 pname = "git-remote-pds"; 21 version = "0.1.0"; 22 src = ./.; 23 cargoLock.lockFile = ./Cargo.lock; 24 nativeCheckInputs = [ pkgs.git ]; 25 }; 26 27 default = self.packages.${system}.git-remote-pds; 28 } 29 ); 30 31 devShells = forAllSystems (system: 32 let 33 pkgs = nixpkgs.legacyPackages.${system}; 34 python = pkgs.python3.withPackages (ps: [ 35 ps.playwright 36 ps.pytest 37 ps.requests 38 ps.toml 39 ]); 40 in 41 { 42 default = pkgs.mkShell { 43 buildInputs = [ 44 pkgs.cargo 45 pkgs.rustc 46 pkgs.git 47 pkgs.curl 48 ]; 49 }; 50 51 e2e = pkgs.mkShell { 52 buildInputs = [ 53 pkgs.cargo 54 pkgs.rustc 55 pkgs.git 56 pkgs.curl 57 pkgs.chromium 58 python 59 ]; 60 61 shellHook = '' 62 export PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH="${pkgs.chromium}/bin/chromium" 63 export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 64 ''; 65 }; 66 } 67 ); 68 69 overlays.default = final: prev: { 70 git-remote-pds = self.packages.${final.system}.git-remote-pds; 71 }; 72 }; 73}