Browse Source

Re-enable static Nix

chris-martin-patch-1
Alex Feldman-Crough 1 year ago
parent
commit
33f6ecefb2
  1. 20
      nix/nixpkgs.nix

20
nix/nixpkgs.nix

@ -7,11 +7,19 @@
args:
let
static = builtins.getEnv "NIX_STATIC" != "";
url = "https://github.com/NixOS/nixpkgs/archive/${commit}.tar.gz";
commit = "e59dcf8ccec439f54dc52ffd5832610fc3f6c9c2";
sha256 = "1ky79vczvf2sv6gk234i2m4vsxz1wpkh69gm8c7s1qwyawar9vjq";
nixpkgs = import tarball args;
tarball = builtins.fetchTarball { inherit url sha256; };
static = builtins.getEnv "NIX_STATIC" != "";
dynUrl = "https://github.com/NixOS/nixpkgs/archive/${commit}.tar.gz";
dynCommit = "e59dcf8ccec439f54dc52ffd5832610fc3f6c9c2";
dynSha256 = "1ky79vczvf2sv6gk234i2m4vsxz1wpkh69gm8c7s1qwyawar9vjq";
staticUrl = "https://github.com/nh2/nixpkgs/archive/${commit}.tar.gz";
staticCommit = "0c960262d159d3a884dadc3d4e4b131557dad116";
staticSha256 = "1ky79vczvf2sv6gk234i2m4vsxz1wpkh69gm8c7s1qwyawar9vjp";
nixpkgs = import tarball args;
tarball =
if static
then builtins.fetchTarball { url = staticUrl; sha256 = staticSha256; };
else builtins.fetchTarball { url = dynUrl; sha256 = dynSha256; };
in
if static then nixpkgs.pkgsMusl else nixpkgs
Loading…
Cancel
Save