!LemuOOvbWqRXodtSsw:nixos.org

NixOS Reproducible Builds

461 Members
Report: https://reproducible.nixos.org Project progress: https://github.com/orgs/NixOS/projects/3096 Servers

Load older messages


SenderMessageTime
26 Oct 2024
@switch3flip:matrix.orggluonixthanks00:43:07
@switch3flip:matrix.orggluonix I am trying to figure out how to obtain the same bit-for-bit builds inside a docker container, compared to outside, just with nix build 00:43:55
@switch3flip:matrix.orggluonix from running diffoscope, one thing that stands out is the different build paths 00:44:30
@switch3flip:matrix.orggluonix

For instance, without docker:

/build/cargo-vendor-dir/...`

versus, with docker:

/tmp/nix-build-teleport.drv-0/cargo-vendor-dir/...
00:46:27
@switch3flip:matrix.orggluonix *

For instance, without docker:

/build/cargo-vendor-dir/...

versus, with docker:

/tmp/nix-build-teleport.drv-0/cargo-vendor-dir/...
00:46:40
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nix/blob/3db75b00602a7a937c1e983e01c071100102c18c/src/libstore/unix/build/local-derivation-goal.cc#L116700:48:07
@artturin:matrix.orgArtturinDefinition is a few lines up00:48:25
@artturin:matrix.orgArtturinYou can enable sandboxing https://hub.docker.com/r/nixos/nix shows how00:49:33
@switch3flip:matrix.orggluonixyes, ok, I was reading about this00:49:51
@switch3flip:matrix.orggluonixThis applies to the docker-nixpkgs images as well right? I am using nix flakes so the image nix-flakes or cachix-flakes is convenient.00:50:34
@artturin:matrix.orgArtturin
In reply to @switch3flip:matrix.org
This applies to the docker-nixpkgs images as well right? I am using nix flakes so the image nix-flakes or cachix-flakes is convenient.
Should work in any docker with nix
00:51:06
@switch3flip:matrix.orggluonix Does this also mean that we cannot use docker build to build nix packages, but instead we must create the build environment with docker and use docker run --privileged ... ro tun a container in which we build the nix package? 00:52:39
@switch3flip:matrix.orggluonix * Does this also mean that we cannot use docker build to build sandboxed nix packages, but instead we must create the build environment with docker and use docker run --privileged ... ro tun a container in which we build the nix package? 00:53:00
@artturin:matrix.orgArtturinI don't know what docker build does00:53:25
@artturin:matrix.orgArtturinhttps://stackoverflow.com/questions/48098671/build-with-docker-and-privileged00:54:44
@switch3flip:matrix.orggluonixwhoa, thanks, that was exactly what I was asking about00:55:47
@artturin:matrix.orgArtturinYou could just build the image with nix instead of docker build00:56:59
@artturin:matrix.orgArtturin* You could just build the image with nix instead of docker build There's builders for that in nixpkgs.00:59:53
@switch3flip:matrix.orggluonix ah yes, good idea, the reason I wish to use docker right now is for integration purposes as we have a larger system that uses docker to build "stuff" and we only nix for a specific component as it has higher requirements with respect to reproducible builds 01:02:26
@switch3flip:matrix.orggluonix as you may know, nix has a steep learning curve, hence most dev teams prefer docker, unless they have no choice 😆 01:03:01

There are no newer messages yet.


Back to Room ListRoom Version: 6