Skip to content

Instantly share code, notes, and snippets.

@LnL7

LnL7/reproducable-hello.nix Secret

Created Jan 6, 2020
Embed
What would you like to do?
{ pkgs ? import nixpkgs {}
, nixpkgs ? builtins.fetchTarball {
url = "https://releases.nixos.org/nixpkgs/nixpkgs-20.03pre207249.7e8454fb856/nixexprs.tar.xz";
sha256 = "1rdnhpvnchmws86lr6dq6bj14b166gnpj7n1sy6ps19vnmj6xfq9";
}
}:
pkgs.hello.overrideDerivation (drv: {
NIX_LDFLAGS = "-sdk_version 10.12 -no_uuid";
})
# $ nix-build
# /nix/store/8hvs8qk777cnvpsaj4paxaxyihrhwiw8-hello-2.10
# $ shasum -a256 result/bin/hello
# 078a7d9382c87753de2c2d4a25538dc0ed8a059cc8b5481a4d6df381abc2397b result/bin/hello
# $ otool -l result/bin/hello
# ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.