!BrOouUOucaGdxbaRca:nixos.org

NixOS Portuguese

359 Members
Sala de Conversação sobre o ecossistema Nix em português. Ponteada com o grupo do Telegram: https://t.me/nixosbrasil/ Link Matrix: https://matrix.to/#/!BrOouUOucaGdxbaRca:nixos.org24 Servers

Load older messages


SenderMessageTime
7 Feb 2026
@telegram_59794896:t2bot.ioYuri Albuquerque
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";
    rust-overlay.url = "github:oxalica/rust-overlay";
    rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
    naersk.url = "github:nix-community/naersk";
    naersk.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs =
    {
      nixpkgs,
      flake-utils,
      rust-overlay,
      naersk,
      ...
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
        pkgs = import nixpkgs {
          inherit system;
          overlays = [
            (import rust-overlay)
          ];
        };

        fluffle-backend = pkgs.callPackage ./. { inherit naersk; };

        peak-api-image = pkgs.dockerTools.buildImage {
          name = "431657808888.dkr.ecr.us-east-2.amazonaws.com/peak-api";
          tag = "latest";

          config = {
            Cmd = [ "${fluffle-backend}/bin/peak-api" ];
          };
        };

        peak-ws-image = pkgs.dockerTools.buildImage {
          name = "431657808888.dkr.ecr.us-east-2.amazonaws.com/peak-ws";
          tag = "latest";

          config = {
            Cmd = [ "${fluffle-backend}/bin/peak-ws" ];
          };
        };

        shell = pkgs.mkShell {
          inputsFrom = [ fluffle-backend ];

          buildInputs = [
            pkgs.sqlx-cli
            pkgs.postgresql
          ];
        };
      in
      {
        packages = {
          inherit fluffle-backend;
          default = fluffle-backend;
        }
        // pkgs.lib.optionalAttrs (pkgs.stdenv.isLinux && pkgs.stdenv.is64bit && !pkgs.stdenv.isAarch64) {
          inherit peak-api-image peak-ws-image;
        };

        devShells.default = shell;
      }
    );
}
00:25:15
@telegram_59794896:t2bot.ioYuri Albuquerque
{
  rust-bin,
  naersk,
  callPackage,
  pkg-config,
}:
let
  rust = rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
  rustPlatform = callPackage naersk {
    cargo = rust;
    rustc = rust;
  };
in
rustPlatform.buildPackage {
  src = ./.;

  buildInputs = [
    pkg-config
  ];
}
00:25:26
@telegram_67409963:t2bot.ioEric PiresHmm, realmente não parece nada errado pra mim... Nunca usei o naersk mas pode ser sim que ele esteja trazendo mais coisas00:27:01
@telegram_59794896:t2bot.ioYuri Albuquerquesim, olha o tamanho do path-info00:27:28
@telegram_59794896:t2bot.ioYuri Albuquerqueok, não tô conseguindo compilar agora 😆00:28:12
@telegram_59794896:t2bot.ioYuri Albuquerqueah, consigo compilar, sim, é que tem que compilar antes de mostrar o path-info00:29:01
@telegram_59794896:t2bot.ioYuri Albuquerqueacabei de descobrir o crate2nix00:35:17
@telegram_59794896:t2bot.ioYuri Albuquerqueacho que vou tentar usar no lugar do naersk00:35:22
@telegram_59794896:t2bot.ioYuri Albuquerqueamanhã eu vejo isso, tô colapsando de cansaço00:36:10
@telegram_59794896:t2bot.ioYuri Albuquerque

/nix/store/ai58fkl3c92lizrbxavxpga6v8n07h6n-rust-std-1.92.0-x86_64-unknown-linux-gnu                     168028272
/nix/store/mjf8jlq9grydcdvyw6hb063x5c34g5gf-gcc-15.2.0                                                   337772576
/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0                                           381586808
/nix/store/1ydn19xwyd6djc07mzs3hx2paz908nma-rustc-1.92.0-x86_64-unknown-linux-gnu                        444708824
/nix/store/msw7clv58gng24djydlc4sial6iij1qa-rustfmt-preview-1.92.0-x86_64-unknown-linux-gnu              454248296
/nix/store/yj97wwnqb0i1s1cz5lm7rx4f8y1rq97a-clippy-preview-1.92.0-x86_64-unknown-linux-gnu               466101136
/nix/store/89zy5vj47d42rilkxxzb39y56q0hj4lv-rust-analyzer-preview-1.92.0-x86_64-unknown-linux-gnu        488065120
/nix/store/9dnx2yc3q3z4cj0bwpvl9xfk2x3kv9f0-rust-docs-1.92.0-x86_64-unknown-linux-gnu                    603725184
/nix/store/i29mw1dj3pdl70zac8prqhibnvz1cd16-rust-default-1.92.0                                         1937962144
/nix/store/lwyr1qrsp53xj8jffnbl5hg8cbxyyahz-rust-workspace-unknown                                      2006828416
00:39:24
@telegram_59794896:t2bot.ioYuri Albuquerque mas tá aqui o path-info:
/nix/store/kbijm6lc9va8xann3cfyam0vczzmwkxj-xgcc-15.2.0-libgcc                                              197752
/nix/store/yjmjazfwljzajwq54xlr7vfz77spzr9y-gcc-15.2.0-libgcc                                               197752
/nix/store/pkphs076yz5ajnqczzj0588n6miph269-libunistring-1.4.1                                             2078792
/nix/store/d0d9wqmw5saaynfvmszsda3dmh5q82z8-libidn2-2.3.8                                                  2447000
/nix/store/3h3vbisciry5r5rvwbmn4ij8fvy1zx4b-linux-headers-6.18                                             7327880
/nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47                                                 33019480
/nix/store/9v1irc5cj2644cf3j5r3z7x833cablh5-expand-response-params                                        33036288
/nix/store/s644cyhhkg9zjgk924ap5wwr96jn71d3-libffi-3.5.2                                                  33093296
/nix/store/y6n0g6yj0hzdq31q1258jn372kflb4dg-attr-2.5.2                                                    33112200
/nix/store/ri9paa3mri4kqakljak8ldvbcp7lpmif-zlib-1.3.1                                                    33151744
/nix/store/6gz4kzl3i8x44pssbnyiahvl5vyc9vcq-acl-2.3.2                                                     33240424
/nix/store/1gzg2vdnhdbmbspyvw5gygn9hjjmlff0-gmp-6.3.0                                                     33759344
/nix/store/x9jqa2afhx1bwd8p32idimvpyvhcphiw-libgpg-error-1.55                                             33900152
/nix/store/v68a321jp4xqmbk0ly5yn1x4a3ky1y8a-mpfr-4.2.2                                                    34581944
/nix/store/0jwkg5vcr4b4zi5r5xlg4nizd7h26776-libmpc-1.3.1                                                  34870128
/nix/store/f15k3dpilmiyv6zgpib289rnjykgr1r4-bash-5.3p9                                                    34876328
/nix/store/0kgwmi3n8ml2a041a5y9y9ycga3md4dq-pcre2-10.46                                                   35077152
/nix/store/8fwg7nzmn4jvyw1r7y1653aiz1gz5d4z-util-linux-minimal-2.41.3-lib                                 35078768
/nix/store/36q2camlpkqkwcxm1r8dfxz7whavs5az-libgcrypt-1.11.2-lib                                          35749904               
/nix/store/h4qwa74a377wj4xgglkg6wjiwf72ab9z-libselinux-3.8.1                                              35780664
/nix/store/0bdqq2z98kg2hfn3k60if6pb5fd5p10h-glibc-2.42-47-bin                                             35905960
/nix/store/02vv0r262agf9j5n2y1gmbjvdf12zkl0-gnugrep-3.12                                                  36031920
/nix/store/c9fc5jv4nm5c6n60k3m38n57c66hb9i0-binutils-2.44-lib                                             36151600
/nix/store/56q5bvy8f9njwsqj723cjkfhaz70y5i7-isl-0.20                                                      36397704
/nix/store/j2kgllgds4w7na8zqv1msi0mpvpjxda8-gcc-15.2.0-lib                                                43530888
/nix/store/fg597zq78kc4dpbh0is4khy1qfd81xw4-gmp-with-cxx-6.3.0                                            44314320
/nix/store/rwalsamz4246k8f1zzxa54qx7w3fbzdg-glibc-2.42-47-dev                                             45678784
/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9                                                 46172968                                        
/nix/store/fgzpllmvbk3l258j0f3ib7k44lksbqnp-glib-2.86.3                                                   53761000
/nix/store/zrc3x0hnm1ncc7jxhy6i2xa4xm0mj15c-libsecret-0.21.7                                              57179624
/nix/store/c111d33p7mr9fijwckc7dbdd56xj9gim-rust-src-1.92.0-x86_64-unknown-linux-gnu                      73236112
/nix/store/47mn80zqpygykqailwzw8zlag4cgl75q-binutils-2.44                                                 79823248
/nix/store/i6ppbrlpp6yki8qvka7nyv091xa8dchx-binutils-wrapper-2.44                                         97054600
/nix/store/3xzyb2q4fgppsbjsgbmw9pr109bk0p9x-cargo-1.92.0-x86_64-unknown-linux-gnu                         98843648
00:39:24
@telegram_59794896:t2bot.ioYuri Albuquerqueele tá incluindo tudo00:39:35
@telegram_67409963:t2bot.ioEric PiresE se usar esse parâmetro no buildPackage?
Download E se usar esse parâmetro no buildPackage?
11:12:12
@telegram_59794896:t2bot.ioYuri AlbuquerqueNão acho que isso ajude, só torna a build mais lenta12:31:26
@telegram_67409963:t2bot.ioEric PiresJusto12:31:38
@telegram_59794896:t2bot.ioYuri AlbuquerqueTô fazendo um experimento com crate2nix, mais tarde conto o resultado12:31:40
@telegram_59794896:t2bot.ioYuri Albuquerque* Tô fazendo um experimento com crate2nix ao invés de naersk, mais tarde conto o resultado12:32:01
@telegram_67409963:t2bot.ioEric Pires Quando eu fiz uma imagem Docker com Rust e cross-compilation eu usei algo nessa linha, mas aí gerenciei manualmente os cargo deps e (zig)build https://gist.github.com/EpicEric/77d817b232f99d12c0e8bc309bcea6fe 12:33:35
@telegram_59794896:t2bot.ioYuri AlbuquerqueVocê tá usando o atributo contents no buildImage. Tá deprecated. ☹️12:34:58
@telegram_59794896:t2bot.ioYuri AlbuquerqueAgora tem que usar copyToRoot, e eu não achei uma documentação boa disso ainda12:35:26
@telegram_67409963:t2bot.ioEric PiresO manual do nixpkgs não fala nada sobre estar deprecado12:36:07
@telegram_67409963:t2bot.ioEric PiresAhhh12:36:20
@telegram_59794896:t2bot.ioYuri AlbuquerqueEu tentei usar e o nix reclamou12:36:24
@telegram_67409963:t2bot.ioEric PiresEstá deprecado no buildImage, mas não no buildLayeredImage12:36:31
@telegram_67409963:t2bot.ioEric PiresXD12:36:33
@telegram_59794896:t2bot.ioYuri AlbuquerqueEstranho....12:36:41
@telegram_59794896:t2bot.ioYuri AlbuquerqueSerá que se eu tentar com buildLayeredImage dá certo, então?12:36:55
@telegram_67409963:t2bot.ioEric PiresAcho que ele ainda iria copiar tudo que for considerado runtime dep12:37:14
@telegram_59794896:t2bot.ioYuri AlbuquerqueOutra coisa é que eu não tô conseguindo usar nem fenix nem rust-overlay com o crate2nix12:37:28
@telegram_67409963:t2bot.ioEric PiresSó usei o crane nessa linha12:38:07

Show newer messages


Back to Room ListRoom Version: 9