about summary refs log tree commit diff
path: root/scripts/nix-prefetch-url.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-prefetch-url.in')
-rwxr-xr-xscripts/nix-prefetch-url.in17
1 files changed, 1 insertions, 16 deletions
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index eea2b814b733..64102e8ae84a 100755
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -6,6 +6,7 @@ use File::Temp qw(tempdir);
 use File::stat;
 use Nix::Store;
 use Nix::Config;
+use Nix::Utils;
 
 my $url = shift;
 my $expHash = shift;
@@ -20,22 +21,6 @@ EOF
     exit 1;
 }
 
-sub writeFile {
-    my ($fn, $s) = @_;
-    open TMP, ">$fn" or die;
-    print TMP "$s" or die;
-    close TMP or die;
-}
-
-sub readFile {
-    local $/ = undef;
-    my ($fn) = @_;
-    open TMP, "<$fn" or die;
-    my $s = <TMP>;
-    close TMP or die;
-    return $s;
-}
-
 my $tmpDir = tempdir("nix-prefetch-url.XXXXXX", CLEANUP => 1, TMPDIR => 1)
     or die "cannot create a temporary directory";