Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 74 lines 1.5 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 pkg-config, 6 dbus, 7 ffmpeg, 8 oniguruma, 9 openssl, 10 sqlite, 11 stdenv, 12 alsa-lib, 13 xorg, 14 apple-sdk_12, 15}: 16rustPlatform.buildRustPackage rec { 17 pname = "screen-pipe"; 18 version = "0.1.48"; 19 20 src = fetchFromGitHub { 21 owner = "louis030195"; 22 repo = "screen-pipe"; 23 rev = "v${version}"; 24 hash = "sha256-rWKRCqWFuPO84C52mMrrS4euD6XdJU8kqZsAz28+vWE="; 25 }; 26 27 cargoLock = { 28 lockFile = ./Cargo.lock; 29 outputHashes = { 30 "cpal-0.15.3" = "sha256-eKn3tS5QuqbMTwnRAEybvbPZOiKiid7ghGztAmrs9fw="; 31 "rusty-tesseract-1.1.10" = "sha256-XT74zGn+DetEBUujHm4Soe2iorQcIoUeZbscTv+64hw="; 32 }; 33 }; 34 35 postPatch = '' 36 ln -s ${./Cargo.lock} Cargo.lock 37 ''; 38 39 nativeBuildInputs = [ 40 pkg-config 41 rustPlatform.bindgenHook 42 ]; 43 44 buildInputs = [ 45 dbus 46 ffmpeg 47 oniguruma 48 openssl 49 sqlite 50 ] 51 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 52 apple-sdk_12 53 ] 54 ++ lib.optionals stdenv.hostPlatform.isLinux [ 55 alsa-lib 56 xorg.libxcb 57 ]; 58 59 buildFeatures = lib.optional stdenv.hostPlatform.isDarwin "metal"; 60 61 env = { 62 RUSTONIG_SYSTEM_LIBONIG = true; 63 }; 64 65 doCheck = false; # Tests fail to build 66 67 meta = with lib; { 68 description = "Personalized AI powered by what you've seen, said, or heard"; 69 homepage = "https://github.com/louis030195/screen-pipe"; 70 license = licenses.mit; 71 maintainers = with maintainers; [ dit7ya ]; 72 mainProgram = "screen-pipe"; 73 }; 74}