From 7f0ed370da62b867d90ba5346f4b9f217fbbe10f Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <e.dolstra@tudelft.nl>
Date: Fri, 20 Feb 2004 11:32:30 +0000
Subject: [PATCH] * Use $(storedir) instead of $(prefix)/store.

---
 scripts/nix-collect-garbage.in | 2 +-
 scripts/nix-prefetch-url.in    | 4 ++--
 substitute.mk                  | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/nix-collect-garbage.in b/scripts/nix-collect-garbage.in
index 1effc14d6..a3ee7bd5e 100755
--- a/scripts/nix-collect-garbage.in
+++ b/scripts/nix-collect-garbage.in
@@ -4,7 +4,7 @@ use strict;
 use IPC::Open2;
 
 my $linkdir = "@localstatedir@/nix/profiles";
-my $storedir = "@prefix@/store";
+my $storedir = "@storedir@";
 
 my %alive;
 
diff --git a/scripts/nix-prefetch-url.in b/scripts/nix-prefetch-url.in
index 71ba3caab..6cc3b7a26 100644
--- a/scripts/nix-prefetch-url.in
+++ b/scripts/nix-prefetch-url.in
@@ -8,7 +8,7 @@ defined $url or die;
 
 print "fetching $url...\n";
 
-my $out = "@prefix@/store/nix-prefetch-url-$$";
+my $out = "@storedir@/nix-prefetch-url-$$";
 
 system "@wget@ --passive-ftp '$url' -O '$out'";
 $? == 0 or die "unable to fetch $url";
@@ -19,7 +19,7 @@ chomp $hash;
 
 print "file has hash $hash\n";
 
-my $out2 = "@prefix@/store/nix-prefetch-url-$hash";
+my $out2 = "@storedir@/nix-prefetch-url-$hash";
 rename $out, $out2;
 
 # Create a Nix expression.
diff --git a/substitute.mk b/substitute.mk
index bbdb9b617..6882393bc 100644
--- a/substitute.mk
+++ b/substitute.mk
@@ -6,6 +6,7 @@
 	 -e "s^@localstatedir\@^$(localstatedir)^g" \
 	 -e "s^@datadir\@^$(datadir)^g" \
 	 -e "s^@libexecdir\@^$(libexecdir)^g" \
+	 -e "s^@storedir\@^$(storedir)^g" \
 	 -e "s^@system\@^$(system)^g" \
 	 -e "s^@wget\@^$(wget)^g" \
 	 -e "s^@version\@^$(VERSION)^g" \
-- 
GitLab