mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-16 06:47:09 +03:00
* A patch to make TemplateToolkit work properly on templates in the
Nix store. svn path=/nixpkgs/trunk/; revision=13491
This commit is contained in:
parent
3189f877d0
commit
85fa8661e3
@ -0,0 +1,23 @@
|
||||
diff -rc Template-Toolkit-2.20-orig/lib/Template/Provider.pm Template-Toolkit-2.20/lib/Template/Provider.pm
|
||||
*** Template-Toolkit-2.20-orig/lib/Template/Provider.pm 2008-08-06 11:32:02.000000000 +0200
|
||||
--- Template-Toolkit-2.20/lib/Template/Provider.pm 2008-11-28 16:37:36.000000000 +0100
|
||||
***************
|
||||
*** 936,942 ****
|
||||
sub _template_modified {
|
||||
my $self = shift;
|
||||
my $template = shift || return;
|
||||
! return (stat( $template ))[9];
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
--- 936,945 ----
|
||||
sub _template_modified {
|
||||
my $self = shift;
|
||||
my $template = shift || return;
|
||||
! # Nix specific hack: timestamps of 0 (1-1-1970) should not be
|
||||
! # treated as undefined, so return 1 instead.
|
||||
! my $t = (stat( $template ))[9];
|
||||
! return (defined $t && $t == 0) ? 1 : $t;
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
@ -5178,6 +5178,10 @@ let
|
||||
sha256 = "13wbh06a76k4ag14lhszmpwv4hb8hlj1d9glizhp8izazl3xf1zg";
|
||||
};
|
||||
propagatedBuildInputs = [perlAppConfig];
|
||||
patches = [
|
||||
# Needed to make TT works properly on templates in the Nix store.
|
||||
../development/perl-modules/template-toolkit-nix-store.patch
|
||||
];
|
||||
};
|
||||
|
||||
perlTermReadKey = buildPerlPackage {
|
||||
|
Loading…
Reference in New Issue
Block a user