Skip to content

Commit

Permalink
fix computation of latest version available
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Sep 12, 2023
1 parent 5393edd commit f79b372
Show file tree
Hide file tree
Showing 10 changed files with 410 additions and 491 deletions.
118 changes: 55 additions & 63 deletions pkgs/php/5.6.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,67 +44,59 @@ let
{ version = "5.6.39"; rev = "php-5.6.39"; hash = "sha256-s9sjRfUMAQsB/gQbTg9mxaoo6zJRNRNvFT4Y2gFYOtU="; }
{ version = "5.6.40"; rev = "php-5.6.40"; hash = "sha256-/9Al00YjVTqy9/2Psh0Mnm+fow3FZcoDode3YwI/ugA="; }
];

phps = builtins.foldl'
(acc: item: acc // {
"php${builtins.replaceStrings [ "." "-" ] [ "" "" ] item.version}" = (mkPhp { version = item.version; hash = item.hash; }).withExtensions
(
{ all, ... }: with all; [
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sysvsem
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ prev.lib.optionals (!prev.stdenv.isDarwin) [
imap
]
);
})
{ }
archives;
in
builtins.foldl'
(acc: item: acc // {
"php${builtins.replaceStrings [ "." "-" ] [ "" "" ] item.version}" = (mkPhp { version = item.version; hash = item.hash; }).withExtensions
(
{ all, ... }: with all; [
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sysvsem
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ prev.lib.optionals (!prev.stdenv.isDarwin) [
imap
]
);
})
{ }
(
archives ++ [
(
let last = (prev.lib.last archives); in {
version = prev.lib.versions.majorMinor last.version;
rev = last.rev;
hash = last.hash;
}
)
]
)
phps // (let last = (phps."php${builtins.replaceStrings [ "." "-" ] [ "" "" ] (prev.lib.last archives).version}"); in { "php${builtins.replaceStrings [ "." "-" ] [ "" "" ] (prev.lib.versions.majorMinor last.version)}" = last; })
118 changes: 55 additions & 63 deletions pkgs/php/7.0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,67 +37,59 @@ let
{ version = "7.0.32"; rev = "php-7.0.32"; hash = "sha256-VujYz5wIF4r6hmNYmAX4O9sBY079mBMZdwOOJAZkkuE="; }
{ version = "7.0.33"; rev = "php-7.0.33"; hash = "sha256-STPqdCmKG6BGsCRv43cUFchN+4eDliAbVstTM6vobwc="; }
];

phps = builtins.foldl'
(acc: item: acc // {
"php${builtins.replaceStrings [ "." "-" ] [ "" "" ] item.version}" = (mkPhp { version = item.version; hash = item.hash; }).withExtensions
(
{ all, ... }: with all; [
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sysvsem
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ prev.lib.optionals (!prev.stdenv.isDarwin) [
imap
]
);
})
{ }
archives;
in
builtins.foldl'
(acc: item: acc // {
"php${builtins.replaceStrings [ "." "-" ] [ "" "" ] item.version}" = (mkPhp { version = item.version; hash = item.hash; }).withExtensions
(
{ all, ... }: with all; [
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sysvsem
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ prev.lib.optionals (!prev.stdenv.isDarwin) [
imap
]
);
})
{ }
(
archives ++ [
(
let last = (prev.lib.last archives); in {
version = prev.lib.versions.majorMinor last.version;
rev = last.rev;
hash = last.hash;
}
)
]
)
phps // (let last = (phps."php${builtins.replaceStrings [ "." "-" ] [ "" "" ] (prev.lib.last archives).version}"); in { "php${builtins.replaceStrings [ "." "-" ] [ "" "" ] (prev.lib.versions.majorMinor last.version)}" = last; })
117 changes: 54 additions & 63 deletions pkgs/php/7.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,67 +37,58 @@ let
{ version = "7.1.32"; rev = "php-7.1.32"; hash = "sha256-18ehrd3HWsF/YzSelm2yWTC2s85zZkA0m+qeEJCcq3o="; }
{ version = "7.1.33"; rev = "php-7.1.33"; hash = "sha256-laXl8uK3mzdrc3qC2WgskYkeYCifokGDRjoqyhWPT0s="; }
];
phps = builtins.foldl'
(acc: item: acc // {
"php${builtins.replaceStrings [ "." "-" ] [ "" "" ] item.version}" = (mkPhp { version = item.version; hash = item.hash; }).withExtensions
(
{ all, ... }: with all; [
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sysvsem
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ prev.lib.optionals (!prev.stdenv.isDarwin) [
imap
]
);
})
{ }
archives;
in
builtins.foldl'
(acc: item: acc // {
"php${builtins.replaceStrings [ "." "-" ] [ "" "" ] item.version}" = (mkPhp { version = item.version; hash = item.hash; }).withExtensions
(
{ all, ... }: with all; [
bcmath
calendar
curl
ctype
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
iconv
intl
json
ldap
mbstring
mysqli
mysqlnd
opcache
openssl
pcntl
pdo
pdo_mysql
pdo_odbc
pdo_pgsql
pdo_sqlite
pgsql
posix
readline
session
simplexml
sockets
soap
sysvsem
sqlite3
tokenizer
xmlreader
xmlwriter
zip
zlib
] ++ prev.lib.optionals (!prev.stdenv.isDarwin) [
imap
]
);
})
{ }
(
archives ++ [
(
let last = (prev.lib.last archives); in {
version = prev.lib.versions.majorMinor last.version;
rev = last.rev;
hash = last.hash;
}
)
]
)
phps // (let last = (phps."php${builtins.replaceStrings [ "." "-" ] [ "" "" ] (prev.lib.last archives).version}"); in { "php${builtins.replaceStrings [ "." "-" ] [ "" "" ] (prev.lib.versions.majorMinor last.version)}" = last; })
Loading

0 comments on commit f79b372

Please sign in to comment.