mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-05-20 21:41:12 +02:00
Compare commits
4 Commits
8db3034baf
...
2fcaf5893f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2fcaf5893f | ||
|
|
b009da31af | ||
|
|
e9a267e2a3 | ||
|
|
338c2f2531 |
@@ -7,9 +7,27 @@ let
|
||||
# https://nixos.org/manual/nixpkgs/stable/#ssec-php-user-guide-installing-with-extensions
|
||||
phpEnv = pkgs.php.buildEnv {
|
||||
extensions = { all, ... }: with all; [
|
||||
bz2
|
||||
curl
|
||||
decimal
|
||||
gd
|
||||
imagick
|
||||
opcache
|
||||
mysqli
|
||||
mysqlnd
|
||||
pgsql
|
||||
posix
|
||||
protobuf
|
||||
sqlite3
|
||||
uuid
|
||||
xml
|
||||
xsl
|
||||
zlib
|
||||
zstd
|
||||
|
||||
pdo
|
||||
pdo_mysql
|
||||
pdo_pgsql
|
||||
pdo_sqlite
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
@@ -25,38 +43,15 @@ let
|
||||
pkgs.irssi
|
||||
pkgs.nix.libs.nix-perl-bindings
|
||||
|
||||
AlgorithmDiff
|
||||
AnyEvent
|
||||
AnyEventI3
|
||||
ArchiveZip
|
||||
CGI
|
||||
CPAN
|
||||
CPANPLUS
|
||||
DBDPg
|
||||
DBDSQLite
|
||||
DBDmysql
|
||||
DBI
|
||||
EmailAddress
|
||||
EmailSimple
|
||||
Env
|
||||
Git
|
||||
HTMLMason
|
||||
HTMLParser
|
||||
HTMLTagset
|
||||
HTTPDAV
|
||||
HTTPDaemon
|
||||
ImageMagick
|
||||
JSON
|
||||
LWP
|
||||
MozillaCA
|
||||
PathTiny
|
||||
Switch
|
||||
SysSyslog
|
||||
TestPostgreSQL
|
||||
TextPDF
|
||||
TieFile
|
||||
Tk
|
||||
URI
|
||||
XMLLibXML
|
||||
TemplateToolkit
|
||||
]);
|
||||
|
||||
# https://nixos.org/manual/nixpkgs/stable/#python.buildenv-function
|
||||
@@ -73,12 +68,12 @@ let
|
||||
# https://nixos.org/manual/nixpkgs/stable/#sec-building-environment
|
||||
fhsEnv = pkgs.buildEnv {
|
||||
name = "userweb-env";
|
||||
ignoreCollisions = true;
|
||||
paths = with pkgs; [
|
||||
bash
|
||||
|
||||
perlEnv
|
||||
pythonEnv
|
||||
|
||||
phpEnv
|
||||
]
|
||||
++ (with phpEnv.packages; [
|
||||
@@ -231,6 +226,25 @@ in
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<DirectoryMatch "^/home/pvv/.*/web-docs/(${lib.concatStringsSep "|" [
|
||||
"\\.git"
|
||||
"\\.hg"
|
||||
"\\.svn"
|
||||
"\\.ssh"
|
||||
"\\.env"
|
||||
"\\.envrc"
|
||||
"\\.bzr"
|
||||
"\\.venv"
|
||||
"CVS"
|
||||
"RCS"
|
||||
".*\\.swp"
|
||||
".*\\.bak"
|
||||
".*~"
|
||||
]})(/|$)">
|
||||
AllowOverride All
|
||||
Require all denied
|
||||
</DirectoryMatch>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ def get_newest_commit(project_name: str, tracking_branch: str) -> str:
|
||||
content = requests.get(f"{BASE_WEB_URL}/{project_name}/+log/refs/heads/{tracking_branch}/").text
|
||||
soup = bs4.BeautifulSoup(content, features="html.parser")
|
||||
try:
|
||||
a = soup.find('li').findChild('a')
|
||||
a = soup.find('li').find('a')
|
||||
commit_sha = a['href'].split('/')[-1]
|
||||
except AttributeError:
|
||||
print(f"ERROR: Could not parse page for {project_name}:")
|
||||
|
||||
Reference in New Issue
Block a user