Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compsize: init at 2018-04-07 #40217

Merged
merged 1 commit into from May 12, 2018
Merged

compsize: init at 2018-04-07 #40217

merged 1 commit into from May 12, 2018

Conversation

CrazedProgrammer
Copy link
Contributor

@CrazedProgrammer CrazedProgrammer commented May 9, 2018

Motivation for this change

Adds compsize, a tool for checking the compression type/ratio on a file or a set of files on Btrfs.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

sha256 = "0jps8n0xsdh4mcww5q29rzysbv50iq6rmihxrf99lzgrw0sw5m7k";
};

nativeBuildInputs = [ btrfs-progs ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be buildInputs (not nativeBuildInputs): the actual btrfs tools don't need to run on the machine where you build this but the build includes some btrfs headers for the target platform. Doesn't make a difference unless you're cross-building but let's get this right anyway.

The distinction is rather subtle, see https://nixos.org/nixpkgs/manual/#ssec-stdenv-dependencies.
Simple rule of thumb: if it needs to run during the build process, put it in nativeBuildInputs.

@CrazedProgrammer CrazedProgrammer force-pushed the compsize branch 2 times, most recently from 07442ae to 9b82bf6 Compare May 12, 2018 21:56
@CrazedProgrammer
Copy link
Contributor Author

Fixed.
Thanks for the review and explanation, I won't make that mistake again :)

@xeji
Copy link
Contributor

xeji commented May 12, 2018

@GrahamcOfBorg build compsize

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: compsize

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07
shrinking /nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07/bin/compsize
gzipping man pages under /nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07/share/man/
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07/bin
patching script interpreter paths in /nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07
checking for references to /build in /nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07...
/nix/store/18dv8bdjdi00nq7g4lzd16mcj6xanxvf-compsize-2018-04-07

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: compsize

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: compsize

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07
shrinking /nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07/bin/compsize
gzipping man pages under /nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07/share/man/
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07/bin
patching script interpreter paths in /nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07
checking for references to /build in /nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07...
/nix/store/9038pr2kiawp09ij8z6f8gpq1zhw6w4z-compsize-2018-04-07

@xeji xeji merged commit da08831 into NixOS:master May 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants