mirror of
https://github.com/NixOS/nix
synced 2025-07-02 05:11:47 +02:00
* Install NixManifest.pm, NixConfig.pm and GeneratePatches.pm under
the Nix:: namespace.
This commit is contained in:
parent
659c427caa
commit
6fcdbcac20
20 changed files with 108 additions and 147 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue