Merge master into staging-next
This commit is contained in:
commit
2f777e46bc
@ -35,6 +35,9 @@ in
|
||||
ExecStartPre = testCommand;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 120;
|
||||
|
||||
LimitSTACK = 256 * 1024 * 1024;
|
||||
OOMPolicy = "continue";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -8,7 +8,8 @@ let
|
||||
cfg = config.services.mediawiki;
|
||||
fpm = config.services.phpfpm.pools.mediawiki;
|
||||
user = "mediawiki";
|
||||
group = config.services.httpd.group;
|
||||
group = if cfg.webserver == "apache" then "apache" else "mediawiki";
|
||||
|
||||
cacheDir = "/var/cache/mediawiki";
|
||||
stateDir = "/var/lib/mediawiki";
|
||||
|
||||
@ -73,7 +74,7 @@ let
|
||||
$wgScriptPath = "";
|
||||
|
||||
## The protocol and server name to use in fully-qualified URLs
|
||||
$wgServer = "${if cfg.virtualHost.addSSL || cfg.virtualHost.forceSSL || cfg.virtualHost.onlySSL then "https" else "http"}://${cfg.virtualHost.hostName}";
|
||||
$wgServer = "${cfg.url}";
|
||||
|
||||
## The URL path to static resources (images, scripts, etc.)
|
||||
$wgResourceBasePath = $wgScriptPath;
|
||||
@ -87,8 +88,7 @@ let
|
||||
$wgEnableEmail = true;
|
||||
$wgEnableUserEmail = true; # UPO
|
||||
|
||||
$wgEmergencyContact = "${if cfg.virtualHost.adminAddr != null then cfg.virtualHost.adminAddr else config.services.httpd.adminAddr}";
|
||||
$wgPasswordSender = $wgEmergencyContact;
|
||||
$wgPasswordSender = "${cfg.passwordSender}";
|
||||
|
||||
$wgEnotifUserTalk = false; # UPO
|
||||
$wgEnotifWatchlist = false; # UPO
|
||||
@ -190,6 +190,16 @@ in
|
||||
description = lib.mdDoc "Which MediaWiki package to use.";
|
||||
};
|
||||
|
||||
finalPackage = mkOption {
|
||||
type = types.package;
|
||||
readOnly = true;
|
||||
default = pkg;
|
||||
defaultText = literalExpression "pkg";
|
||||
description = lib.mdDoc ''
|
||||
The final package used by the module. This is the package that will have extensions and skins installed.
|
||||
'';
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "MediaWiki";
|
||||
@ -197,6 +207,22 @@ in
|
||||
description = lib.mdDoc "Name of the wiki.";
|
||||
};
|
||||
|
||||
url = mkOption {
|
||||
type = types.str;
|
||||
default = if cfg.webserver == "apache" then
|
||||
"${if cfg.httpd.virtualHost.addSSL || cfg.httpd.virtualHost.forceSSL || cfg.httpd.virtualHost.onlySSL then "https" else "http"}://${cfg.httpd.virtualHost.hostName}"
|
||||
else
|
||||
"http://localhost";
|
||||
defaultText = literalExpression ''
|
||||
if cfg.webserver == "apache" then
|
||||
"''${if cfg.httpd.virtualHost.addSSL || cfg.httpd.virtualHost.forceSSL || cfg.httpd.virtualHost.onlySSL then "https" else "http"}://''${cfg.httpd.virtualHost.hostName}"
|
||||
else
|
||||
"http://localhost";
|
||||
'';
|
||||
example = "https://wiki.example.org";
|
||||
description = lib.mdDoc "URL of the wiki.";
|
||||
};
|
||||
|
||||
uploadsDir = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
default = "${stateDir}/uploads";
|
||||
@ -212,6 +238,24 @@ in
|
||||
example = "/run/keys/mediawiki-password";
|
||||
};
|
||||
|
||||
passwordSender = mkOption {
|
||||
type = types.str;
|
||||
default =
|
||||
if cfg.webserver == "apache" then
|
||||
if cfg.httpd.virtualHost.adminAddr != null then
|
||||
cfg.httpd.virtualHost.adminAddr
|
||||
else
|
||||
config.services.httpd.adminAddr else "root@localhost";
|
||||
defaultText = literalExpression ''
|
||||
if cfg.webserver == "apache" then
|
||||
if cfg.httpd.virtualHost.adminAddr != null then
|
||||
cfg.httpd.virtualHost.adminAddr
|
||||
else
|
||||
config.services.httpd.adminAddr else "root@localhost"
|
||||
'';
|
||||
description = lib.mdDoc "Contact address for password reset.";
|
||||
};
|
||||
|
||||
skins = mkOption {
|
||||
default = {};
|
||||
type = types.attrsOf types.path;
|
||||
@ -241,6 +285,12 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
webserver = mkOption {
|
||||
type = types.enum [ "apache" "none" ];
|
||||
default = "apache";
|
||||
description = lib.mdDoc "Webserver to use.";
|
||||
};
|
||||
|
||||
database = {
|
||||
type = mkOption {
|
||||
type = types.enum [ "mysql" "postgres" "sqlite" "mssql" "oracle" ];
|
||||
@ -318,7 +368,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
virtualHost = mkOption {
|
||||
httpd.virtualHost = mkOption {
|
||||
type = types.submodule (import ../web-servers/apache-httpd/vhost-options.nix);
|
||||
example = literalExpression ''
|
||||
{
|
||||
@ -366,6 +416,10 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule [ "services" "mediawiki" "virtualHost" ] [ "services" "mediawiki" "httpd" "virtualHost" ])
|
||||
];
|
||||
|
||||
# implementation
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
@ -412,36 +466,42 @@ in
|
||||
services.phpfpm.pools.mediawiki = {
|
||||
inherit user group;
|
||||
phpEnv.MEDIAWIKI_CONFIG = "${mediawikiConfig}";
|
||||
settings = {
|
||||
settings = (if (cfg.webserver == "apache") then {
|
||||
"listen.owner" = config.services.httpd.user;
|
||||
"listen.group" = config.services.httpd.group;
|
||||
} // cfg.poolConfig;
|
||||
} else {
|
||||
"listen.owner" = user;
|
||||
"listen.group" = group;
|
||||
}) // cfg.poolConfig;
|
||||
};
|
||||
|
||||
services.httpd = {
|
||||
services.httpd = lib.mkIf (cfg.webserver == "apache") {
|
||||
enable = true;
|
||||
extraModules = [ "proxy_fcgi" ];
|
||||
virtualHosts.${cfg.virtualHost.hostName} = mkMerge [ cfg.virtualHost {
|
||||
documentRoot = mkForce "${pkg}/share/mediawiki";
|
||||
extraConfig = ''
|
||||
<Directory "${pkg}/share/mediawiki">
|
||||
<FilesMatch "\.php$">
|
||||
<If "-f %{REQUEST_FILENAME}">
|
||||
SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
|
||||
</If>
|
||||
</FilesMatch>
|
||||
virtualHosts.${cfg.httpd.virtualHost.hostName} = mkMerge [
|
||||
cfg.httpd.virtualHost
|
||||
{
|
||||
documentRoot = mkForce "${pkg}/share/mediawiki";
|
||||
extraConfig = ''
|
||||
<Directory "${pkg}/share/mediawiki">
|
||||
<FilesMatch "\.php$">
|
||||
<If "-f %{REQUEST_FILENAME}">
|
||||
SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/"
|
||||
</If>
|
||||
</FilesMatch>
|
||||
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
'' + optionalString (cfg.uploadsDir != null) ''
|
||||
Alias "/images" "${cfg.uploadsDir}"
|
||||
<Directory "${cfg.uploadsDir}">
|
||||
Require all granted
|
||||
</Directory>
|
||||
'';
|
||||
} ];
|
||||
Require all granted
|
||||
DirectoryIndex index.php
|
||||
AllowOverride All
|
||||
</Directory>
|
||||
'' + optionalString (cfg.uploadsDir != null) ''
|
||||
Alias "/images" "${cfg.uploadsDir}"
|
||||
<Directory "${cfg.uploadsDir}">
|
||||
Require all granted
|
||||
</Directory>
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
@ -489,13 +549,14 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.httpd.after = optional (cfg.database.createLocally && cfg.database.type == "mysql") "mysql.service"
|
||||
++ optional (cfg.database.createLocally && cfg.database.type == "postgres") "postgresql.service";
|
||||
systemd.services.httpd.after = optional (cfg.webserver == "apache" && cfg.database.createLocally && cfg.database.type == "mysql") "mysql.service"
|
||||
++ optional (cfg.webserver == "apache" && cfg.database.createLocally && cfg.database.type == "postgres") "postgresql.service";
|
||||
|
||||
users.users.${user} = {
|
||||
group = group;
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.${group} = {};
|
||||
|
||||
environment.systemPackages = [ mediawikiScripts ];
|
||||
};
|
||||
|
@ -7,8 +7,8 @@
|
||||
let
|
||||
shared = {
|
||||
services.mediawiki.enable = true;
|
||||
services.mediawiki.virtualHost.hostName = "localhost";
|
||||
services.mediawiki.virtualHost.adminAddr = "root@example.com";
|
||||
services.mediawiki.httpd.virtualHost.hostName = "localhost";
|
||||
services.mediawiki.httpd.virtualHost.adminAddr = "root@example.com";
|
||||
services.mediawiki.passwordFile = pkgs.writeText "password" "correcthorsebatterystaple";
|
||||
services.mediawiki.extensions = {
|
||||
Matomo = pkgs.fetchzip {
|
||||
@ -54,4 +54,24 @@ in
|
||||
assert "MediaWiki has been installed" in page
|
||||
'';
|
||||
};
|
||||
|
||||
nohttpd = testLib.makeTest {
|
||||
name = "mediawiki-nohttpd";
|
||||
nodes.machine = {
|
||||
services.mediawiki.webserver = "none";
|
||||
};
|
||||
testScript = { nodes, ... }: ''
|
||||
start_all()
|
||||
machine.wait_for_unit("phpfpm-mediawiki.service")
|
||||
env = (
|
||||
"SCRIPT_NAME=/index.php",
|
||||
"SCRIPT_FILENAME=${nodes.machine.services.mediawiki.finalPackage}/share/mediawiki/index.php",
|
||||
"REMOTE_ADDR=127.0.0.1",
|
||||
'QUERY_STRING=title=Main_Page',
|
||||
"REQUEST_METHOD=GET",
|
||||
);
|
||||
page = machine.succeed(f"{' '.join(env)} ${pkgs.fcgi}/bin/cgi-fcgi -bind -connect ${nodes.machine.services.phpfpm.pools.mediawiki.socket}")
|
||||
assert "MediaWiki has been installed" in page, f"no 'MediaWiki has been installed' in:\n{page}"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "grandorgue";
|
||||
version = "3.10.1-1";
|
||||
version = "3.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GrandOrgue";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
fetchSubmodules = true;
|
||||
sha256 = "sha256-QuOHeEgDOXvNFMfMoq0GOnmHKyMG1S8y1lgO9heMk3I=";
|
||||
sha256 = "sha256-l1KqER/vkNwgKLXIFUzHnYLw2ivGNP7hRiKhIOzn7pw=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -2,18 +2,18 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "flavours";
|
||||
version = "0.6.1";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Misterio77";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Q2YW9oFqzkmWscoE4p9E43bo1/4bQrTnd8tvPsJqJyQ=";
|
||||
hash = "sha256-48f05kIojCCANxV2rGmyXvGVqID2Wy0uh/YavR8d3XI=";
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
cargoSha256 = "sha256-IrVcd8ilWbaigGMqT+kaIW3gnE+m+Ik5IyhQ4zPlyPE=";
|
||||
cargoHash = "sha256-YeIiyyGjjXoyuQ2td393LuiyvDmLZdoWf2BGYWqynD4=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
@ -29,6 +29,6 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/Misterio77/flavours";
|
||||
changelog = "https://github.com/Misterio77/flavours/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fortuneteller2k ];
|
||||
maintainers = with maintainers; [ fortuneteller2k misterio77 ];
|
||||
};
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "palemoon-bin";
|
||||
version = "32.1.0";
|
||||
version = "32.1.1";
|
||||
|
||||
src = fetchzip {
|
||||
urls = [
|
||||
@ -27,9 +27,9 @@ stdenv.mkDerivation rec {
|
||||
"https://rm-us.palemoon.org/release/palemoon-${version}.linux-x86_64-gtk${if withGTK3 then "3" else "2"}.tar.xz"
|
||||
];
|
||||
hash = if withGTK3 then
|
||||
"sha256-2oKLkQi+NQHhEI1zsWCN8JiSsrVFefSdGcmS7v9gZoI="
|
||||
"sha256-Kre+F1AE4bC5hAODYjo+S6TUCpKk8KMnYumQWHz+epY="
|
||||
else
|
||||
"sha256-rSQuCCCvTKHcGDHS0VEyMwroZ/zD7RvaW3/K5sXefw4=";
|
||||
"sha256-LIsep7KsNhsw3zlmgltu6/4qZEWjGQbUmLqHCabSTfg=";
|
||||
};
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nvc";
|
||||
version = "1.9.1";
|
||||
version = "1.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nickg";
|
||||
repo = pname;
|
||||
rev = "r${version}";
|
||||
hash = "sha256-UeA+6RKZMttLThyAf80ONximXRJNw5mUNM+cyCDTcGM=";
|
||||
hash = "sha256-xB2COtYgbg00rrOWTbcBocRnqF5682jUG2eS7I71Ln4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "v2ray-geoip";
|
||||
version = "202304200041";
|
||||
version = "202304270044";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "v2fly";
|
||||
repo = "geoip";
|
||||
rev = "7869655f0a2c9fd81d04e091b1c2657029b6e1f9";
|
||||
sha256 = "sha256-pgQU8gLErC9zo/GtwxHC2+4svFsxkgceV3IZPovVMo4=";
|
||||
rev = "015e040dbd71ec79f57555d9c2721326e4254b34";
|
||||
sha256 = "sha256-yY+mEsnc4x6zgslpu8755tGt7I17xBB1RXdAzSLtf2U=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
@ -298,5 +298,22 @@
|
||||
"floating-panel-usedbymyself@wpism"
|
||||
]
|
||||
},
|
||||
"44": {}
|
||||
"44": {
|
||||
"applications-menu": [
|
||||
"apps-menu@gnome-shell-extensions.gcampax.github.com",
|
||||
"Applications_Menu@rmy.pobox.com"
|
||||
],
|
||||
"workspace-indicator": [
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com",
|
||||
"horizontal-workspace-indicator@tty2.io"
|
||||
],
|
||||
"clipboard-indicator": [
|
||||
"clipboard-indicator@tudmotu.com",
|
||||
"clipboard-indicator@Dieg0Js.github.io"
|
||||
],
|
||||
"virtualbox-applet": [
|
||||
"vbox-applet@gs.eros2.info",
|
||||
"vbox-applet@buba98"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -10,19 +10,23 @@
|
||||
# These are conflicts for older extensions (i.e. they don't support the latest GNOME version).
|
||||
# Make sure to move them up once they are updated
|
||||
|
||||
# ####### GNOME 43 #######
|
||||
"apps-menu@gnome-shell-extensions.gcampax.github.com" = "applications-menu";
|
||||
"Applications_Menu@rmy.pobox.com" = "frippery-applications-menu";
|
||||
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com" = "workspace-indicator";
|
||||
"horizontal-workspace-indicator@tty2.io" = "workspace-indicator-2";
|
||||
|
||||
"PersianCalendar@oxygenws.com" = "persian-calendar";
|
||||
"persian-calendar@iamrezamousavi.gmail.com" = "persian-calendar-2";
|
||||
|
||||
"clipboard-indicator@tudmotu.com" = "clipboard-indicator";
|
||||
"clipboard-indicator@Dieg0Js.github.io" = "clipboard-indicator-2";
|
||||
|
||||
"vbox-applet@gs.eros2.info" = "virtualbox-applet";
|
||||
"vbox-applet@buba98" = "virtualbox-applet-2";
|
||||
|
||||
# ####### GNOME 43 #######
|
||||
|
||||
"PersianCalendar@oxygenws.com" = "persian-calendar";
|
||||
"persian-calendar@iamrezamousavi.gmail.com" = "persian-calendar-2";
|
||||
|
||||
# DEPRECATED: Use "Caffeine" instead
|
||||
"KeepAwake@jepfa.de" = "keep-awake";
|
||||
"awake@vixalien.com" = null;
|
||||
@ -30,9 +34,6 @@
|
||||
"noannoyance@sindex.com" = "noannoyance";
|
||||
"noannoyance@daase.net" = "noannoyance-2";
|
||||
|
||||
"vbox-applet@gs.eros2.info" = "virtualbox-applet";
|
||||
"vbox-applet@buba98" = "virtualbox-applet-2";
|
||||
|
||||
"batime@martin.zurowietz.de" = "battery-time";
|
||||
"batterytime@typeof.pw" = "battery-time-2";
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,36 +1,55 @@
|
||||
{ callPackage, fetchzip, dart }:
|
||||
{ callPackage, fetchzip, dart, lib, stdenv }:
|
||||
let
|
||||
mkFlutter = { version, engineVersion, patches, dart, src }: callPackage ./flutter.nix { inherit version engineVersion patches dart src; };
|
||||
mkCustomFlutter = args: callPackage ./flutter.nix args;
|
||||
wrapFlutter = flutter: callPackage ./wrapper.nix { inherit flutter; };
|
||||
getPatches = dir:
|
||||
let files = builtins.attrNames (builtins.readDir dir);
|
||||
in map (f: dir + ("/" + f)) files;
|
||||
flutterDrv = { version, engineVersion, dartVersion, hash, dartHash, patches }: mkFlutter {
|
||||
inherit version engineVersion patches;
|
||||
dart = dart.override {
|
||||
version = dartVersion;
|
||||
sources = {
|
||||
"${dartVersion}-x86_64-linux" = fetchzip {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
|
||||
sha256 = dartHash.x86_64-linux;
|
||||
};
|
||||
"${dartVersion}-aarch64-linux" = fetchzip {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
|
||||
sha256 = dartHash.aarch64-linux;
|
||||
mkFlutter = { version, engineVersion, dartVersion, hash, dartHash, patches }:
|
||||
let args = {
|
||||
inherit version engineVersion patches;
|
||||
|
||||
dart = dart.override {
|
||||
version = dartVersion;
|
||||
sources = {
|
||||
"${dartVersion}-x86_64-linux" = fetchzip {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-x64-release.zip";
|
||||
sha256 = dartHash.x86_64-linux;
|
||||
};
|
||||
"${dartVersion}-aarch64-linux" = fetchzip {
|
||||
url = "https://storage.googleapis.com/dart-archive/channels/stable/release/${dartVersion}/sdk/dartsdk-linux-arm64-release.zip";
|
||||
sha256 = dartHash.aarch64-linux;
|
||||
};
|
||||
};
|
||||
};
|
||||
src = fetchzip {
|
||||
url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${version}-stable.tar.xz";
|
||||
sha256 = hash;
|
||||
};
|
||||
}; in (mkCustomFlutter args).overrideAttrs (prev: next: {
|
||||
passthru = next.passthru // rec {
|
||||
inherit wrapFlutter mkCustomFlutter mkFlutter;
|
||||
buildFlutterApplication = callPackage ../../../build-support/flutter {
|
||||
# Package a minimal version of Flutter that only uses Linux desktop release artifacts.
|
||||
flutter = wrapFlutter
|
||||
(mkCustomFlutter (args // {
|
||||
includedEngineArtifacts = {
|
||||
common = [ "flutter_patched_sdk_product" ];
|
||||
platform.linux = lib.optionals stdenv.hostPlatform.isLinux
|
||||
(lib.genAttrs ((lib.optional stdenv.hostPlatform.isx86_64 "x64") ++ (lib.optional stdenv.hostPlatform.isAarch64 "arm64"))
|
||||
(architecture: [ "release" ]));
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
src = fetchzip {
|
||||
url = "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${version}-stable.tar.xz";
|
||||
sha256 = hash;
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
flutter2Patches = getPatches ./patches/flutter2;
|
||||
flutter3Patches = getPatches ./patches/flutter3;
|
||||
in
|
||||
{
|
||||
inherit mkFlutter wrapFlutter flutterDrv flutter3Patches flutter2Patches;
|
||||
stable = flutterDrv {
|
||||
inherit wrapFlutter;
|
||||
stable = mkFlutter {
|
||||
version = "3.7.12";
|
||||
engineVersion = "1a65d409c7a1438a34d21b60bf30a6fd5db59314";
|
||||
dartVersion = "2.19.6";
|
||||
@ -42,7 +61,7 @@ in
|
||||
patches = flutter3Patches;
|
||||
};
|
||||
|
||||
v2 = flutterDrv {
|
||||
v2 = mkFlutter {
|
||||
version = "2.10.5";
|
||||
engineVersion = "57d3bac3dd5cb5b0e464ab70e7bc8a0d8cf083ab";
|
||||
dartVersion = "2.16.2";
|
||||
|
@ -25,7 +25,7 @@
|
||||
, lndir
|
||||
, git
|
||||
, which
|
||||
}@args:
|
||||
}:
|
||||
|
||||
let
|
||||
engineArtifactDirectory =
|
||||
@ -160,24 +160,10 @@ let
|
||||
|
||||
passthru = {
|
||||
inherit dart;
|
||||
|
||||
# The derivation containing the original Flutter SDK files.
|
||||
# When other derivations wrap this one, any unmodified files
|
||||
# found here should be included as-is, for tooling compatibility.
|
||||
sdk = unwrapped;
|
||||
buildFlutterApplication = callPackage ../../../build-support/flutter {
|
||||
# Package a minimal version of Flutter that only uses Linux desktop release artifacts.
|
||||
flutter = callPackage ./wrapper.nix {
|
||||
flutter = callPackage ./flutter.nix (args // {
|
||||
includedEngineArtifacts = {
|
||||
common = [ "flutter_patched_sdk_product" ];
|
||||
platform.linux = lib.optionals stdenv.hostPlatform.isLinux
|
||||
(lib.genAttrs ((lib.optional stdenv.hostPlatform.isx86_64 "x64") ++ (lib.optional stdenv.hostPlatform.isAarch64 "arm64"))
|
||||
(architecture: [ "release" ]));
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -5,8 +5,7 @@
|
||||
, gcc
|
||||
, cabal-install
|
||||
, runCommand
|
||||
, lib
|
||||
, stdenv
|
||||
, fetchpatch
|
||||
|
||||
, ghc
|
||||
, happy
|
||||
@ -28,7 +27,14 @@ runCommand "configured-ghcjs-src" {
|
||||
cabal-install
|
||||
gcc
|
||||
];
|
||||
|
||||
inherit ghcjsSrc;
|
||||
|
||||
ctimePatch = fetchpatch {
|
||||
name = "ghcjs-base-ctime-64-bit.patch";
|
||||
url = "https://github.com/ghcjs/ghcjs/commit/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c.patch";
|
||||
hash = "sha256-zZ3l8/5gbIGtvu0s2Xl92fEDhkhJ2c2w+5Ql5qkvr3s=";
|
||||
};
|
||||
} ''
|
||||
export HOME=$(pwd)
|
||||
mkdir $HOME/.cabal
|
||||
@ -37,6 +43,8 @@ runCommand "configured-ghcjs-src" {
|
||||
chmod -R +w "$out"
|
||||
cd "$out"
|
||||
|
||||
patch -p1 -i "$ctimePatch"
|
||||
|
||||
# TODO: Find a better way to avoid impure version numbers
|
||||
sed -i 's/RELEASE=NO/RELEASE=YES/' ghc/configure.ac
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, unstableGitUpdater
|
||||
, cmake
|
||||
, callPackage
|
||||
|
||||
@ -9,7 +8,7 @@
|
||||
, xorg
|
||||
|
||||
# Darwin deps
|
||||
, cf-private
|
||||
, CoreFoundation
|
||||
, Cocoa
|
||||
, AudioToolbox
|
||||
, OpenGL
|
||||
@ -31,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = if stdenv.isDarwin
|
||||
then [
|
||||
cf-private
|
||||
CoreFoundation
|
||||
Cocoa
|
||||
AudioToolbox
|
||||
OpenGL
|
||||
|
@ -25,6 +25,12 @@ stdenv.mkDerivation rec {
|
||||
url = "https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
|
||||
sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
|
||||
})
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
|
||||
# https://github.com/abseil/abseil-cpp/pull/1110
|
||||
(fetchpatch {
|
||||
url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
|
||||
sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jffi";
|
||||
version = "1.3.10";
|
||||
version = "1.3.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jnr";
|
||||
repo = "jffi";
|
||||
rev = "jffi-${version}";
|
||||
sha256 = "sha256-2Y0l1bDr/f3vxwRjDX62xeC5pUmIbk4XH5prh8c91As=";
|
||||
sha256 = "sha256-fZnZH2j/IXbfsJkJG8s2ArOrWwVE2kgvSREVaSVoDyo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ jdk ant texinfo pkg-config ];
|
||||
|
@ -11,14 +11,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pinocchio";
|
||||
version = "2.6.17";
|
||||
version = "2.6.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stack-of-tasks";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-P/2cwFMtVaxT+qt2RDa7qjUIFjDBJ7U6epRFahOKux4=";
|
||||
hash = "sha256-HkNCZpdGi2hJc2+/8XwLrrJcibpyA7fQN1vNuZ9jyhw=";
|
||||
};
|
||||
|
||||
# error: use of undeclared identifier '__sincos'
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "desktop-notifier";
|
||||
version = "3.4.3";
|
||||
version = "3.5.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
owner = "SamSchott";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-V5CggWp9G0/XoQhArrY3LCvfkF2SymORDWdJGjsr7yI=";
|
||||
hash = "sha256-l7Ykja1LDtbRt65wI1LjGkxxs3oMvN3bKqveGNZ5Fgc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -4,6 +4,7 @@
|
||||
, enaml
|
||||
, pyqtgraph
|
||||
, pythonocc-core
|
||||
, typing-extensions
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -22,6 +23,7 @@ buildPythonPackage rec {
|
||||
# Until https://github.com/inkcut/inkcut/issues/105 perhaps
|
||||
pyqtgraph
|
||||
pythonocc-core
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
# qt_occ_viewer test requires enaml.qt.QtOpenGL which got dropped somewhere
|
||||
|
@ -14,14 +14,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "opensearch-py";
|
||||
version = "2.1.1";
|
||||
version = "2.2.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "opensearch-project";
|
||||
repo = "opensearch-py";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-uJ6fdRPDK76qKHE4E6dI01vKgvfqbc6A1RCwnOtuOTY=";
|
||||
hash = "sha256-dMVwr0ghTH4Dm2HnfDHb0r/T3COcekeIjT4BBcmGLsc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pysigma";
|
||||
version = "0.9.7";
|
||||
version = "0.9.8";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
owner = "SigmaHQ";
|
||||
repo = "pySigma";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-zQAx7PjlcjBg2EUfDqG96QS/E5xRu7EfgQUZLuKpvq0=";
|
||||
hash = "sha256-lamd33oHWNhTZ5XGE7g8ztV6Mgh+Gjh2KfoyFjkGmXc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -17,13 +17,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pythonocc-core";
|
||||
version = "7.7.0";
|
||||
version = "7.6.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tpaviot";
|
||||
repo = "pythonocc-core";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-YybpwiCeBnwZfYS6ZxUbycHFn2DlqYxcNMylRN5ihFM=";
|
||||
hash = "sha256-45pqPQ07KYlpFwJSAYVHbzuqDQTbAvPpxReal52DCzU=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-udeps";
|
||||
version = "0.1.35";
|
||||
version = "0.1.36";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "est31";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-FVOrF90kgcxWmeyxBnmGyOwb1aycAQelqskOYYpAXhI=";
|
||||
sha256 = "sha256-7sfUA1YQrYlgnzr+uTXcEwWMN/rUkwIzNvzN8YQ6HOo=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-JTRel8bOJbBdeDyJjO/xc+ZUQ1EunMPlyWeFrWrsVEI=";
|
||||
cargoHash = "sha256-Q5sLn9JrspnxMPi8zoP3i/G92PP1zPVCKlQXdTiSXJM=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
68
pkgs/games/marble-marcher-ce/default.nix
Normal file
68
pkgs/games/marble-marcher-ce/default.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
, copyDesktopItems
|
||||
, fetchFromGitHub
|
||||
, sfml
|
||||
, anttweakbar
|
||||
, glm
|
||||
, eigen
|
||||
, glew
|
||||
, cmake
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "marble-marcher-ce";
|
||||
version = "1.4.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "WAUthethird";
|
||||
repo = "Marble-Marcher-Community-Edition";
|
||||
rev = version;
|
||||
hash = "sha256-m5i/Q4k5S4wcojHqMYS7e1W/Ph7q/95j3oOK2xbrHSk=";
|
||||
};
|
||||
|
||||
buildInputs = [ sfml anttweakbar glm eigen glew ];
|
||||
nativeBuildInputs = [ cmake makeWrapper copyDesktopItems ];
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
prePatch = ''
|
||||
# the path /home/MMCE is always added to DESTDIR
|
||||
# we change this to a more sensible path
|
||||
# see https://github.com/WAUthethird/Marble-Marcher-Community-Edition/issues/23
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace '/home/MMCE' '/share/MMCE'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir $out/bin
|
||||
mkdir -p $out/share/icons/
|
||||
# The executable has to be run from the same directory the assets are in
|
||||
makeWrapper $out/share/MMCE/MarbleMarcher $out/bin/${pname} --chdir $out/share/MMCE
|
||||
ln -s $out/share/MMCE/images/MarbleMarcher.png $out/share/icons/${pname}.png
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = pname;
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
desktopName = pname;
|
||||
comment = meta.description;
|
||||
categories = [ "Game" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A fractal physics game.";
|
||||
longDescription = "A community-developed version of the original Marble Marcher - a fractal physics game.";
|
||||
homepage = "https://michaelmoroz.itch.io/mmce";
|
||||
license = with licenses; [
|
||||
gpl2Plus # Code
|
||||
cc-by-30 # Assets
|
||||
ofl # Fonts
|
||||
];
|
||||
maintainers = with maintainers; [ rampoina ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
{ lib, stdenv, fetchFromGitHub, installShellFiles, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.12";
|
||||
version = "1.13";
|
||||
pname = "beanstalkd";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kr";
|
||||
repo = "beanstalkd";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-HChpVZ02l08CObrb4+ZEjBiXeQMMYi6zhSWUTDxuEao=";
|
||||
hash = "sha256-xoudhPad4diGGE8iZaY1/4LiENlKT2dYcIR6wlQdlTU=";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
@ -145,13 +145,13 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "inspircd";
|
||||
version = "3.15.0";
|
||||
version = "3.16.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-4n9Tj+xTmPRPisiFjlyx7kYfReonIxoCWu18XWfEXY0=";
|
||||
sha256 = "sha256-TKjUgy8S76gn9a9hbrWehb6BGI+dSFn1gYc0MCppyJk=";
|
||||
};
|
||||
|
||||
outputs = [ "bin" "lib" "man" "doc" "out" ];
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "asap";
|
||||
version = "5.2.0";
|
||||
version = "5.3.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "mirror://sourceforge/project/asap/asap/${version}/asap-${version}.tar.gz";
|
||||
sha256 = "1riwfds5ipgh19i3ibsyqhxlh70xix9452y4wqih9xdkixmxqbqm";
|
||||
sha256 = "sha256-ioEshlPE8eUcLxNkIl0lxnczMNAYRcJN8KGN6OansjY=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
@ -6,11 +6,11 @@
|
||||
|
||||
let
|
||||
pname = "nrfconnect";
|
||||
version = "3.11.1";
|
||||
version = "4.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/desktop-software/nrf-connect-for-desktop/${lib.versions.major version}-${lib.versions.minor version}-${lib.versions.patch version}/nrfconnect-${version}-x86_64.appimage";
|
||||
sha256 = "sha256-Q6QAFqTCFEcZBIlH9KaO4oAYiwCExvJ3h1PBtlGbhhA=";
|
||||
sha256 = "sha256-Mh4DrXn3DS5qOz3109lmXyFn28WenG6ZSvqFnUuc+rw=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
|
@ -20,86 +20,18 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "netatalk";
|
||||
version = "3.1.13";
|
||||
version = "3.1.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/netatalk/netatalk/netatalk-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-ia2mvP4bOa2U9YwjZlTR2UTyZFw+femLM3TgvTfV4F0=";
|
||||
hash = "sha256-2NSlzA/Yaw2Q4BfWTB9GI+jNv72lcPxCOt4RUak9GfU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./000-no-suid.patch
|
||||
./001-omit-localstatedir-creation.patch
|
||||
(fetchpatch {
|
||||
name = "make-afpstats-python3-compatible.patch";
|
||||
url = "https://github.com/Netatalk/Netatalk/commit/916b515705cf7ba28dc53d13202811c6e1fe6a9e.patch";
|
||||
sha256 = "sha256-DAABpYjQPJLsQBhmtP30gA357w0Qn+AsnFgAeyDC/Rg=";
|
||||
})
|
||||
];
|
||||
|
||||
freeBSDPatches = [
|
||||
# https://bugs.freebsd.org/263123
|
||||
(fetchpatch {
|
||||
name = "patch-etc_afpd_directory.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-etc_afpd_directory.c";
|
||||
sha256 = "sha256-07YAJs+EtqGcFXbYHDLbILved1Ebtd8ukQepvzy6et0=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-etc_afpd_file.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-etc_afpd_file.c";
|
||||
sha256 = "sha256-T1WTNa2G6wxKtvMa/MCX3Vx6XZBHtU6w3enkdGuIWus=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-etc_afpd_volume.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-etc_afpd_volume.c";
|
||||
sha256 = "sha256-NOZNZGzA0hxrNkoLTvN64h40yApPbMH4qIfBTpQoI0s=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-etc_cnid__dbd_cmd__dbd__scanvol.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-etc_cnid__dbd_cmd__dbd__scanvol.c";
|
||||
sha256 = "sha256-5QV+tQDo8/XeKwH/e5+Ne+kEOl2uvRDbHMaWysIB6YU=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-libatalk_adouble_ad__attr.c";
|
||||
url =
|
||||
"https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-libatalk_adouble_ad__attr.c";
|
||||
sha256 = "sha256-Ose6BdilwBOmoYpm8Jat1B3biOXJj4y3U4T49zE0G7Y=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-libatalk_adouble_ad__conv.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-libatalk_adouble_ad__conv.c";
|
||||
sha256 = "sha256-T27WlKVXosv4bX5Gek2bR2cVDYEee5qrH4mnL9ghbP8=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-libatalk_adouble_ad__date.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-libatalk_adouble_ad__date.c";
|
||||
sha256 = "sha256-fkW5A+7R5fT3bukRfZaOwFo7AsyPaYajc1hIlDMZMnc=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-libatalk_adouble_ad__flush.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-libatalk_adouble_ad__flush.c";
|
||||
sha256 = "sha256-k2zTx35tAlsFHym83bZGoWXRomwFV9xT3r2fzr3Zvbk=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "patch-libatalk_adouble_ad__open.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-libatalk_adouble_ad__open.c";
|
||||
sha256 = "sha256-uV4wwft2IH54+4k5YR+Gz/BpRZBanxX/Ukp8BkohInU=";
|
||||
})
|
||||
# https://bugs.freebsd.org/251203
|
||||
(fetchpatch {
|
||||
name = "patch-libatalk_vfs_extattr.c";
|
||||
url = "https://cgit.freebsd.org/ports/plain/net/netatalk3/files/patch-libatalk_vfs_extattr.c";
|
||||
sha256 = "sha256-lFWF0Qo8PJv7QKvnMn0Fc9Ruzb+FTEWgOMpxc789jWs=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# freeBSD patches are -p0
|
||||
for i in $freeBSDPatches ; do
|
||||
patch -p0 < $i
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
@ -123,27 +55,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--with-bdb=${db.dev}"
|
||||
"--with-ssl-dir=${openssl.dev}"
|
||||
"--with-lockfile=/run/lock/netatalk"
|
||||
"--with-libevent=${libevent.dev}"
|
||||
"--localstatedir=/var/lib"
|
||||
];
|
||||
|
||||
# Expose librpcsvc to the linker for afpd
|
||||
# Fixes errors that showed up when closure-size was merged:
|
||||
# afpd-nfsquota.o: In function `callaurpc':
|
||||
# netatalk-3.1.7/etc/afpd/nfsquota.c:78: undefined reference to `xdr_getquota_args'
|
||||
# netatalk-3.1.7/etc/afpd/nfsquota.c:78: undefined reference to `xdr_getquota_rslt'
|
||||
postConfigure = ''
|
||||
${ed}/bin/ed -v etc/afpd/Makefile << EOF
|
||||
/^afpd_LDADD
|
||||
/am__append_2
|
||||
a
|
||||
${libtirpc}/lib/libtirpc.so \\
|
||||
.
|
||||
w
|
||||
EOF
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
sed -i -e "s%/usr/bin/env python%${python3}/bin/python3%" $out/bin/afpstats
|
||||
buildPythonPath ${python3.pkgs.dbus-python}
|
||||
patchPythonScript $out/bin/afpstats
|
||||
'';
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "panoply";
|
||||
version = "5.2.5";
|
||||
version = "5.2.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.giss.nasa.gov/tools/panoply/download/PanoplyJ-${version}.tgz";
|
||||
sha256 = "sha256-FzLL4FCAT9iZ6YFlzc+D5LPg89L/s9dIum/DoFe61Es=";
|
||||
sha256 = "sha256-C/FMR276qx7yo7UaZ3a794B3mDy1/mrrZiua2eaIoxg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
@ -3,6 +3,7 @@
|
||||
, fetchurl
|
||||
, substituteAll
|
||||
, openfortivpn
|
||||
, autoreconfHook
|
||||
, gettext
|
||||
, pkg-config
|
||||
, file
|
||||
@ -33,9 +34,11 @@ stdenv.mkDerivation rec {
|
||||
src = ./fix-paths.patch;
|
||||
inherit openfortivpn;
|
||||
})
|
||||
./support-ppp-2.5.0.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
gettext
|
||||
pkg-config
|
||||
file
|
||||
|
@ -0,0 +1,340 @@
|
||||
From 084ef529c5fb816927ca54866f66b340265aa9f6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
|
||||
Date: Sat, 4 Mar 2023 21:20:43 +0000
|
||||
Subject: [PATCH] Adding support for compiling against pppd-2.5.0 (or master
|
||||
branch)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
|
||||
---
|
||||
Makefile.am | 5 +-
|
||||
configure.ac | 37 +++++++-
|
||||
src/nm-fortisslvpn-pppd-compat.h | 93 +++++++++++++++++++
|
||||
src/nm-fortisslvpn-pppd-plugin.c | 24 ++---
|
||||
...-status.h => nm-fortisslvpn-pppd-status.h} | 0
|
||||
src/nm-fortisslvpn-service.c | 2 +-
|
||||
6 files changed, 145 insertions(+), 16 deletions(-)
|
||||
create mode 100644 src/nm-fortisslvpn-pppd-compat.h
|
||||
rename src/{nm-ppp-status.h => nm-fortisslvpn-pppd-status.h} (100%)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index b2e5533..e1e5ec9 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -81,7 +81,7 @@ libexec_PROGRAMS += src/nm-fortisslvpn-service
|
||||
src_nm_fortisslvpn_service_SOURCES = \
|
||||
shared/nm-utils/nm-shared-utils.c \
|
||||
shared/nm-utils/nm-shared-utils.h \
|
||||
- src/nm-ppp-status.h \
|
||||
+ src/nm-fortisslvpn-pppd-status.h \
|
||||
src/nm-fortisslvpn-service.h \
|
||||
src/nm-fortisslvpn-service.c \
|
||||
shared/nm-fortissl-properties.c \
|
||||
@@ -106,7 +106,8 @@ src_nm_fortisslvpn_pppd_plugin_la_SOURCES = \
|
||||
shared/nm-utils/nm-shared-utils.c \
|
||||
shared/nm-utils/nm-shared-utils.h \
|
||||
src/nm-fortisslvpn-pppd-plugin.c \
|
||||
- src/nm-ppp-status.h
|
||||
+ src/nm-fortisslvpn-pppd-compat.h \
|
||||
+ src/nm-fortisslvpn-pppd-status.h
|
||||
nodist_src_nm_fortisslvpn_pppd_plugin_la_SOURCES = \
|
||||
src/nm-fortisslvpn-pppd-service-dbus.h
|
||||
src_nm_fortisslvpn_pppd_plugin_la_CPPFLAGS = $(src_cppflags)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a998707..877493e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -19,7 +19,10 @@ AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
+AC_PROG_CPP
|
||||
+AC_PROG_EGREP
|
||||
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
|
||||
+PKG_PROG_PKG_CONFIG()
|
||||
|
||||
AC_GNU_SOURCE
|
||||
|
||||
@@ -37,20 +40,50 @@ dnl
|
||||
dnl Required headers
|
||||
dnl
|
||||
AC_HEADER_STDC
|
||||
-AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
|
||||
+AC_CHECK_HEADERS(fcntl.h paths.h stdarg.h stdbool.h sys/ioctl.h sys/time.h syslog.h unistd.h)
|
||||
|
||||
AC_CHECK_HEADERS(pppd/pppd.h,,
|
||||
AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.))
|
||||
|
||||
+dnl
|
||||
+dnl Check the presense of other pppd/*.h files
|
||||
+AC_CHECK_HEADERS([
|
||||
+ pppd/chap.h
|
||||
+ pppd/chap-new.h
|
||||
+ pppd/chap_ms.h
|
||||
+ ])
|
||||
+
|
||||
+dnl
|
||||
+dnl Versions >= 2.5.0 will have pkg-config support
|
||||
+PKG_CHECK_EXISTS([pppd],
|
||||
+ [AS_VAR_SET([pppd_pkgconfig_support],[yes])])
|
||||
+
|
||||
+dnl
|
||||
+dnl Get the version of pppd using pkg-config, assume 2.4.9 if not present
|
||||
+PPPD_VERSION=2.4.5
|
||||
+if test x"$pppd_pkgconfig_support" = xyes; then
|
||||
+ PPPD_VERSION=`$PKG_CONFIG --modversion pppd`
|
||||
+fi
|
||||
+
|
||||
+
|
||||
AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
|
||||
|
||||
if test -n "$with_pppd_plugin_dir" ; then
|
||||
PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
|
||||
else
|
||||
- PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5"
|
||||
+ PPPD_PLUGIN_DIR="${libdir}/pppd/$PPPD_VERSION"
|
||||
fi
|
||||
AC_SUBST(PPPD_PLUGIN_DIR)
|
||||
|
||||
+dnl The version of pppd dictates what code can be included, i.e. enable use of
|
||||
+dnl #if WITH_PPP_VERSION >= PPP_VERSION(2,5,0) in the code
|
||||
+AC_DEFINE_UNQUOTED([PPP_VERSION(x,y,z)],
|
||||
+ [((x & 0xFF) << 16 | (y & 0xFF) << 8 | (z & 0xFF) << 0)],
|
||||
+ [Macro to help determine the particular version of pppd])
|
||||
+PPP_VERSION=$(echo $PPPD_VERSION | sed -e "s/\./\,/g")
|
||||
+AC_DEFINE_UNQUOTED(WITH_PPP_VERSION, PPP_VERSION($PPP_VERSION),
|
||||
+ [The real version of pppd represented as an int])
|
||||
+
|
||||
dnl
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
dnl
|
||||
diff --git a/src/nm-fortisslvpn-pppd-compat.h b/src/nm-fortisslvpn-pppd-compat.h
|
||||
new file mode 100644
|
||||
index 0000000..9a02908
|
||||
--- /dev/null
|
||||
+++ b/src/nm-fortisslvpn-pppd-compat.h
|
||||
@@ -0,0 +1,93 @@
|
||||
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
+/* nm-sstp-service - sstp (and other pppd) integration with NetworkManager
|
||||
+ *
|
||||
+ * Copyright (C) Eivind Næss, eivnaes@yahoo.com
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along
|
||||
+ * with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifndef __NM_FORTISSLVPN_PPPD_COMPAT_H__
|
||||
+#define __NM_FORTISSLVPN_PPPD_COMPAT_H__
|
||||
+
|
||||
+#define INET6 1
|
||||
+
|
||||
+// PPP < 2.5.0 defines and exports VERSION which overlaps with current package VERSION define.
|
||||
+// this silly macro magic is to work around that.
|
||||
+
|
||||
+#undef VERSION
|
||||
+#include <pppd/pppd.h>
|
||||
+
|
||||
+#ifndef PPPD_VERSION
|
||||
+#define PPPD_VERSION VERSION
|
||||
+#endif
|
||||
+
|
||||
+#include <pppd/fsm.h>
|
||||
+#include <pppd/ccp.h>
|
||||
+#include <pppd/eui64.h>
|
||||
+#include <pppd/ipcp.h>
|
||||
+#include <pppd/ipv6cp.h>
|
||||
+#include <pppd/eap.h>
|
||||
+#include <pppd/upap.h>
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_H
|
||||
+ #include <pppd/chap.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_NEW_H
|
||||
+ #include <pppd/chap-new.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef HAVE_PPPD_CHAP_MS_H
|
||||
+ #include <pppd/chap_ms.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPP_PROTO_CHAP
|
||||
+#define PPP_PROTO_CHAP 0xc223
|
||||
+#endif
|
||||
+
|
||||
+#ifndef PPP_PROTO_EAP
|
||||
+#define PPP_PROTO_EAP 0xc227
|
||||
+#endif
|
||||
+
|
||||
+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
|
||||
+
|
||||
+static inline bool debug_on(void)
|
||||
+{
|
||||
+ return debug;
|
||||
+}
|
||||
+
|
||||
+static inline const char *ppp_ipparam(void)
|
||||
+{
|
||||
+ return ipparam;
|
||||
+}
|
||||
+
|
||||
+static inline int ppp_ifunit(void)
|
||||
+{
|
||||
+ return ifunit;
|
||||
+}
|
||||
+
|
||||
+static inline const char *ppp_ifname(void)
|
||||
+{
|
||||
+ return ifname;
|
||||
+}
|
||||
+
|
||||
+static inline int ppp_get_mtu(int idx)
|
||||
+{
|
||||
+ return netif_get_mtu(idx);
|
||||
+}
|
||||
+
|
||||
+#endif // #if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
|
||||
+#endif // #ifdef __NM_FORTISSLVPN_PPPD_COMPAT_H__
|
||||
diff --git a/src/nm-fortisslvpn-pppd-plugin.c b/src/nm-fortisslvpn-pppd-plugin.c
|
||||
index f2ad262..c2efb9a 100644
|
||||
--- a/src/nm-fortisslvpn-pppd-plugin.c
|
||||
+++ b/src/nm-fortisslvpn-pppd-plugin.c
|
||||
@@ -23,12 +23,6 @@
|
||||
#define ___CONFIG_H__
|
||||
#include <config.h>
|
||||
|
||||
-#include <pppd/pppd.h>
|
||||
-#include <pppd/fsm.h>
|
||||
-#include <pppd/ipcp.h>
|
||||
-
|
||||
-#include "nm-default.h"
|
||||
-
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -42,10 +36,12 @@
|
||||
#include <grp.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
+#include "nm-fortisslvpn-pppd-status.h"
|
||||
+#include "nm-fortisslvpn-pppd-compat.h"
|
||||
#include "nm-fortisslvpn-pppd-service-dbus.h"
|
||||
-#include "nm-fortisslvpn-service.h"
|
||||
-#include "nm-ppp-status.h"
|
||||
|
||||
+#include "nm-default.h"
|
||||
+#include "nm-fortisslvpn-service.h"
|
||||
#include "nm-utils/nm-shared-utils.h"
|
||||
#include "nm-utils/nm-vpn-plugin-macros.h"
|
||||
|
||||
@@ -80,7 +76,7 @@ static struct {
|
||||
|
||||
int plugin_init (void);
|
||||
|
||||
-char pppd_version[] = VERSION;
|
||||
+char pppd_version[] = PPPD_VERSION;
|
||||
|
||||
static void
|
||||
chroot_sandbox (void)
|
||||
@@ -296,7 +292,7 @@ get_ip4_routes (in_addr_t ouraddr)
|
||||
static void
|
||||
nm_ip_up (void *data, int arg)
|
||||
{
|
||||
- guint32 pppd_made_up_address = htonl (0x0a404040 + ifunit);
|
||||
+ guint32 pppd_made_up_address = htonl (0x0a404040 + ppp_ifunit());
|
||||
ipcp_options opts = ipcp_gotoptions[0];
|
||||
ipcp_options peer_opts = ipcp_hisoptions[0];
|
||||
GVariantBuilder builder;
|
||||
@@ -317,7 +313,7 @@ nm_ip_up (void *data, int arg)
|
||||
|
||||
g_variant_builder_add (&builder, "{sv}",
|
||||
NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV,
|
||||
- g_variant_new_string (ifname));
|
||||
+ g_variant_new_string (ppp_ifname()));
|
||||
|
||||
str = g_getenv ("VPN_GATEWAY");
|
||||
if (str) {
|
||||
@@ -442,8 +438,14 @@ plugin_init (void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+#if WITH_PPP_VERSION < PPP_VERSION(2,5,0)
|
||||
add_notifier (&phasechange, nm_phasechange, NULL);
|
||||
add_notifier (&ip_up_notifier, nm_ip_up, NULL);
|
||||
add_notifier (&exitnotify, nm_exit_notify, NULL);
|
||||
+#else
|
||||
+ ppp_add_notify (NF_PHASE_CHANGE, nm_phasechange, NULL);
|
||||
+ ppp_add_notify (NF_IP_UP, nm_ip_up, NULL);
|
||||
+ ppp_add_notify (NF_EXIT, nm_exit_notify, NULL);
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/nm-ppp-status.h b/src/nm-fortisslvpn-pppd-status.h
|
||||
similarity index 100%
|
||||
rename from src/nm-ppp-status.h
|
||||
rename to src/nm-fortisslvpn-pppd-status.h
|
||||
diff --git a/src/nm-fortisslvpn-service.c b/src/nm-fortisslvpn-service.c
|
||||
index 6c340d0..a8483c2 100644
|
||||
--- a/src/nm-fortisslvpn-service.c
|
||||
+++ b/src/nm-fortisslvpn-service.c
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#include "nm-fortissl-properties.h"
|
||||
-#include "nm-ppp-status.h"
|
||||
+#include "nm-fortisslvpn-pppd-status.h"
|
||||
#include "nm-fortisslvpn-pppd-service-dbus.h"
|
||||
#include "nm-utils/nm-shared-utils.h"
|
||||
#include "nm-utils/nm-vpn-plugin-macros.h"
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
|
||||
From 8773f772d39f8eee6edc1fd2e5437c754ed41e1e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
|
||||
Date: Sat, 4 Mar 2023 21:29:54 +0000
|
||||
Subject: [PATCH] Fixing configure.ac from previous change
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
|
||||
---
|
||||
configure.ac | 6 +-----
|
||||
1 file changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 877493e..a5b4abb 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -47,11 +47,7 @@ AC_CHECK_HEADERS(pppd/pppd.h,,
|
||||
|
||||
dnl
|
||||
dnl Check the presense of other pppd/*.h files
|
||||
-AC_CHECK_HEADERS([
|
||||
- pppd/chap.h
|
||||
- pppd/chap-new.h
|
||||
- pppd/chap_ms.h
|
||||
- ])
|
||||
+AC_CHECK_HEADERS(pppd/chap.h pppd/chap-new.h pppd/chap_ms.h)
|
||||
|
||||
dnl
|
||||
dnl Versions >= 2.5.0 will have pkg-config support
|
||||
--
|
||||
GitLab
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromGitLab
|
||||
, autoreconfHook
|
||||
, file
|
||||
, glib
|
||||
, gnome
|
||||
@ -19,15 +20,19 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "NetworkManager-sstp";
|
||||
version = "1.3.1";
|
||||
version = "unstable-2023-03-09";
|
||||
name = "${pname}${lib.optionalString withGnome "-gnome"}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "fQMSawiaCk/2ZeMHVVcM7PaFEKbP7bUS9Lh+htrGHX0=";
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "GNOME";
|
||||
repo = "network-manager-sstp";
|
||||
rev = "852db07dc7d19c37e398d831410bd94c8659a210";
|
||||
hash = "sha256-DxgcuTza2G5a7F2mBtDaEuynu7F1Ex9pnAESAjyoRq8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
file
|
||||
gettext
|
||||
pkg-config
|
||||
@ -54,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [
|
||||
"--with-gnome=${if withGnome then "yes" else "no"}"
|
||||
"--with-gtk4=${if withGnome then "yes" else "no"}"
|
||||
"--with-pppd-plugin-dir=$(out)/lib/pppd/2.5.0"
|
||||
"--enable-absolute-paths"
|
||||
];
|
||||
|
||||
|
@ -20,16 +20,16 @@ let
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "xray";
|
||||
version = "1.8.0";
|
||||
version = "1.8.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "XTLS";
|
||||
repo = "Xray-core";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-YonO856ax0RTkM3SwgsS/1HxijkaV5XUXvWYDL3NyvM=";
|
||||
sha256 = "sha256-yvfBrMQPvIzuLT9wAvQ9QdAIfjzFt7B+L4N8q9SwufA=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-lWeYuyzW8bR51LrFguOxOyNzihMuFF6MkFeGuNv8Vyc=";
|
||||
vendorSha256 = "sha256-mr07woy6QXRz8iM4Yzl1Wv5+jlG7ws/fDAnuHjNiUPc=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
|
@ -15528,9 +15528,8 @@ with pkgs;
|
||||
lizardfs = callPackage ../tools/filesystems/lizardfs { };
|
||||
|
||||
lobster = callPackage ../development/compilers/lobster {
|
||||
inherit (darwin) cf-private;
|
||||
inherit (darwin.apple_sdk.frameworks)
|
||||
Cocoa AudioToolbox OpenGL Foundation ForceFeedback;
|
||||
CoreFoundation Cocoa AudioToolbox OpenGL Foundation ForceFeedback;
|
||||
};
|
||||
|
||||
lld = llvmPackages.lld;
|
||||
@ -36304,6 +36303,8 @@ with pkgs;
|
||||
|
||||
manaplus = callPackage ../games/manaplus { stdenv = gcc11Stdenv; };
|
||||
|
||||
marble-marcher-ce = callPackage ../games/marble-marcher-ce { };
|
||||
|
||||
mars = callPackage ../games/mars { };
|
||||
|
||||
megaglest = callPackage ../games/megaglest { };
|
||||
|
@ -108,7 +108,7 @@ impure-cmds // appleSourcePackages // chooseLibs // {
|
||||
stdenv = if stdenv.isDarwin then stdenv else pkgs.libcxxStdenv;
|
||||
};
|
||||
|
||||
# TODO: remove alias.
|
||||
# TODO(@connorbaker): See https://github.com/NixOS/nixpkgs/issues/229389.
|
||||
cf-private = self.apple_sdk.frameworks.CoreFoundation;
|
||||
|
||||
DarwinTools = callPackage ../os-specific/darwin/DarwinTools { };
|
||||
|
@ -217,7 +217,6 @@ let
|
||||
perlPackages = { };
|
||||
|
||||
darwin = packagePlatforms pkgs.darwin // {
|
||||
cf-private = {};
|
||||
xcode = {};
|
||||
};
|
||||
} ));
|
||||
|
Loading…
Reference in New Issue
Block a user