diff options
Diffstat (limited to 'scripts/nix-push.in')
-rw-r--r-- | scripts/nix-push.in | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/nix-push.in b/scripts/nix-push.in index fd1ec21485e2..dcdad5721265 100644 --- a/scripts/nix-push.in +++ b/scripts/nix-push.in @@ -1,9 +1,10 @@ -#! @perl@ -w -I@libexecdir@/nix @perlFlags@ +#! @perl@ -w @perlFlags@ use strict; use File::Temp qw(tempdir); use File::stat; -use NixManifest; +use Nix::Config; +use Nix::Manifest; my $hashAlgo = "sha256"; @@ -13,7 +14,7 @@ my $tmpDir = tempdir("nix-push.XXXXXX", CLEANUP => 1, TMPDIR => 1) my $nixExpr = "$tmpDir/create-nars.nix"; my $manifest = "$tmpDir/MANIFEST"; -my $curl = "@curl@ --fail --silent"; +my $curl = "$Nix::Config::curl --fail --silent"; my $extraCurlFlags = ${ENV{'CURL_FLAGS'}}; $curl = "$curl $extraCurlFlags" if defined $extraCurlFlags; @@ -107,7 +108,7 @@ foreach my $storePath (@storePaths) { # Construct a Nix expression that creates a Nix archive. my $nixexpr = "((import $dataDir/nix/corepkgs/nar/nar.nix) " . - "{storePath = builtins.storePath \"$storePath\"; system = \"@system@\"; hashAlgo = \"$hashAlgo\";}) "; + "{ storePath = builtins.storePath \"$storePath\"; system = \"@system@\"; hashAlgo = \"$hashAlgo\"; }) "; print NIX $nixexpr; } |