Personal-use NixOS configuration
at main 81 lines 1.9 kB view raw
1# https://github.com/NixOS/nixpkgs/blob/cd5fedfc384cb98d9fd3827b55f4522f49efda42/pkgs/by-name/fl/floorp-bin-unwrapped/package.nix 2 3{ 4 pkgs, 5 lib, 6 fetchzip, 7}: 8 9let 10 version = "135.0.1-beta.24"; 11 12 versionParts = lib.strings.splitString "-" version; 13 14 packageVersion = builtins.elemAt versionParts 0; 15 packageRelease = builtins.elemAt versionParts 1; 16in 17pkgs.stdenv.mkDerivation rec { 18 pname = "camoufox-browser"; 19 inherit version; 20 21 src = fetchzip { 22 url = "https://github.com/daijro/camoufox/releases/download/v${version}/camoufox-${version}-lin.x86_64.zip"; 23 sha256 = "sha256-k5t12L5q0RG8Zun0SAjGthYQXUcf+xVHvk9Mknr97QY="; 24 stripRoot = false; 25 }; 26 27 nativeBuildInputs = with pkgs; [ 28 wrapGAppsHook3 29 autoPatchelfHook 30 patchelfUnstable 31 ]; 32 33 buildInputs = with pkgs; [ 34 gtk3 35 adwaita-icon-theme 36 alsa-lib 37 dbus-glib 38 xorg.libXtst 39 ]; 40 41 runtimeDependencies = with pkgs; [ 42 curl 43 pciutils 44 libva.out 45 ]; 46 47 appendRunpaths = with pkgs; [ 48 "${pipewire}/lib" 49 ]; 50 51 patchelfFlags = [ "--no-clobber-old-sections" ]; 52 53 installPhase = '' 54 runHook preInstall 55 56 mkdir -p "$prefix/lib" "$prefix/bin" 57 cp -r . "$prefix/lib/camoufox-bin-${version}" 58 59 echo '{"version":"${packageVersion}","release":"${packageRelease}"}' > $out/lib/camoufox-bin-${version}/version.json 60 61 ln -s "$prefix/lib/camoufox-bin-${version}/camoufox" "$out/bin/camoufox" 62 63 runHook postInstall 64 ''; 65 66 passthru = { 67 binaryName = "camoufox"; 68 applicationName = "camoufox"; 69 libName = "camoufox-bin-${version}"; 70 ffmpegSupport = true; 71 gssSupport = true; 72 gtk3 = pkgs.gtk3; 73 }; 74 75 meta = with pkgs.lib; { 76 description = "Stealthy, minimalistic, custom build of Firefox for web scraping"; 77 homepage = "https://github.com/daijro/camoufox"; 78 license = licenses.mpl20; 79 maintainers = with lib.maintainers; [ encode42 ]; 80 }; 81}