Merge staging-next into staging
This commit is contained in:
commit
ac95e31c0c
74 changed files with 18884 additions and 837 deletions
|
@ -84,8 +84,8 @@ let
|
||||||
mapAttrs' mapAttrsToList attrsToList concatMapAttrs mapAttrsRecursive
|
mapAttrs' mapAttrsToList attrsToList concatMapAttrs mapAttrsRecursive
|
||||||
mapAttrsRecursiveCond genAttrs isDerivation toDerivation optionalAttrs
|
mapAttrsRecursiveCond genAttrs isDerivation toDerivation optionalAttrs
|
||||||
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
|
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil
|
||||||
recursiveUpdate matchAttrs overrideExisting showAttrPath getOutput getBin
|
recursiveUpdate matchAttrs mergeAttrsList overrideExisting showAttrPath getOutput
|
||||||
getLib getDev getMan chooseDevOutputs zipWithNames zip
|
getBin getLib getDev getMan chooseDevOutputs zipWithNames zip
|
||||||
recurseIntoAttrs dontRecurseIntoAttrs cartesianProductOfSets
|
recurseIntoAttrs dontRecurseIntoAttrs cartesianProductOfSets
|
||||||
updateManyAttrsByPath;
|
updateManyAttrsByPath;
|
||||||
inherit (self.lists) singleton forEach foldr fold foldl foldl' imap0 imap1
|
inherit (self.lists) singleton forEach foldr fold foldl foldl' imap0 imap1
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
Add files in file sets to the store to use as derivation sources.
|
Add files in file sets to the store to use as derivation sources.
|
||||||
|
|
||||||
|
- [`lib.fileset.toList`](#function-library-lib.fileset.toList):
|
||||||
|
|
||||||
|
The list of files contained in a file set.
|
||||||
|
|
||||||
Combinators:
|
Combinators:
|
||||||
- [`lib.fileset.union`](#function-library-lib.fileset.union)/[`lib.fileset.unions`](#function-library-lib.fileset.unions):
|
- [`lib.fileset.union`](#function-library-lib.fileset.union)/[`lib.fileset.unions`](#function-library-lib.fileset.unions):
|
||||||
|
|
||||||
|
@ -102,6 +106,7 @@ let
|
||||||
_coerceMany
|
_coerceMany
|
||||||
_toSourceFilter
|
_toSourceFilter
|
||||||
_fromSourceFilter
|
_fromSourceFilter
|
||||||
|
_toList
|
||||||
_unionMany
|
_unionMany
|
||||||
_fileFilter
|
_fileFilter
|
||||||
_printFileset
|
_printFileset
|
||||||
|
@ -412,6 +417,38 @@ in {
|
||||||
filter = sourceFilter;
|
filter = sourceFilter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
The list of file paths contained in the given file set.
|
||||||
|
|
||||||
|
:::{.note}
|
||||||
|
This function is strict in the entire file set.
|
||||||
|
This is in contrast with combinators [`lib.fileset.union`](#function-library-lib.fileset.union),
|
||||||
|
[`lib.fileset.intersection`](#function-library-lib.fileset.intersection) and [`lib.fileset.difference`](#function-library-lib.fileset.difference).
|
||||||
|
|
||||||
|
Thus it is recommended to call `toList` on file sets created using the combinators,
|
||||||
|
instead of doing list processing on the result of `toList`.
|
||||||
|
:::
|
||||||
|
|
||||||
|
The resulting list of files can be turned back into a file set using [`lib.fileset.unions`](#function-library-lib.fileset.unions).
|
||||||
|
|
||||||
|
Type:
|
||||||
|
toList :: FileSet -> [ Path ]
|
||||||
|
|
||||||
|
Example:
|
||||||
|
toList ./.
|
||||||
|
[ ./README.md ./Makefile ./src/main.c ./src/main.h ]
|
||||||
|
|
||||||
|
toList (difference ./. ./src)
|
||||||
|
[ ./README.md ./Makefile ]
|
||||||
|
*/
|
||||||
|
toList =
|
||||||
|
# The file set whose file paths to return.
|
||||||
|
# This argument can also be a path,
|
||||||
|
# which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).
|
||||||
|
fileset:
|
||||||
|
_toList (_coerce "lib.fileset.toList: Argument" fileset);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The file set containing all files that are in either of two given file sets.
|
The file set containing all files that are in either of two given file sets.
|
||||||
This is the same as [`unions`](#function-library-lib.fileset.unions),
|
This is the same as [`unions`](#function-library-lib.fileset.unions),
|
||||||
|
|
|
@ -18,6 +18,7 @@ let
|
||||||
attrNames
|
attrNames
|
||||||
attrValues
|
attrValues
|
||||||
mapAttrs
|
mapAttrs
|
||||||
|
mapAttrsToList
|
||||||
optionalAttrs
|
optionalAttrs
|
||||||
zipAttrsWith
|
zipAttrsWith
|
||||||
;
|
;
|
||||||
|
@ -29,6 +30,7 @@ let
|
||||||
inherit (lib.lists)
|
inherit (lib.lists)
|
||||||
all
|
all
|
||||||
commonPrefix
|
commonPrefix
|
||||||
|
concatLists
|
||||||
elemAt
|
elemAt
|
||||||
filter
|
filter
|
||||||
findFirst
|
findFirst
|
||||||
|
@ -539,6 +541,27 @@ rec {
|
||||||
${baseNameOf root} = rootPathType;
|
${baseNameOf root} = rootPathType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Turns a file set into the list of file paths it includes.
|
||||||
|
# Type: fileset -> [ Path ]
|
||||||
|
_toList = fileset:
|
||||||
|
let
|
||||||
|
recurse = path: tree:
|
||||||
|
if isAttrs tree then
|
||||||
|
concatLists (mapAttrsToList (name: value:
|
||||||
|
recurse (path + "/${name}") value
|
||||||
|
) tree)
|
||||||
|
else if tree == "directory" then
|
||||||
|
recurse path (readDir path)
|
||||||
|
else if tree == null then
|
||||||
|
[ ]
|
||||||
|
else
|
||||||
|
[ path ];
|
||||||
|
in
|
||||||
|
if fileset._internalIsEmptyWithoutBase then
|
||||||
|
[ ]
|
||||||
|
else
|
||||||
|
recurse fileset._internalBase fileset._internalTree;
|
||||||
|
|
||||||
# Transforms the filesetTree of a file set to a shorter base path, e.g.
|
# Transforms the filesetTree of a file set to a shorter base path, e.g.
|
||||||
# _shortenTreeBase [ "foo" ] (_create /foo/bar null)
|
# _shortenTreeBase [ "foo" ] (_create /foo/bar null)
|
||||||
# => { bar = null; }
|
# => { bar = null; }
|
||||||
|
|
|
@ -275,7 +275,6 @@ createTree() {
|
||||||
# )
|
# )
|
||||||
# checkFileset './a' # Pass the fileset as the argument
|
# checkFileset './a' # Pass the fileset as the argument
|
||||||
checkFileset() {
|
checkFileset() {
|
||||||
# New subshell so that we can have a separate trap handler, see `trap` below
|
|
||||||
local fileset=$1
|
local fileset=$1
|
||||||
|
|
||||||
# Create the tree
|
# Create the tree
|
||||||
|
@ -283,16 +282,20 @@ checkFileset() {
|
||||||
|
|
||||||
# Process the tree into separate arrays for included paths, excluded paths and excluded files.
|
# Process the tree into separate arrays for included paths, excluded paths and excluded files.
|
||||||
local -a included=()
|
local -a included=()
|
||||||
|
local -a includedFiles=()
|
||||||
local -a excluded=()
|
local -a excluded=()
|
||||||
local -a excludedFiles=()
|
local -a excludedFiles=()
|
||||||
for p in "${!tree[@]}"; do
|
for p in "${!tree[@]}"; do
|
||||||
case "${tree[$p]}" in
|
case "${tree[$p]}" in
|
||||||
1)
|
1)
|
||||||
included+=("$p")
|
included+=("$p")
|
||||||
|
# If keys end with a `/` we treat them as directories, otherwise files
|
||||||
|
if [[ ! "$p" =~ /$ ]]; then
|
||||||
|
includedFiles+=("$p")
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
0)
|
0)
|
||||||
excluded+=("$p")
|
excluded+=("$p")
|
||||||
# If keys end with a `/` we treat them as directories, otherwise files
|
|
||||||
if [[ ! "$p" =~ /$ ]]; then
|
if [[ ! "$p" =~ /$ ]]; then
|
||||||
excludedFiles+=("$p")
|
excludedFiles+=("$p")
|
||||||
fi
|
fi
|
||||||
|
@ -302,6 +305,10 @@ checkFileset() {
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Test that lib.fileset.toList contains exactly the included files.
|
||||||
|
# The /#/./ part prefixes each element with `./`
|
||||||
|
expectEqual "toList ($fileset)" "sort lessThan [ ${includedFiles[*]/#/./} ]"
|
||||||
|
|
||||||
expression="toSource { root = ./.; fileset = $fileset; }"
|
expression="toSource { root = ./.; fileset = $fileset; }"
|
||||||
|
|
||||||
# We don't have lambda's in bash unfortunately,
|
# We don't have lambda's in bash unfortunately,
|
||||||
|
@ -511,6 +518,19 @@ expectEqual '_toSourceFilter (_create /. { foo = "regular"; }) "/foo" ""' 'true'
|
||||||
expectEqual '_toSourceFilter (_create /. { foo = null; }) "/foo" ""' 'false'
|
expectEqual '_toSourceFilter (_create /. { foo = null; }) "/foo" ""' 'false'
|
||||||
|
|
||||||
|
|
||||||
|
## lib.fileset.toList
|
||||||
|
# This function is mainly tested in checkFileset
|
||||||
|
|
||||||
|
# The error context for an invalid argument must be correct
|
||||||
|
expectFailure 'toList null' 'lib.fileset.toList: Argument is of type null, but it should be a file set or a path instead.'
|
||||||
|
|
||||||
|
# Works for the empty fileset
|
||||||
|
expectEqual 'toList _emptyWithoutBase' '[ ]'
|
||||||
|
|
||||||
|
# Works on empty paths
|
||||||
|
expectEqual 'toList ./.' '[ ]'
|
||||||
|
|
||||||
|
|
||||||
## lib.fileset.union, lib.fileset.unions
|
## lib.fileset.union, lib.fileset.unions
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11023,6 +11023,12 @@
|
||||||
githubId = 591860;
|
githubId = 591860;
|
||||||
name = "Lionello Lunesu";
|
name = "Lionello Lunesu";
|
||||||
};
|
};
|
||||||
|
litchipi = {
|
||||||
|
email = "litchi.pi@proton.me";
|
||||||
|
github = "litchipi";
|
||||||
|
githubId = 61109829;
|
||||||
|
name = "Litchi Pi";
|
||||||
|
};
|
||||||
livnev = {
|
livnev = {
|
||||||
email = "lev@liv.nev.org.uk";
|
email = "lev@liv.nev.org.uk";
|
||||||
github = "livnev";
|
github = "livnev";
|
||||||
|
@ -17255,6 +17261,12 @@
|
||||||
githubId = 1286668;
|
githubId = 1286668;
|
||||||
name = "Thilo Uttendorfer";
|
name = "Thilo Uttendorfer";
|
||||||
};
|
};
|
||||||
|
sentientmonkey = {
|
||||||
|
email = "swindsor@gmail.com";
|
||||||
|
github = "sentientmonkey";
|
||||||
|
githubId = 9032;
|
||||||
|
name = "Scott Windsor";
|
||||||
|
};
|
||||||
sents = {
|
sents = {
|
||||||
email = "finn@krein.moe";
|
email = "finn@krein.moe";
|
||||||
github = "sents";
|
github = "sents";
|
||||||
|
|
|
@ -97,6 +97,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||||
|
|
||||||
- [systemd-lock-handler](https://git.sr.ht/~whynothugo/systemd-lock-handler/), a bridge between logind D-Bus events and systemd targets. Available as [services.systemd-lock-handler.enable](#opt-services.systemd-lock-handler.enable).
|
- [systemd-lock-handler](https://git.sr.ht/~whynothugo/systemd-lock-handler/), a bridge between logind D-Bus events and systemd targets. Available as [services.systemd-lock-handler.enable](#opt-services.systemd-lock-handler.enable).
|
||||||
|
|
||||||
|
- [Mealie](https://nightly.mealie.io/), a self-hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in NuxtJS for a pleasant user experience for the whole family. Available as [services.mealie](#opt-services.mealie.enable)
|
||||||
|
|
||||||
## Backward Incompatibilities {#sec-release-24.05-incompatibilities}
|
## Backward Incompatibilities {#sec-release-24.05-incompatibilities}
|
||||||
|
|
||||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||||
|
|
|
@ -1323,6 +1323,7 @@
|
||||||
./services/web-apps/mastodon.nix
|
./services/web-apps/mastodon.nix
|
||||||
./services/web-apps/matomo.nix
|
./services/web-apps/matomo.nix
|
||||||
./services/web-apps/mattermost.nix
|
./services/web-apps/mattermost.nix
|
||||||
|
./services/web-apps/mealie.nix
|
||||||
./services/web-apps/mediawiki.nix
|
./services/web-apps/mediawiki.nix
|
||||||
./services/web-apps/meme-bingo-web.nix
|
./services/web-apps/meme-bingo-web.nix
|
||||||
./services/web-apps/microbin.nix
|
./services/web-apps/microbin.nix
|
||||||
|
|
|
@ -177,17 +177,6 @@ let
|
||||||
''
|
''
|
||||||
++ hashedLines));
|
++ hashedLines));
|
||||||
|
|
||||||
makeACLFile = idx: users: supplement:
|
|
||||||
pkgs.writeText "mosquitto-acl-${toString idx}.conf"
|
|
||||||
(concatStringsSep
|
|
||||||
"\n"
|
|
||||||
(flatten [
|
|
||||||
supplement
|
|
||||||
(mapAttrsToList
|
|
||||||
(n: u: [ "user ${n}" ] ++ map (t: "topic ${t}") u.acl)
|
|
||||||
users)
|
|
||||||
]));
|
|
||||||
|
|
||||||
authPluginOptions = with types; submodule {
|
authPluginOptions = with types; submodule {
|
||||||
options = {
|
options = {
|
||||||
plugin = mkOption {
|
plugin = mkOption {
|
||||||
|
@ -342,7 +331,7 @@ let
|
||||||
formatListener = idx: listener:
|
formatListener = idx: listener:
|
||||||
[
|
[
|
||||||
"listener ${toString listener.port} ${toString listener.address}"
|
"listener ${toString listener.port} ${toString listener.address}"
|
||||||
"acl_file ${makeACLFile idx listener.users listener.acl}"
|
"acl_file /etc/mosquitto/mosquitto-acl-${toString idx}.conf"
|
||||||
]
|
]
|
||||||
++ optional (! listener.omitPasswordAuth) "password_file ${cfg.dataDir}/passwd-${toString idx}"
|
++ optional (! listener.omitPasswordAuth) "password_file ${cfg.dataDir}/passwd-${toString idx}"
|
||||||
++ formatFreeform {} listener.settings
|
++ formatFreeform {} listener.settings
|
||||||
|
@ -698,6 +687,27 @@ in
|
||||||
cfg.listeners);
|
cfg.listeners);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.etc = listToAttrs (
|
||||||
|
imap0
|
||||||
|
(idx: listener: {
|
||||||
|
name = "mosquitto/mosquitto-acl-${toString idx}.conf";
|
||||||
|
value = {
|
||||||
|
user = config.users.users.mosquitto.name;
|
||||||
|
group = config.users.users.mosquitto.group;
|
||||||
|
mode = "0400";
|
||||||
|
text = (concatStringsSep
|
||||||
|
"\n"
|
||||||
|
(flatten [
|
||||||
|
listener.acl
|
||||||
|
(mapAttrsToList
|
||||||
|
(n: u: [ "user ${n}" ] ++ map (t: "topic ${t}") u.acl)
|
||||||
|
listener.users)
|
||||||
|
]));
|
||||||
|
};
|
||||||
|
})
|
||||||
|
cfg.listeners
|
||||||
|
);
|
||||||
|
|
||||||
users.users.mosquitto = {
|
users.users.mosquitto = {
|
||||||
description = "Mosquitto MQTT Broker Daemon owner";
|
description = "Mosquitto MQTT Broker Daemon owner";
|
||||||
group = "mosquitto";
|
group = "mosquitto";
|
||||||
|
|
79
nixos/modules/services/web-apps/mealie.nix
Normal file
79
nixos/modules/services/web-apps/mealie.nix
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
{ config, lib, pkgs, ...}:
|
||||||
|
let
|
||||||
|
cfg = config.services.mealie;
|
||||||
|
pkg = cfg.package;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.mealie = {
|
||||||
|
enable = lib.mkEnableOption "Mealie, a recipe manager and meal planner";
|
||||||
|
|
||||||
|
package = lib.mkPackageOption pkgs "mealie" { };
|
||||||
|
|
||||||
|
listenAddress = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "0.0.0.0";
|
||||||
|
description = "Address on which the service should listen.";
|
||||||
|
};
|
||||||
|
|
||||||
|
port = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
default = 9000;
|
||||||
|
description = "Port on which to serve the Mealie service.";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = lib.mkOption {
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
default = {};
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Configuration of the Mealie service.
|
||||||
|
|
||||||
|
See [the mealie documentation](https://nightly.mealie.io/documentation/getting-started/installation/backend-config/) for available options and default values.
|
||||||
|
|
||||||
|
In addition to the official documentation, you can set {env}`MEALIE_LOG_FILE`.
|
||||||
|
'';
|
||||||
|
example = {
|
||||||
|
ALLOW_SIGNUP = "false";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
credentialsFile = lib.mkOption {
|
||||||
|
type = with lib.types; nullOr path;
|
||||||
|
default = null;
|
||||||
|
example = "/run/secrets/mealie-credentials.env";
|
||||||
|
description = ''
|
||||||
|
File containing credentials used in mealie such as {env}`POSTGRES_PASSWORD`
|
||||||
|
or sensitive LDAP options.
|
||||||
|
|
||||||
|
Expects the format of an `EnvironmentFile=`, as described by {manpage}`systemd.exec(5)`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.services.mealie = {
|
||||||
|
description = "Mealie, a self hosted recipe manager and meal planner";
|
||||||
|
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
PRODUCTION = "true";
|
||||||
|
ALEMBIC_CONFIG_FILE="${pkg}/config/alembic.ini";
|
||||||
|
API_PORT = toString cfg.port;
|
||||||
|
DATA_DIR = "/var/lib/mealie";
|
||||||
|
CRF_MODEL_PATH = "/var/lib/mealie/model.crfmodel";
|
||||||
|
} // (builtins.mapAttrs (_: val: toString val) cfg.settings);
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
DynamicUser = true;
|
||||||
|
User = "mealie";
|
||||||
|
ExecStartPre = "${pkg}/libexec/init_db";
|
||||||
|
ExecStart = "${lib.getExe pkg} -b ${cfg.listenAddress}:${builtins.toString cfg.port}";
|
||||||
|
EnvironmentFile = lib.mkIf (cfg.credentialsFile != null) cfg.credentialsFile;
|
||||||
|
StateDirectory = "mealie";
|
||||||
|
StandardOutput="journal";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -49,12 +49,10 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
checkedSystemdBootBuilder = pkgs.runCommand "systemd-boot" {
|
checkedSystemdBootBuilder = pkgs.runCommand "systemd-boot" { } ''
|
||||||
nativeBuildInputs = [ pkgs.mypy ];
|
|
||||||
} ''
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -m755 ${systemdBootBuilder} $out/bin/systemd-boot-builder
|
install -m755 ${systemdBootBuilder} $out/bin/systemd-boot-builder
|
||||||
mypy \
|
${lib.getExe pkgs.buildPackages.mypy} \
|
||||||
--no-implicit-optional \
|
--no-implicit-optional \
|
||||||
--disallow-untyped-calls \
|
--disallow-untyped-calls \
|
||||||
--disallow-untyped-defs \
|
--disallow-untyped-defs \
|
||||||
|
|
|
@ -497,6 +497,7 @@ in {
|
||||||
lxd = pkgs.recurseIntoAttrs (handleTest ./lxd { inherit handleTestOn; });
|
lxd = pkgs.recurseIntoAttrs (handleTest ./lxd { inherit handleTestOn; });
|
||||||
lxd-image-server = handleTest ./lxd-image-server.nix {};
|
lxd-image-server = handleTest ./lxd-image-server.nix {};
|
||||||
#logstash = handleTest ./logstash.nix {};
|
#logstash = handleTest ./logstash.nix {};
|
||||||
|
lomiri-system-settings = handleTest ./lomiri-system-settings.nix {};
|
||||||
lorri = handleTest ./lorri/default.nix {};
|
lorri = handleTest ./lorri/default.nix {};
|
||||||
maddy = discoverTests (import ./maddy { inherit handleTest; });
|
maddy = discoverTests (import ./maddy { inherit handleTest; });
|
||||||
maestral = handleTest ./maestral.nix {};
|
maestral = handleTest ./maestral.nix {};
|
||||||
|
@ -516,6 +517,7 @@ in {
|
||||||
matrix-synapse = handleTest ./matrix/synapse.nix {};
|
matrix-synapse = handleTest ./matrix/synapse.nix {};
|
||||||
matrix-synapse-workers = handleTest ./matrix/synapse-workers.nix {};
|
matrix-synapse-workers = handleTest ./matrix/synapse-workers.nix {};
|
||||||
mattermost = handleTest ./mattermost.nix {};
|
mattermost = handleTest ./mattermost.nix {};
|
||||||
|
mealie = handleTest ./mealie.nix {};
|
||||||
mediamtx = handleTest ./mediamtx.nix {};
|
mediamtx = handleTest ./mediamtx.nix {};
|
||||||
mediatomb = handleTest ./mediatomb.nix {};
|
mediatomb = handleTest ./mediatomb.nix {};
|
||||||
mediawiki = handleTest ./mediawiki.nix {};
|
mediawiki = handleTest ./mediawiki.nix {};
|
||||||
|
|
99
nixos/tests/lomiri-system-settings.nix
Normal file
99
nixos/tests/lomiri-system-settings.nix
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||||
|
name = "lomiri-system-settings-standalone";
|
||||||
|
meta.maintainers = lib.teams.lomiri.members;
|
||||||
|
|
||||||
|
nodes.machine = { config, pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
./common/x11.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs.lomiri; [
|
||||||
|
suru-icon-theme
|
||||||
|
lomiri-system-settings
|
||||||
|
];
|
||||||
|
variables = {
|
||||||
|
UITK_ICON_THEME = "suru";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
i18n.supportedLocales = [ "all" ];
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
# Intended font & helps with OCR
|
||||||
|
ubuntu_font_family
|
||||||
|
];
|
||||||
|
|
||||||
|
services.upower.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
enableOCR = true;
|
||||||
|
|
||||||
|
testScript = let
|
||||||
|
settingsPages = [
|
||||||
|
# Base pages
|
||||||
|
{ name = "wifi"; type = "internal"; element = "networks"; }
|
||||||
|
{ name = "bluetooth"; type = "internal"; element = "discoverable|None detected"; }
|
||||||
|
# only text we can really look for with VPN is on a button, OCR on CI struggles with it
|
||||||
|
{ name = "vpn"; type = "internal"; element = "Add|Manual|Configuration"; skipOCR = true; }
|
||||||
|
{ name = "appearance"; type = "internal"; element = "Background image|blur effects"; }
|
||||||
|
{ name = "desktop"; type = "internal"; element = "workspaces|Icon size"; }
|
||||||
|
{ name = "sound"; type = "internal"; element = "Silent Mode|Message sound"; }
|
||||||
|
{ name = "language"; type = "internal"; element = "Display language|External keyboard"; }
|
||||||
|
{ name = "notification"; type = "internal"; element = "Apps that notify"; }
|
||||||
|
{ name = "gestures"; type = "internal"; element = "Edge drag"; }
|
||||||
|
{ name = "mouse"; type = "internal"; element = "Cursor speed|Wheel scrolling speed"; }
|
||||||
|
{ name = "timedate"; type = "internal"; element = "Time zone|Set the time and date"; }
|
||||||
|
|
||||||
|
# External plugins
|
||||||
|
{ name = "security-privacy"; type = "external"; element = "Locking|unlocking|permissions"; elementLocalised = "Sperren|Entsperren|Berechtigungen"; }
|
||||||
|
];
|
||||||
|
in
|
||||||
|
''
|
||||||
|
machine.wait_for_x()
|
||||||
|
|
||||||
|
with subtest("lomiri system settings launches"):
|
||||||
|
machine.execute("lomiri-system-settings >&2 &")
|
||||||
|
machine.wait_for_text("System Settings")
|
||||||
|
machine.screenshot("lss_open")
|
||||||
|
|
||||||
|
# Move focus to start of plugins list for following list of tests
|
||||||
|
machine.send_key("tab")
|
||||||
|
machine.send_key("tab")
|
||||||
|
machine.screenshot("lss_focus")
|
||||||
|
|
||||||
|
# tab through & open all sub-menus, to make sure none of them fail
|
||||||
|
'' + (lib.strings.concatMapStringsSep "\n" (page: ''
|
||||||
|
machine.send_key("tab")
|
||||||
|
machine.send_key("kp_enter")
|
||||||
|
''
|
||||||
|
+ lib.optionalString (!(page.skipOCR or false)) ''
|
||||||
|
with subtest("lomiri system settings ${page.name} works"):
|
||||||
|
machine.wait_for_text(r"(${page.element})")
|
||||||
|
machine.screenshot("lss_page_${page.name}")
|
||||||
|
'') settingsPages) + ''
|
||||||
|
|
||||||
|
machine.execute("pkill -f lomiri-system-settings")
|
||||||
|
|
||||||
|
with subtest("lomiri system settings localisation works"):
|
||||||
|
machine.execute("env LANG=de_DE.UTF-8 lomiri-system-settings >&2 &")
|
||||||
|
machine.wait_for_text("Systemeinstellungen")
|
||||||
|
machine.screenshot("lss_localised_open")
|
||||||
|
|
||||||
|
# Move focus to start of plugins list for following list of tests
|
||||||
|
machine.send_key("tab")
|
||||||
|
machine.send_key("tab")
|
||||||
|
machine.screenshot("lss_focus_localised")
|
||||||
|
|
||||||
|
'' + (lib.strings.concatMapStringsSep "\n" (page: ''
|
||||||
|
machine.send_key("tab")
|
||||||
|
machine.send_key("kp_enter")
|
||||||
|
'' + lib.optionalString (page.type == "external") ''
|
||||||
|
with subtest("lomiri system settings ${page.name} localisation works"):
|
||||||
|
machine.wait_for_text(r"(${page.elementLocalised})")
|
||||||
|
machine.screenshot("lss_localised_page_${page.name}")
|
||||||
|
'') settingsPages) + ''
|
||||||
|
'';
|
||||||
|
})
|
24
nixos/tests/mealie.nix
Normal file
24
nixos/tests/mealie.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
import ./make-test-python.nix ({ pkgs, ...} :
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "mealie";
|
||||||
|
meta = with pkgs.lib.maintainers; {
|
||||||
|
maintainers = [ litchipi ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes = {
|
||||||
|
server = {
|
||||||
|
services.mealie = {
|
||||||
|
enable = true;
|
||||||
|
port = 9001;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
start_all()
|
||||||
|
server.wait_for_unit("mealie.service")
|
||||||
|
server.wait_for_open_port(9001)
|
||||||
|
server.succeed("curl --fail http://localhost:9001")
|
||||||
|
'';
|
||||||
|
})
|
|
@ -6,19 +6,19 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "optimism";
|
pname = "optimism";
|
||||||
version = "1.6.1";
|
version = "1.7.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ethereum-optimism";
|
owner = "ethereum-optimism";
|
||||||
repo = "optimism";
|
repo = "optimism";
|
||||||
rev = "op-node/v${version}";
|
rev = "op-node/v${version}";
|
||||||
hash = "sha256-ic5OHGxU/crq6IqqUnzAC+99KpCXUKFagnAKD4FtYBI=";
|
hash = "sha256-ru6/PDgsQOpOjKSolk3US6dV/NMH/lWEuJf5lmuR4SI=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
subPackages = [ "op-node/cmd" "op-proposer/cmd" "op-batcher/cmd" ];
|
subPackages = [ "op-node/cmd" "op-proposer/cmd" "op-batcher/cmd" ];
|
||||||
|
|
||||||
vendorHash = "sha256-zuATJ5FBdil9bHgkMf32WuTW6/99GIsGCzI5srP21m8=";
|
vendorHash = "sha256-BrlF8uwnD1hlrrpvc2JEsaPY4/+bGR1cXwjkkYANyiE=";
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libpcap
|
libpcap
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
, aria2
|
, aria2
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation {
|
||||||
pname = "kiwix";
|
pname = "kiwix";
|
||||||
version = "2.3.1";
|
version = "2.3.1-unstable-2024-02-20";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = "kiwix";
|
||||||
repo = "${pname}-desktop";
|
repo = "kiwix-desktop";
|
||||||
rev = version;
|
rev = "17ac566b07814aefb1decf108e4ba6d7ad9ef7bc";
|
||||||
sha256 = "sha256-ghx4pW6IkWPzZXk0TtMGeQZIzm9HEN3mR4XQFJ1xHDo=";
|
hash = "sha256-BZzFnQE8/dyZkpY0X3zZ6yC6yLZ002Q/RoDzEhSOa/g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -11,15 +11,15 @@
|
||||||
, gtest
|
, gtest
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "libkiwix";
|
pname = "libkiwix";
|
||||||
version = "12.1.1";
|
version = "13.1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kiwix";
|
owner = "kiwix";
|
||||||
repo = pname;
|
repo = "libkiwix";
|
||||||
rev = version;
|
rev = finalAttrs.version;
|
||||||
sha256 = "sha256-hcwLxfn1fiUAiwsnIddv4HukvVrFePtx7sDQUD1lGUA=";
|
hash = "sha256-DKOwzfGyad/3diOaV1K8hXqT8YGfqCP6QDKDkxWu/1U=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -55,8 +55,9 @@ stdenv.mkDerivation rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Common code base for all Kiwix ports";
|
description = "Common code base for all Kiwix ports";
|
||||||
homepage = "https://kiwix.org";
|
homepage = "https://kiwix.org";
|
||||||
|
changelog = "https://github.com/kiwix/libkiwix/releases/tag/${finalAttrs.version}";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ colinsane ];
|
maintainers = with maintainers; [ colinsane ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "kiwix-tools";
|
pname = "kiwix-tools";
|
||||||
version = "3.5.0";
|
version = "3.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kiwix";
|
owner = "kiwix";
|
||||||
repo = "kiwix-tools";
|
repo = "kiwix-tools";
|
||||||
rev = version;
|
rev = finalAttrs.version;
|
||||||
sha256 = "sha256-bOxi51H28LhA+5caX6kllIY5B3Q1FoGVFadFIhYRkG0=";
|
hash = "sha256-+th86lMAuCcmWj06yQoZ1L7rLZKqNvuTrV+Rra2km44=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -36,9 +36,9 @@ stdenv.mkDerivation rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Command line Kiwix tools: kiwix-serve, kiwix-manage, ...";
|
description = "Command line Kiwix tools: kiwix-serve, kiwix-manage, ...";
|
||||||
homepage = "https://kiwix.org";
|
homepage = "https://kiwix.org";
|
||||||
|
changelog = "https://github.com/kiwix/kiwix-tools/releases/tag/${finalAttrs.version}";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ colinsane ];
|
maintainers = with maintainers; [ colinsane ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
diff --git a/src/functions.vala b/src/functions.vala
|
|
||||||
index cf7fefc..9b4d82a 100644
|
|
||||||
--- a/src/functions.vala
|
|
||||||
+++ b/src/functions.vala
|
|
||||||
@@ -102,10 +102,7 @@ namespace SwayNotificationCenter {
|
|
||||||
|
|
||||||
public static string get_style_path (owned string ? custom_path,
|
|
||||||
bool only_system = false) {
|
|
||||||
- string[] paths = {
|
|
||||||
- // Fallback location. Specified in postinstall.py
|
|
||||||
- "/usr/local/etc/xdg/swaync/style.css"
|
|
||||||
- };
|
|
||||||
+ string[] paths = {};
|
|
||||||
if (custom_path != null && custom_path.length > 0) {
|
|
||||||
// Replaces the home directory relative path with a absolute path
|
|
||||||
if (custom_path.get (0) == '~') {
|
|
||||||
@@ -123,7 +120,9 @@ namespace SwayNotificationCenter {
|
|
||||||
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
|
|
||||||
path, "swaync/style.css");
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+ // Fallback location. Specified in postinstall.py. Mostly for Debian
|
|
||||||
+ paths += "/usr/local/etc/xdg/swaync/style.css";
|
|
||||||
+
|
|
||||||
string path = "";
|
|
||||||
foreach (string try_path in paths) {
|
|
||||||
if (File.new_for_path (try_path).query_exists ()) {
|
|
||||||
@@ -140,10 +139,7 @@ namespace SwayNotificationCenter {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string get_config_path (owned string ? custom_path) {
|
|
||||||
- string[] paths = {
|
|
||||||
- // Fallback location. Specified in postinstall.py
|
|
||||||
- "/usr/local/etc/xdg/swaync/config.json"
|
|
||||||
- };
|
|
||||||
+ string[] paths = {};
|
|
||||||
if (custom_path != null && custom_path.length > 0) {
|
|
||||||
// Replaces the home directory relative path with a absolute path
|
|
||||||
if (custom_path.get (0) == '~') {
|
|
||||||
@@ -158,7 +154,9 @@ namespace SwayNotificationCenter {
|
|
||||||
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
|
|
||||||
path, "swaync/config.json");
|
|
||||||
}
|
|
||||||
-
|
|
||||||
+ // Fallback location. Specified in postinstall.py. Mostly for Debian
|
|
||||||
+ paths += "/usr/local/etc/xdg/swaync/config.json";
|
|
||||||
+
|
|
||||||
string path = "";
|
|
||||||
foreach (string try_path in paths) {
|
|
||||||
if (File.new_for_path (try_path).query_exists ()) {
|
|
|
@ -24,23 +24,21 @@
|
||||||
, scdoc
|
, scdoc
|
||||||
, vala
|
, vala
|
||||||
, xvfb-run
|
, xvfb-run
|
||||||
|
, sassc
|
||||||
|
, pantheon
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: rec {
|
stdenv.mkDerivation (finalAttrs: rec {
|
||||||
pname = "SwayNotificationCenter";
|
pname = "SwayNotificationCenter";
|
||||||
version = "0.9.0";
|
version = "0.10.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ErikReider";
|
owner = "ErikReider";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-mwwSTs4d9jUXUy33nSYJCRFlpH6naCmbRUSpfVacMBE=";
|
hash = "sha256-7O+DX4uuncUqx5zEKQprZE6tctteT6NU01V2EBHiFqA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
./001-backport-pr296.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
bash-completion
|
bash-completion
|
||||||
# cmake # currently conflicts with meson
|
# cmake # currently conflicts with meson
|
||||||
|
@ -51,6 +49,8 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
|
sassc
|
||||||
|
pantheon.granite
|
||||||
scdoc
|
scdoc
|
||||||
vala
|
vala
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
|
@ -74,8 +74,6 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
chmod +x build-aux/meson/postinstall.py
|
chmod +x build-aux/meson/postinstall.py
|
||||||
patchShebangs build-aux/meson/postinstall.py
|
patchShebangs build-aux/meson/postinstall.py
|
||||||
|
|
||||||
substituteInPlace src/functions.vala --replace /usr/local/etc $out/etc
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests.version = testers.testVersion {
|
passthru.tests.version = testers.testVersion {
|
||||||
|
|
|
@ -16,20 +16,49 @@
|
||||||
, xorg
|
, xorg
|
||||||
, cups
|
, cups
|
||||||
, pango
|
, pango
|
||||||
|
, runCommandLocal
|
||||||
|
, curl
|
||||||
|
, coreutils
|
||||||
|
, cacert
|
||||||
, useChineseVersion ? false
|
, useChineseVersion ? false
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
pkgVersion = "11.1.0.11719";
|
||||||
|
url =
|
||||||
|
if useChineseVersion then
|
||||||
|
"https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${lib.last (lib.splitVersion pkgVersion)}/wps-office_${pkgVersion}_amd64.deb"
|
||||||
|
else
|
||||||
|
"https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/${lib.last (lib.splitVersion pkgVersion)}/wps-office_${pkgVersion}.XA_amd64.deb";
|
||||||
|
hash =
|
||||||
|
if useChineseVersion then
|
||||||
|
"sha256-LgE5du2ZnMsAqgoQkY63HWyWYA5TLS5I8ArRYrpxffs="
|
||||||
|
else
|
||||||
|
"sha256-6fXzHSMzZDGuBubOXsHA0YEUGKcy5QIPg3noyxUbdjA=";
|
||||||
|
uri = builtins.replaceStrings [ "https://wps-linux-personal.wpscdn.cn" ] [ "" ] url;
|
||||||
|
securityKey = "7f8faaaa468174dc1c9cd62e5f218a5b";
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wpsoffice";
|
pname = "wpsoffice";
|
||||||
version = "11.1.0.11711";
|
version = pkgVersion;
|
||||||
|
|
||||||
src = if useChineseVersion then fetchurl {
|
src = runCommandLocal (if useChineseVersion then "wps-office_${version}_amd64.deb" else "wps-office_${version}.XA_amd64.deb")
|
||||||
url = "https://wps-linux-personal.wpscdn.cn/wps/download/ep/Linux2019/${lib.last (lib.splitVersion version)}/wps-office_${version}_amd64.deb";
|
{
|
||||||
hash = "sha256-JHSTZZnOZoTpj8zF4C5PmjTkftEdxbeaqweY3ITiJto=";
|
outputHashMode = "recursive";
|
||||||
} else fetchurl {
|
outputHashAlgo = "sha256";
|
||||||
url = "https://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/${lib.last (lib.splitVersion version)}/wps-office_${version}.XA_amd64.deb";
|
outputHash = hash;
|
||||||
hash = "sha256-2apkSE/8Wm6/OQ4x5n1PE1emhovqOgD0NVTY5QZZTYA=";
|
|
||||||
};
|
nativeBuildInputs = [ curl coreutils ];
|
||||||
|
|
||||||
|
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
} ''
|
||||||
|
timestamp10=$(date '+%s')
|
||||||
|
md5hash=($(echo -n "${securityKey}${uri}$timestamp10" | md5sum))
|
||||||
|
|
||||||
|
curl \
|
||||||
|
--retry 3 --retry-delay 3 \
|
||||||
|
"${url}?t=$timestamp10&k=$md5hash" \
|
||||||
|
> $out
|
||||||
|
'';
|
||||||
|
|
||||||
unpackCmd = "dpkg -x $src .";
|
unpackCmd = "dpkg -x $src .";
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
@ -102,6 +131,6 @@ stdenv.mkDerivation rec {
|
||||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||||
hydraPlatforms = [ ];
|
hydraPlatforms = [ ];
|
||||||
license = licenses.unfreeRedistributable;
|
license = licenses.unfreeRedistributable;
|
||||||
maintainers = with maintainers; [ mlatus th0rgal rewine ];
|
maintainers = with maintainers; [ mlatus th0rgal rewine pokon548 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,32 +5,26 @@
|
||||||
, wrapGAppsHook
|
, wrapGAppsHook
|
||||||
, gtk3
|
, gtk3
|
||||||
, librsvg
|
, librsvg
|
||||||
, withWayland ? false
|
|
||||||
, gtk-layer-shell
|
, gtk-layer-shell
|
||||||
, stdenv
|
, stdenv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "eww";
|
pname = "eww";
|
||||||
version = "unstable-2023-08-18";
|
version = "0.5.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "elkowar";
|
owner = "elkowar";
|
||||||
repo = "eww";
|
repo = "eww";
|
||||||
rev = "a9a35c1804d72ef92e04ee71555bd9e5a08fa17e";
|
rev = "v${version}";
|
||||||
hash = "sha256-GEysmNDm+olt1WXHzRwb4ZLifkXmeP5+APAN3b81/Og=";
|
hash = "sha256-HBBz1NDtj2TnDK5ghDLRrAOwHXDZlzclvVscYnmKGck=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-4yeu5AgleZMOLKNynGMd0XuyZxyyZ+RmzNtuJiNPN8g=";
|
cargoHash = "sha256-IirFE714NZmppLjwbWk6fxcmRXCUFzB4oxOxBvmYu5U=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
||||||
|
|
||||||
buildInputs = [ gtk3 librsvg ] ++ lib.optional withWayland gtk-layer-shell;
|
buildInputs = [ gtk3 librsvg gtk-layer-shell ];
|
||||||
|
|
||||||
buildNoDefaultFeatures = true;
|
|
||||||
buildFeatures = [
|
|
||||||
(if withWayland then "wayland" else "x11")
|
|
||||||
];
|
|
||||||
|
|
||||||
cargoBuildFlags = [ "--bin" "eww" ];
|
cargoBuildFlags = [ "--bin" "eww" ];
|
||||||
|
|
||||||
|
@ -43,7 +37,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
description = "ElKowars wacky widgets";
|
description = "ElKowars wacky widgets";
|
||||||
homepage = "https://github.com/elkowar/eww";
|
homepage = "https://github.com/elkowar/eww";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ figsoda lom ];
|
maintainers = with maintainers; [ figsoda lom coffeeispower ];
|
||||||
mainProgram = "eww";
|
mainProgram = "eww";
|
||||||
broken = stdenv.isDarwin;
|
broken = stdenv.isDarwin;
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,8 @@ preBuildHooks+=(composerInstallBuildHook)
|
||||||
preCheckHooks+=(composerInstallCheckHook)
|
preCheckHooks+=(composerInstallCheckHook)
|
||||||
preInstallHooks+=(composerInstallInstallHook)
|
preInstallHooks+=(composerInstallInstallHook)
|
||||||
|
|
||||||
|
source @phpScriptUtils@
|
||||||
|
|
||||||
composerInstallConfigureHook() {
|
composerInstallConfigureHook() {
|
||||||
echo "Executing composerInstallConfigureHook"
|
echo "Executing composerInstallConfigureHook"
|
||||||
|
|
||||||
|
@ -22,6 +24,8 @@ composerInstallConfigureHook() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f "composer.lock" ]]; then
|
if [[ ! -f "composer.lock" ]]; then
|
||||||
|
setComposeRootVersion
|
||||||
|
|
||||||
composer \
|
composer \
|
||||||
--no-ansi \
|
--no-ansi \
|
||||||
--no-install \
|
--no-install \
|
||||||
|
@ -75,6 +79,8 @@ composerInstallConfigureHook() {
|
||||||
composerInstallBuildHook() {
|
composerInstallBuildHook() {
|
||||||
echo "Executing composerInstallBuildHook"
|
echo "Executing composerInstallBuildHook"
|
||||||
|
|
||||||
|
setComposeRootVersion
|
||||||
|
|
||||||
# Since this file cannot be generated in the composer-repository-hook.sh
|
# Since this file cannot be generated in the composer-repository-hook.sh
|
||||||
# because the file contains hardcoded nix store paths, we generate it here.
|
# because the file contains hardcoded nix store paths, we generate it here.
|
||||||
composer-local-repo-plugin --no-ansi build-local-repo -m "${composerRepository}" .
|
composer-local-repo-plugin --no-ansi build-local-repo -m "${composerRepository}" .
|
||||||
|
@ -90,7 +96,6 @@ composerInstallBuildHook() {
|
||||||
|
|
||||||
# Since the composer.json file has been modified in the previous step, the
|
# Since the composer.json file has been modified in the previous step, the
|
||||||
# composer.lock file needs to be updated.
|
# composer.lock file needs to be updated.
|
||||||
COMPOSER_ROOT_VERSION="${version}" \
|
|
||||||
composer \
|
composer \
|
||||||
--lock \
|
--lock \
|
||||||
--no-ansi \
|
--no-ansi \
|
||||||
|
@ -134,11 +139,10 @@ composerInstallCheckHook() {
|
||||||
composerInstallInstallHook() {
|
composerInstallInstallHook() {
|
||||||
echo "Executing composerInstallInstallHook"
|
echo "Executing composerInstallInstallHook"
|
||||||
|
|
||||||
|
setComposeRootVersion
|
||||||
|
|
||||||
# Finally, run `composer install` to install the dependencies and generate
|
# Finally, run `composer install` to install the dependencies and generate
|
||||||
# the autoloader.
|
# the autoloader.
|
||||||
# The COMPOSER_ROOT_VERSION environment variable is needed only for
|
|
||||||
# vimeo/psalm.
|
|
||||||
COMPOSER_ROOT_VERSION="${version}" \
|
|
||||||
composer \
|
composer \
|
||||||
--no-ansi \
|
--no-ansi \
|
||||||
--no-interaction \
|
--no-interaction \
|
||||||
|
|
|
@ -10,6 +10,8 @@ preBuildHooks+=(composerRepositoryBuildHook)
|
||||||
preCheckHooks+=(composerRepositoryCheckHook)
|
preCheckHooks+=(composerRepositoryCheckHook)
|
||||||
preInstallHooks+=(composerRepositoryInstallHook)
|
preInstallHooks+=(composerRepositoryInstallHook)
|
||||||
|
|
||||||
|
source @phpScriptUtils@
|
||||||
|
|
||||||
composerRepositoryConfigureHook() {
|
composerRepositoryConfigureHook() {
|
||||||
echo "Executing composerRepositoryConfigureHook"
|
echo "Executing composerRepositoryConfigureHook"
|
||||||
|
|
||||||
|
@ -18,7 +20,8 @@ composerRepositoryConfigureHook() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f "composer.lock" ]]; then
|
if [[ ! -f "composer.lock" ]]; then
|
||||||
COMPOSER_ROOT_VERSION="${version}" \
|
setComposeRootVersion
|
||||||
|
|
||||||
composer \
|
composer \
|
||||||
--no-ansi \
|
--no-ansi \
|
||||||
--no-install \
|
--no-install \
|
||||||
|
@ -55,6 +58,8 @@ composerRepositoryBuildHook() {
|
||||||
|
|
||||||
mkdir -p repository
|
mkdir -p repository
|
||||||
|
|
||||||
|
setComposeRootVersion
|
||||||
|
|
||||||
# Build the local composer repository
|
# Build the local composer repository
|
||||||
# The command 'build-local-repo' is provided by the Composer plugin
|
# The command 'build-local-repo' is provided by the Composer plugin
|
||||||
# nix-community/composer-local-repo-plugin.
|
# nix-community/composer-local-repo-plugin.
|
||||||
|
|
|
@ -2,18 +2,28 @@
|
||||||
, makeSetupHook
|
, makeSetupHook
|
||||||
, diffutils
|
, diffutils
|
||||||
, jq
|
, jq
|
||||||
|
, writeShellApplication
|
||||||
, moreutils
|
, moreutils
|
||||||
, makeBinaryWrapper
|
, makeBinaryWrapper
|
||||||
, cacert
|
, cacert
|
||||||
, buildPackages
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
php-script-utils = writeShellApplication {
|
||||||
|
name = "php-script-utils";
|
||||||
|
runtimeInputs = [ jq ];
|
||||||
|
text = builtins.readFile ./php-script-utils.bash;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
composerRepositoryHook = makeSetupHook
|
composerRepositoryHook = makeSetupHook
|
||||||
{
|
{
|
||||||
name = "composer-repository-hook.sh";
|
name = "composer-repository-hook.sh";
|
||||||
propagatedBuildInputs = [ jq moreutils cacert ];
|
propagatedBuildInputs = [ jq moreutils cacert ];
|
||||||
substitutions = { };
|
substitutions = {
|
||||||
|
phpScriptUtils = lib.getExe php-script-utils;
|
||||||
|
};
|
||||||
} ./composer-repository-hook.sh;
|
} ./composer-repository-hook.sh;
|
||||||
|
|
||||||
composerInstallHook = makeSetupHook
|
composerInstallHook = makeSetupHook
|
||||||
|
@ -24,6 +34,7 @@
|
||||||
# Specify the stdenv's `diff` by abspath to ensure that the user's build
|
# Specify the stdenv's `diff` by abspath to ensure that the user's build
|
||||||
# inputs do not cause us to find the wrong `diff`.
|
# inputs do not cause us to find the wrong `diff`.
|
||||||
cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp";
|
cmp = "${lib.getBin buildPackages.diffutils}/bin/cmp";
|
||||||
|
phpScriptUtils = lib.getExe php-script-utils;
|
||||||
};
|
};
|
||||||
} ./composer-install-hook.sh;
|
} ./composer-install-hook.sh;
|
||||||
}
|
}
|
||||||
|
|
12
pkgs/build-support/php/hooks/php-script-utils.bash
Normal file
12
pkgs/build-support/php/hooks/php-script-utils.bash
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
declare version
|
||||||
|
|
||||||
|
setComposeRootVersion() {
|
||||||
|
set +e # Disable exit on error
|
||||||
|
|
||||||
|
if [[ -v version ]]; then
|
||||||
|
echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m"
|
||||||
|
export COMPOSER_ROOT_VERSION=$version
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, libiconv
|
, libiconv
|
||||||
|
@ -11,29 +10,20 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "atuin";
|
pname = "atuin";
|
||||||
version = "18.0.1";
|
version = "18.0.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "atuinsh";
|
owner = "atuinsh";
|
||||||
repo = "atuin";
|
repo = "atuin";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-fuVSn1vhKn2+Tw5f6zBYHFW3QSL4eisZ6d5pxsj5hh4=";
|
hash = "sha256-1ZNp6e2ZjVRU0w9m8YDWOHApu8vRYlcg6MJw03ZV49M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# atuin with bash-preexec wasn't recording history properly after searching,
|
|
||||||
# backport recent fix until next release
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/atuinsh/atuin/commit/cb11af25afddbad552d337a9c82e74ac4302feca.patch";
|
|
||||||
sha256 = "sha256-cG99aLKs5msatT7vXiX9Rn5xur2WUjQ/U33nOxuon7I=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
# TODO: unify this to one hash because updater do not support this
|
# TODO: unify this to one hash because updater do not support this
|
||||||
cargoHash =
|
cargoHash =
|
||||||
if stdenv.isLinux
|
if stdenv.isLinux
|
||||||
then "sha256-lHWgsVnjSeBmd7O4Fn0pUtTn4XbkBOAouaRHRozil50="
|
then "sha256-1yGv6Tmp7QhxIu3GNyRzK1i9Ghcil30+e8gTvyeKiZs="
|
||||||
else "sha256-LxfpllzvgUu7ZuD97n3W+el3bdOt5QGXzJbDQ0w8seo=";
|
else "sha256-+QdtQuXTk7Aw7xwelVDp/0T7FAYOnhDqSjazGemzSLw=";
|
||||||
|
|
||||||
# atuin's default features include 'check-updates', which do not make sense
|
# atuin's default features include 'check-updates', which do not make sense
|
||||||
# for distribution builds. List all other default features.
|
# for distribution builds. List all other default features.
|
||||||
|
|
35
pkgs/by-name/gi/git-together/package.nix
Normal file
35
pkgs/by-name/gi/git-together/package.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, rustPlatform
|
||||||
|
, openssl
|
||||||
|
, pkg-config
|
||||||
|
, darwin
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "git-together";
|
||||||
|
version = "v0.1.0-alpha.26";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "kejadlen";
|
||||||
|
repo = "git-together";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-2HgOaqlX0mmmvRlALHm90NAdIhby/jWUJO63bQFqc+4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin darwin.Security;
|
||||||
|
|
||||||
|
OPENSSL_NO_VENDOR = true;
|
||||||
|
|
||||||
|
cargoHash = "sha256-mIkhXVuSgcsQf4be7NT0R8rkN9tdgim41gqjbq3ndPA=";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Better commit attribution while pairing without messing with your git workflow";
|
||||||
|
homepage = "https://github.com/kejadlen/git-together";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ sentientmonkey ];
|
||||||
|
mainProgram = "git-together";
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "jan";
|
pname = "jan";
|
||||||
version = "0.4.6";
|
version = "0.4.7";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/janhq/jan/releases/download/v${version}/jan-linux-x86_64-${version}.AppImage";
|
url = "https://github.com/janhq/jan/releases/download/v${version}/jan-linux-x86_64-${version}.AppImage";
|
||||||
hash = "sha256-/FYaFyp028CeEFfrxNnj67/z7FoOwU0wC2V56mACD5Q=";
|
hash = "sha256-Mn7rIBEf46JbNof8h3z66TGdGKnb0FGMJc46JncA0KM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
appimageContents = appimageTools.extractType2 { inherit pname version src; };
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "lefthook";
|
pname = "lefthook";
|
||||||
version = "1.6.1";
|
version = "1.6.2";
|
||||||
in
|
in
|
||||||
buildGoModule {
|
buildGoModule {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
@ -15,7 +15,7 @@ buildGoModule {
|
||||||
owner = "evilmartians";
|
owner = "evilmartians";
|
||||||
repo = "lefthook";
|
repo = "lefthook";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-015tIgu9L62uZm4ae1JzU/GAK6fwX8BI9HGYhc+4jQQ=";
|
hash = "sha256-+4ihh8VnNFSGpJL7SFHHPuvqQCt2LJlUk6OJ9fuFV+M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-/VLS7+nPERjIU7V2CzqXH69Z3/y+GKZbAFn+KcRKRuA=";
|
vendorHash = "sha256-/VLS7+nPERjIU7V2CzqXH69Z3/y+GKZbAFn+KcRKRuA=";
|
||||||
|
|
51
pkgs/by-name/me/mealie/mealie-frontend.nix
Normal file
51
pkgs/by-name/me/mealie/mealie-frontend.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
src: version:
|
||||||
|
{ lib, fetchYarnDeps, nodejs_18, prefetch-yarn-deps, stdenv }: stdenv.mkDerivation {
|
||||||
|
name = "mealie-frontend";
|
||||||
|
inherit version;
|
||||||
|
src = "${src}/frontend";
|
||||||
|
|
||||||
|
yarnOfflineCache = fetchYarnDeps {
|
||||||
|
yarnLock = "${src}/frontend/yarn.lock";
|
||||||
|
hash = "sha256-zQUD/PQWzp2Q6fiVmLicvSusXffu6s9q3x/aAUnCN38=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
prefetch-yarn-deps
|
||||||
|
nodejs_18
|
||||||
|
nodejs_18.pkgs.yarn
|
||||||
|
];
|
||||||
|
|
||||||
|
configurePhase = ''
|
||||||
|
runHook preConfigure
|
||||||
|
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
yarn config --offline set yarn-offline-mirror "$yarnOfflineCache"
|
||||||
|
fixup-yarn-lock yarn.lock
|
||||||
|
yarn install --frozen-lockfile --offline --no-progress --non-interactive
|
||||||
|
patchShebangs node_modules/
|
||||||
|
|
||||||
|
runHook postConfigure
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
export NUXT_TELEMETRY_DISABLED=1
|
||||||
|
yarn --offline build
|
||||||
|
yarn --offline generate
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mv dist $out
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Frontend for Mealie";
|
||||||
|
license = licenses.agpl3Only;
|
||||||
|
maintainers = with maintainers; [ litchipi ];
|
||||||
|
};
|
||||||
|
}
|
103
pkgs/by-name/me/mealie/mealie-logs-to-stdout.patch
Normal file
103
pkgs/by-name/me/mealie/mealie-logs-to-stdout.patch
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
diff --git a/mealie/core/root_logger.py b/mealie/core/root_logger.py
|
||||||
|
index 29db504f..3da5ef84 100644
|
||||||
|
--- a/mealie/core/root_logger.py
|
||||||
|
+++ b/mealie/core/root_logger.py
|
||||||
|
@@ -9,7 +9,6 @@ DATA_DIR = determine_data_dir()
|
||||||
|
|
||||||
|
from .config import get_app_settings # noqa E402
|
||||||
|
|
||||||
|
-LOGGER_FILE = DATA_DIR.joinpath("mealie.log")
|
||||||
|
DATE_FORMAT = "%d-%b-%y %H:%M:%S"
|
||||||
|
LOGGER_FORMAT = "%(levelname)s: %(asctime)s \t%(message)s"
|
||||||
|
|
||||||
|
@@ -40,19 +39,17 @@ def get_logger_config():
|
||||||
|
level=log_level,
|
||||||
|
)
|
||||||
|
|
||||||
|
- output_file_handler = logging.FileHandler(LOGGER_FILE)
|
||||||
|
handler_format = logging.Formatter(LOGGER_FORMAT, datefmt=DATE_FORMAT)
|
||||||
|
- output_file_handler.setFormatter(handler_format)
|
||||||
|
|
||||||
|
# Stdout
|
||||||
|
stdout_handler = logging.StreamHandler(sys.stdout)
|
||||||
|
stdout_handler.setFormatter(handler_format)
|
||||||
|
|
||||||
|
return LoggerConfig(
|
||||||
|
- handlers=[output_file_handler, stdout_handler],
|
||||||
|
+ handlers=[stdout_handler],
|
||||||
|
format="%(levelname)s: %(asctime)s \t%(message)s",
|
||||||
|
date_format="%d-%b-%y %H:%M:%S",
|
||||||
|
- logger_file=LOGGER_FILE,
|
||||||
|
+ logger_file=None,
|
||||||
|
level=log_level,
|
||||||
|
)
|
||||||
|
|
||||||
|
diff --git a/mealie/routes/admin/admin_log.py b/mealie/routes/admin/admin_log.py
|
||||||
|
index ac12c12e..0de98b99 100644
|
||||||
|
--- a/mealie/routes/admin/admin_log.py
|
||||||
|
+++ b/mealie/routes/admin/admin_log.py
|
||||||
|
@@ -1,6 +1,5 @@
|
||||||
|
from fastapi import APIRouter
|
||||||
|
|
||||||
|
-from mealie.core.root_logger import LOGGER_FILE
|
||||||
|
from mealie.core.security import create_file_token
|
||||||
|
|
||||||
|
router = APIRouter(prefix="/logs")
|
||||||
|
@@ -9,15 +8,13 @@ router = APIRouter(prefix="/logs")
|
||||||
|
@router.get("/{num}")
|
||||||
|
async def get_log(num: int):
|
||||||
|
"""Doc Str"""
|
||||||
|
- with open(LOGGER_FILE, "rb") as f:
|
||||||
|
- log_text = tail(f, num)
|
||||||
|
- return log_text
|
||||||
|
+ return ""
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("")
|
||||||
|
async def get_log_file():
|
||||||
|
"""Returns a token to download a file"""
|
||||||
|
- return {"fileToken": create_file_token(LOGGER_FILE)}
|
||||||
|
+ return {"fileToken": create_file_token("nofile")}
|
||||||
|
|
||||||
|
|
||||||
|
def tail(f, lines=20):
|
||||||
|
diff --git a/mealie/routes/admin/admin_maintenance.py b/mealie/routes/admin/admin_maintenance.py
|
||||||
|
index 23ef8369..322b580f 100644
|
||||||
|
--- a/mealie/routes/admin/admin_maintenance.py
|
||||||
|
+++ b/mealie/routes/admin/admin_maintenance.py
|
||||||
|
@@ -6,7 +6,6 @@ from pathlib import Path
|
||||||
|
|
||||||
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
|
-from mealie.core.root_logger import LOGGER_FILE
|
||||||
|
from mealie.pkgs.stats import fs_stats
|
||||||
|
from mealie.routes._base import BaseAdminController, controller
|
||||||
|
from mealie.schema.admin import MaintenanceSummary
|
||||||
|
@@ -73,8 +72,6 @@ class AdminMaintenanceController(BaseAdminController):
|
||||||
|
Get the maintenance summary
|
||||||
|
"""
|
||||||
|
log_file_size = 0
|
||||||
|
- with contextlib.suppress(FileNotFoundError):
|
||||||
|
- log_file_size = os.path.getsize(LOGGER_FILE)
|
||||||
|
|
||||||
|
return MaintenanceSummary(
|
||||||
|
data_dir_size=fs_stats.pretty_size(fs_stats.get_dir_size(self.folders.DATA_DIR)),
|
||||||
|
@@ -85,7 +82,7 @@ class AdminMaintenanceController(BaseAdminController):
|
||||||
|
|
||||||
|
@router.get("/logs", response_model=MaintenanceLogs)
|
||||||
|
def get_logs(self, lines: int = 200):
|
||||||
|
- return MaintenanceLogs(logs=tail_log(LOGGER_FILE, lines))
|
||||||
|
+ return MaintenanceLogs(logs="")
|
||||||
|
|
||||||
|
@router.get("/storage", response_model=MaintenanceStorageDetails)
|
||||||
|
def get_storage_details(self):
|
||||||
|
@@ -137,9 +134,6 @@ class AdminMaintenanceController(BaseAdminController):
|
||||||
|
Purges the logs
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
- with contextlib.suppress(FileNotFoundError):
|
||||||
|
- os.remove(LOGGER_FILE)
|
||||||
|
- LOGGER_FILE.touch()
|
||||||
|
return SuccessResponse.respond("Logs cleaned")
|
||||||
|
except Exception as e:
|
||||||
|
raise HTTPException(status_code=500, detail=ErrorResponse.respond("Failed to clean logs")) from e
|
166
pkgs/by-name/me/mealie/package.nix
Normal file
166
pkgs/by-name/me/mealie/package.nix
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
{ lib
|
||||||
|
, callPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, makeWrapper
|
||||||
|
, nixosTests
|
||||||
|
, python3Packages
|
||||||
|
, stdenv
|
||||||
|
, writeShellScript
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "1.2.0";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mealie-recipes";
|
||||||
|
repo = "mealie";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-Kc49XDWcZLeJaYgiAO2/mHeVSOLMeiPr3U32e0IYfdU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
frontend = callPackage (import ./mealie-frontend.nix src version) { };
|
||||||
|
|
||||||
|
pythonpkgs = python3Packages.override {
|
||||||
|
overrides = self: super: {
|
||||||
|
pydantic = python3Packages.pydantic_1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
python = pythonpkgs.python;
|
||||||
|
|
||||||
|
crfpp = stdenv.mkDerivation {
|
||||||
|
pname = "mealie-crfpp";
|
||||||
|
version = "unstable-2024-02-12";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mealie-recipes";
|
||||||
|
repo = "crfpp";
|
||||||
|
rev = "c56dd9f29469c8a9f34456b8c0d6ae0476110516";
|
||||||
|
hash = "sha256-XNps3ZApU8m07bfPEnvip1w+3hLajdn9+L5+IpEaP0c=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mealie_patch = { name, commit, hash }: fetchpatch {
|
||||||
|
inherit name hash;
|
||||||
|
url = "https://github.com/mealie-recipes/mealie/commit/${commit}.patch";
|
||||||
|
};
|
||||||
|
|
||||||
|
in pythonpkgs.buildPythonPackage rec {
|
||||||
|
pname = "mealie";
|
||||||
|
inherit version src;
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# See https://github.com/mealie-recipes/mealie/pull/3102
|
||||||
|
# Replace hardcoded paths in code with environment variables (meant for inside Docker only)
|
||||||
|
# So we can configure easily where the data is stored on the server
|
||||||
|
(mealie_patch {
|
||||||
|
name = "model-path.patch";
|
||||||
|
commit = "e445705c5d26b895d806b96b2f330d4e9aac3723";
|
||||||
|
hash = "sha256-cf0MwvT81lNBTjvag8UUEbXkBu8Jyi/LFwUcs4lBVcY=";
|
||||||
|
})
|
||||||
|
(mealie_patch {
|
||||||
|
name = "alembic-cfg-path.patch";
|
||||||
|
commit = "06c528bfac0708af66aa0629f2e2232ddf07768f";
|
||||||
|
hash = "sha256-IOgdZK7dmWeX2ox16J9v+bOS7nHgCMvCJy6RNJLj0p8=";
|
||||||
|
})
|
||||||
|
./mealie-logs-to-stdout.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pythonpkgs.poetry-core
|
||||||
|
pythonpkgs.pythonRelaxDepsHook
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
dontWrapPythonPrograms = true;
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
pythonRelaxDeps = true;
|
||||||
|
|
||||||
|
propagatedBuildInputs = with pythonpkgs; [
|
||||||
|
aiofiles
|
||||||
|
alembic
|
||||||
|
aniso8601
|
||||||
|
appdirs
|
||||||
|
apprise
|
||||||
|
bcrypt
|
||||||
|
extruct
|
||||||
|
fastapi
|
||||||
|
gunicorn
|
||||||
|
html2text
|
||||||
|
httpx
|
||||||
|
jinja2
|
||||||
|
lxml
|
||||||
|
orjson
|
||||||
|
paho-mqtt
|
||||||
|
passlib
|
||||||
|
pillow
|
||||||
|
psycopg2
|
||||||
|
pyhumps
|
||||||
|
pytesseract
|
||||||
|
python-dotenv
|
||||||
|
python-jose
|
||||||
|
python-ldap
|
||||||
|
python-multipart
|
||||||
|
python-slugify
|
||||||
|
pyyaml
|
||||||
|
rapidfuzz
|
||||||
|
recipe-scrapers
|
||||||
|
sqlalchemy
|
||||||
|
tzdata
|
||||||
|
uvicorn
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace mealie/__init__.py \
|
||||||
|
--replace-fail '__version__ = ' '__version__ = "${version}" #'
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = let
|
||||||
|
start_script = writeShellScript "start-mealie" ''
|
||||||
|
${lib.getExe pythonpkgs.gunicorn} "$@" -k uvicorn.workers.UvicornWorker mealie.app:app;
|
||||||
|
'';
|
||||||
|
init_db = writeShellScript "init-mealie-db" ''
|
||||||
|
${python.interpreter} $OUT/${python.sitePackages}/mealie/scripts/install_model.py
|
||||||
|
${python.interpreter} $OUT/${python.sitePackages}/mealie/db/init_db.py
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
mkdir -p $out/config $out/bin $out/libexec
|
||||||
|
rm -f $out/bin/*
|
||||||
|
|
||||||
|
substitute ${src}/alembic.ini $out/config/alembic.ini \
|
||||||
|
--replace-fail 'script_location = alembic' 'script_location = ${src}/alembic'
|
||||||
|
|
||||||
|
makeWrapper ${start_script} $out/bin/mealie \
|
||||||
|
--set PYTHONPATH "$out/${python.sitePackages}:${python.pkgs.makePythonPath propagatedBuildInputs}" \
|
||||||
|
--set LD_LIBRARY_PATH "${crfpp}/lib" \
|
||||||
|
--set STATIC_FILES "${frontend}" \
|
||||||
|
--set PATH "${lib.makeBinPath [ crfpp ]}"
|
||||||
|
|
||||||
|
makeWrapper ${init_db} $out/libexec/init_db \
|
||||||
|
--set PYTHONPATH "$out/${python.sitePackages}:${python.pkgs.makePythonPath propagatedBuildInputs}" \
|
||||||
|
--set OUT "$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = with python.pkgs; [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.tests = {
|
||||||
|
inherit (nixosTests) mealie;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A self hosted recipe manager and meal planner";
|
||||||
|
longDescription = ''
|
||||||
|
Mealie is a self hosted recipe manager and meal planner with a REST API and a reactive frontend
|
||||||
|
application built in NuxtJS for a pleasant user experience for the whole family. Easily add recipes into your
|
||||||
|
database by providing the URL and Mealie will automatically import the relevant data or add a family recipe with
|
||||||
|
the UI editor.
|
||||||
|
'';
|
||||||
|
homepage = "https://mealie.io";
|
||||||
|
changelog = "https://github.com/mealie-recipes/mealie/releases/tag/${src.rev}";
|
||||||
|
license = licenses.agpl3Only;
|
||||||
|
maintainers = with maintainers; [ litchipi ];
|
||||||
|
mainProgram = "mealie";
|
||||||
|
};
|
||||||
|
}
|
74
pkgs/by-name/op/open-scq30/package.nix
Normal file
74
pkgs/by-name/op/open-scq30/package.nix
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{ lib
|
||||||
|
, rustPlatform
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pkg-config
|
||||||
|
, protobuf
|
||||||
|
, wrapGAppsHook4
|
||||||
|
, cairo
|
||||||
|
, dbus
|
||||||
|
, gdk-pixbuf
|
||||||
|
, glib
|
||||||
|
, gtk4
|
||||||
|
, libadwaita
|
||||||
|
, pango
|
||||||
|
, stdenv
|
||||||
|
, darwin
|
||||||
|
, cargo-make
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "open-scq30";
|
||||||
|
version = "1.10.6";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Oppzippy";
|
||||||
|
repo = "OpenSCQ30";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-qYWLf0ns4YSq+yAspVTMvKQi861iUMJar2wjqm+BV/0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
protobuf
|
||||||
|
wrapGAppsHook4
|
||||||
|
cargo-make
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
cairo
|
||||||
|
dbus
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
gtk4
|
||||||
|
libadwaita
|
||||||
|
pango
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
darwin.apple_sdk.frameworks.AppKit
|
||||||
|
darwin.apple_sdk.frameworks.CoreGraphics
|
||||||
|
darwin.apple_sdk.frameworks.Foundation
|
||||||
|
];
|
||||||
|
|
||||||
|
cargoHash = "sha256-BQLNm+yyimBh7WomrccdQ2lvrQzCNXf4MEa1LlPhck0=";
|
||||||
|
|
||||||
|
INSTALL_PREFIX = placeholder "out";
|
||||||
|
|
||||||
|
# Requires headphones
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
cargo make --profile release build
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cargo make --profile release install
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Cross platform application for controlling settings of Soundcore headphones.";
|
||||||
|
homepage = "https://github.com/Oppzippy/OpenSCQ30";
|
||||||
|
changelog = "https://github.com/Oppzippy/OpenSCQ30/blob/${src.rev}/CHANGELOG.md";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = with maintainers; [ mkg20001 ];
|
||||||
|
mainProgram = "open-scq30";
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,160 @@
|
||||||
|
From 8e21cf46551091c884014985d3e0dd9704d6dc04 Mon Sep 17 00:00:00 2001
|
||||||
|
From: OPNA2608 <opna2608@protonmail.com>
|
||||||
|
Date: Wed, 14 Feb 2024 16:00:24 +0100
|
||||||
|
Subject: [PATCH] Support wrapping for Nixpkgs
|
||||||
|
|
||||||
|
---
|
||||||
|
src/CMakeLists.txt | 24 +++++++++++++++++++-----
|
||||||
|
src/main.cpp | 8 +++++---
|
||||||
|
src/plugin.cpp | 19 +++++++++++++++++--
|
||||||
|
tests/CMakeLists.txt | 18 ++++++++++++++----
|
||||||
|
4 files changed, 55 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||||
|
index cd3131d0..fcd78bdf 100644
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -1,13 +1,27 @@
|
||||||
|
include_directories(${GLIB_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
-add_definitions(-DI18N_DIRECTORY="${CMAKE_INSTALL_FULL_LOCALEDIR}")
|
||||||
|
add_definitions(-DI18N_DOMAIN="lomiri-system-settings")
|
||||||
|
-add_definitions(-DPLUGIN_PRIVATE_MODULE_DIR="${PLUGIN_PRIVATE_MODULE_DIR}")
|
||||||
|
+
|
||||||
|
+add_definitions(-DNIX_FALLBACK_PREFIX="${CMAKE_INSTALL_PREFIX}")
|
||||||
|
+
|
||||||
|
+set(I18N_DIRECTORY "${CMAKE_INSTALL_FULL_LOCALEDIR}")
|
||||||
|
+
|
||||||
|
+list(APPEND NIX_LOCATION_VARIABLES
|
||||||
|
+ I18N_DIRECTORY
|
||||||
|
+ PLUGIN_PRIVATE_MODULE_DIR
|
||||||
|
+ PLUGIN_MANIFEST_DIR
|
||||||
|
+ PLUGIN_QML_DIR
|
||||||
|
+ PLUGIN_MODULE_DIR
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+foreach(locvar IN LISTS NIX_LOCATION_VARIABLES)
|
||||||
|
+ string(REPLACE "${CMAKE_INSTALL_PREFIX}" "" NIX_${locvar}_RELATIVE "${${locvar}}")
|
||||||
|
+ add_definitions(-D${locvar}=do_not_use_me)
|
||||||
|
+ add_definitions(-DNIX_${locvar}_RELATIVE="${NIX_${locvar}_RELATIVE}")
|
||||||
|
+endforeach()
|
||||||
|
+
|
||||||
|
add_definitions(-DMANIFEST_DIR="${MANIFEST_DIR}")
|
||||||
|
-add_definitions(-DPLUGIN_MANIFEST_DIR="${PLUGIN_MANIFEST_DIR}")
|
||||||
|
add_definitions(-DQML_DIR="${QML_DIR}")
|
||||||
|
-add_definitions(-DPLUGIN_QML_DIR="${PLUGIN_QML_DIR}")
|
||||||
|
-add_definitions(-DPLUGIN_MODULE_DIR="${PLUGIN_MODULE_DIR}")
|
||||||
|
|
||||||
|
add_subdirectory(SystemSettings)
|
||||||
|
|
||||||
|
diff --git a/src/main.cpp b/src/main.cpp
|
||||||
|
index 64441da3..cfcabe42 100644
|
||||||
|
--- a/src/main.cpp
|
||||||
|
+++ b/src/main.cpp
|
||||||
|
@@ -42,6 +42,8 @@ int main(int argc, char **argv)
|
||||||
|
QByteArray mountPoint = qEnvironmentVariableIsSet("SNAP") ? qgetenv("SNAP") : "";
|
||||||
|
bool isSnap = !mountPoint.isEmpty();
|
||||||
|
|
||||||
|
+ QByteArray dataPrefix = qEnvironmentVariableIsSet("NIX_LSS_PREFIX") ? qgetenv("NIX_LSS_PREFIX") : NIX_FALLBACK_PREFIX;
|
||||||
|
+
|
||||||
|
// Ensure printing environment is correct.
|
||||||
|
qputenv("QT_PRINTER_MODULE", "cupsprintersupport");
|
||||||
|
|
||||||
|
@@ -78,12 +80,12 @@ int main(int argc, char **argv)
|
||||||
|
qmlRegisterType<LomiriSystemSettings::PluginManager>("SystemSettings", 1, 0, "PluginManager");
|
||||||
|
view.engine()->rootContext()->setContextProperty("Utilities", &utils);
|
||||||
|
view.setResizeMode(QQuickView::SizeRootObjectToView);
|
||||||
|
- view.engine()->addImportPath(mountPoint + PLUGIN_PRIVATE_MODULE_DIR);
|
||||||
|
- view.engine()->addImportPath(mountPoint + PLUGIN_QML_DIR);
|
||||||
|
+ view.engine()->addImportPath(mountPoint + dataPrefix + "/" + NIX_PLUGIN_PRIVATE_MODULE_DIR_RELATIVE);
|
||||||
|
+ view.engine()->addImportPath(mountPoint + dataPrefix + "/" + NIX_PLUGIN_QML_DIR_RELATIVE);
|
||||||
|
view.rootContext()->setContextProperty("defaultPlugin", defaultPlugin);
|
||||||
|
view.rootContext()->setContextProperty("mountPoint", mountPoint);
|
||||||
|
view.rootContext()->setContextProperty("isSnap", isSnap);
|
||||||
|
- view.rootContext()->setContextProperty("i18nDirectory", mountPoint + I18N_DIRECTORY);
|
||||||
|
+ view.rootContext()->setContextProperty("i18nDirectory", mountPoint + dataPrefix + "/" + NIX_I18N_DIRECTORY_RELATIVE);
|
||||||
|
view.rootContext()->setContextProperty("pluginOptions", pluginOptions);
|
||||||
|
view.rootContext()->setContextProperty("view", &view);
|
||||||
|
view.setSource(QUrl("qrc:/qml/MainWindow.qml"));
|
||||||
|
diff --git a/src/plugin.cpp b/src/plugin.cpp
|
||||||
|
index 133821af..6a1a152c 100644
|
||||||
|
--- a/src/plugin.cpp
|
||||||
|
+++ b/src/plugin.cpp
|
||||||
|
@@ -36,9 +36,16 @@
|
||||||
|
#include <LomiriSystemSettings/ItemBase>
|
||||||
|
#include <LomiriSystemSettings/PluginInterface>
|
||||||
|
|
||||||
|
+#include <libintl.h>
|
||||||
|
+
|
||||||
|
using namespace LomiriSystemSettings;
|
||||||
|
|
||||||
|
-static const QLatin1String pluginModuleDir{PLUGIN_MODULE_DIR};
|
||||||
|
+const QLatin1String getWrapperPrefix()
|
||||||
|
+{
|
||||||
|
+ const QLatin1String pluginWrapperPrefix {qEnvironmentVariableIsSet("NIX_LSS_PREFIX") ? qgetenv("NIX_LSS_PREFIX") : NIX_FALLBACK_PREFIX};
|
||||||
|
+ return pluginWrapperPrefix;
|
||||||
|
+}
|
||||||
|
+static const QLatin1String pluginModuleDirRelative{NIX_PLUGIN_MODULE_DIR_RELATIVE};
|
||||||
|
static const QLatin1String pluginQmlDir{QML_DIR};
|
||||||
|
|
||||||
|
namespace LomiriSystemSettings {
|
||||||
|
@@ -89,6 +96,11 @@ PluginPrivate::PluginPrivate(Plugin *q, const QFileInfo &manifest):
|
||||||
|
|
||||||
|
m_data = json.toVariant().toMap();
|
||||||
|
m_dataPath = manifest.absolutePath();
|
||||||
|
+
|
||||||
|
+ QString textDomain = m_data.value(keyTranslations).toString();
|
||||||
|
+ QString textDomainDir = QString("%1/%2")
|
||||||
|
+ .arg(getWrapperPrefix()).arg(NIX_I18N_DIRECTORY_RELATIVE);
|
||||||
|
+ bindtextdomain(qPrintable(textDomain), qPrintable(textDomainDir));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PluginPrivate::ensureLoaded() const
|
||||||
|
@@ -110,8 +122,11 @@ bool PluginPrivate::ensureLoaded() const
|
||||||
|
ctx->contextProperty("mountPoint").value<QByteArray>() :
|
||||||
|
"";
|
||||||
|
|
||||||
|
+ QString wrapperModuleDir = QString("%1/%2")
|
||||||
|
+ .arg(getWrapperPrefix()).arg(pluginModuleDirRelative);
|
||||||
|
+
|
||||||
|
QString name = QString("%1%2/lib%3.so")
|
||||||
|
- .arg(mountPoint).arg(pluginModuleDir).arg(plugin);
|
||||||
|
+ .arg(mountPoint).arg(wrapperModuleDir).arg(plugin);
|
||||||
|
|
||||||
|
m_loader.setFileName(name);
|
||||||
|
if (Q_UNLIKELY(!m_loader.load())) {
|
||||||
|
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
|
||||||
|
index c10b2e2d..a998b641 100644
|
||||||
|
--- a/tests/CMakeLists.txt
|
||||||
|
+++ b/tests/CMakeLists.txt
|
||||||
|
@@ -9,13 +9,23 @@ include_directories(
|
||||||
|
set(XVFB_CMD xvfb-run -a -s "-screen 0 640x480x24")
|
||||||
|
|
||||||
|
add_definitions(-DI18N_DOMAIN="lomiri-system-settings")
|
||||||
|
-add_definitions(-DPLUGIN_PRIVATE_MODULE_DIR="${PLUGIN_PRIVATE_MODULE_DIR}")
|
||||||
|
-add_definitions(-DPLUGIN_MODULE_DIR="${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
+
|
||||||
|
+add_definitions(-DNIX_FALLBACK_PREFIX="${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
+
|
||||||
|
+add_definitions(-DI18N_DIRECTORY=do_not_use_me)
|
||||||
|
+add_definitions(-DNIX_I18N_DIRECTORY_RELATIVE="")
|
||||||
|
+add_definitions(-DPLUGIN_PRIVATE_MODULE_DIR=do_not_use_me)
|
||||||
|
+add_definitions(-DNIX_PLUGIN_PRIVATE_MODULE_DIR_RELATIVE="")
|
||||||
|
+add_definitions(-DPLUGIN_MODULE_DIR=do_not_use_me)
|
||||||
|
+add_definitions(-DNIX_PLUGIN_MODULE_DIR_RELATIVE="")
|
||||||
|
+add_definitions(-DPLUGIN_MANIFEST_DIR=do_not_use_me)
|
||||||
|
+add_definitions(-DNIX_PLUGIN_MANIFEST_DIR_RELATIVE="../../tests/data")
|
||||||
|
+add_definitions(-DPLUGIN_QML_DIR=do_not_use_me)
|
||||||
|
+add_definitions(-DNIX_PLUGIN_QML_DIR_RELATIVE="")
|
||||||
|
+
|
||||||
|
add_definitions(-DMANIFEST_DIR="data")
|
||||||
|
-add_definitions(-DPLUGIN_MANIFEST_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data")
|
||||||
|
add_definitions(-DQML_TEST_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
add_definitions(-DQML_DIR="${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
-add_definitions(-DPLUGIN_QML_DIR="${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
add_definitions(-DSYSTEM_IMAGE_DBUS_TEMPLATE="${CMAKE_SOURCE_DIR}/tests/autopilot/lomiri_system_settings/tests/systemimage.py")
|
||||||
|
|
||||||
|
add_library(test-plugin SHARED test-plugin.cpp test-plugin.h)
|
||||||
|
--
|
||||||
|
2.42.0
|
||||||
|
|
|
@ -0,0 +1,253 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitLab
|
||||||
|
, fetchpatch
|
||||||
|
, gitUpdater
|
||||||
|
, testers
|
||||||
|
, accountsservice
|
||||||
|
, ayatana-indicator-datetime
|
||||||
|
, cmake
|
||||||
|
, cmake-extras
|
||||||
|
, content-hub
|
||||||
|
, dbus
|
||||||
|
, deviceinfo
|
||||||
|
, geonames
|
||||||
|
, gettext
|
||||||
|
, glib
|
||||||
|
, gnome-desktop
|
||||||
|
, gsettings-qt
|
||||||
|
, gtk3
|
||||||
|
, icu
|
||||||
|
, intltool
|
||||||
|
, json-glib
|
||||||
|
, libqofono
|
||||||
|
, libqtdbustest
|
||||||
|
, libqtdbusmock
|
||||||
|
, lomiri-indicator-network
|
||||||
|
, lomiri-schemas
|
||||||
|
, lomiri-settings-components
|
||||||
|
, lomiri-ui-toolkit
|
||||||
|
, maliit-keyboard
|
||||||
|
, pkg-config
|
||||||
|
, python3
|
||||||
|
, qmenumodel
|
||||||
|
, qtbase
|
||||||
|
, qtdeclarative
|
||||||
|
, qtmultimedia
|
||||||
|
, ubports-click
|
||||||
|
, upower
|
||||||
|
, validatePkgConfig
|
||||||
|
, wrapGAppsHook
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, xvfb-run
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "lomiri-system-settings-unwrapped";
|
||||||
|
version = "1.0.2";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "ubports";
|
||||||
|
repo = "development/core/lomiri-system-settings";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-gi6ZujIs0AEDLsqcTNlRNSS8SyqEU6q0+xaDf55XwuM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"dev"
|
||||||
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Remove when https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/433 merged & in release
|
||||||
|
(fetchpatch {
|
||||||
|
name = "0001-lomiri-system-settings-plugins-language-Fix-linking-against-accountsservice.patch";
|
||||||
|
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/75763ae2f9669f5f7f29aec3566606e6f6cb7478.patch";
|
||||||
|
hash = "sha256-2CE0yizkaz93kK82DhaaFjKmGnMoaikrwFj4k7RN534=";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Remove when https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/434 merged & in release
|
||||||
|
(fetchpatch {
|
||||||
|
name = "0002-lomiri-system-settings-GNUInstallDirs-and-fix-absolute-path-handling.patch";
|
||||||
|
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/93ee84423f3677a608ef73addcd3ddcbe7dc1d32.patch";
|
||||||
|
hash = "sha256-lSKAhtE3oSSv7USvDbbcfBZWAtWMmuKneWawKQABIiM=";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Remove when version > 1.0.2
|
||||||
|
(fetchpatch {
|
||||||
|
name = "0003-lomiri-system-settings-Use-GSettings-for-DT2W-value.patch";
|
||||||
|
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/29e2533efcac23e41b083b11c540c9221b71de7e.patch";
|
||||||
|
hash = "sha256-d52d/b1ZdafaqhOljCg5E3I12XWtFAfG4rmn8CYngB4=";
|
||||||
|
})
|
||||||
|
] ++ lib.optionals (lib.strings.versionOlder python3.pkgs.python-dbusmock.version "0.30.1") [
|
||||||
|
# Makes tests work with newer dbusmock, but breaks with much-newer dbusmock
|
||||||
|
# See for details:
|
||||||
|
# - https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/354
|
||||||
|
# - https://gitlab.com/ubports/development/core/lomiri-system-settings/-/merge_requests/426
|
||||||
|
# Remove/adjust based on merges & next LSS release, and packaged version of dbusmock
|
||||||
|
(fetchpatch {
|
||||||
|
name = "0101-lomiri-system-settings-Pass-missing-parameters-to-dbusmock.patch";
|
||||||
|
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/b9aacd88e3789dbb7578f32b31ad5b239db227a2.patch";
|
||||||
|
hash = "sha256-jf+jMc+6QxONavlX5C9UZyX23jb6fZnYV8mWFyQGGbU=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "0102-lomiri-system-settings-Fix-BT-plugin-testIsPaired.patch";
|
||||||
|
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/e39b9728e18635413f07f9c9f6ddc73208260b2a.patch";
|
||||||
|
hash = "sha256-YUtdlQ2XcanXzsxD40SbML7fSxG75yMKz/XnaQN9YP8=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "0103-lomiri-system-settings-Fix-BT-plugin-testGet-IconName-Type.patch";
|
||||||
|
url = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/commit/9ad5d9324945f06f764d3a963dbfc7bccefe574b.patch";
|
||||||
|
# Merge conflict, relevant change handled further down
|
||||||
|
excludes = [ "CMakeLists.txt" ];
|
||||||
|
hash = "sha256-QCgkVos9Q9/8jd25rqzdEKdnBw0Re47X7B9nLH8QOQU=";
|
||||||
|
})
|
||||||
|
] ++ [
|
||||||
|
|
||||||
|
./2000-Support-wrapping-for-Nixpkgs.patch
|
||||||
|
|
||||||
|
# Make it work with regular accountsservice
|
||||||
|
# https://gitlab.com/ubports/development/core/lomiri-system-settings/-/issues/341
|
||||||
|
(fetchpatch {
|
||||||
|
name = "2001-lomiri-system-settings-disable-current-language-switching.patch";
|
||||||
|
url = "https://sources.debian.org/data/main/l/lomiri-system-settings/1.0.1-2/debian/patches/2001_disable-current-language-switching.patch";
|
||||||
|
hash = "sha256-ZOFYwxS8s6+qMFw8xDCBv3nLBOBm86m9d/VhbpOjamY=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace CMakeLists.txt \
|
||||||
|
--replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" \
|
||||||
|
|
||||||
|
# Port from lomiri-keyboard to maliit-keyboard
|
||||||
|
substituteInPlace plugins/language/CMakeLists.txt \
|
||||||
|
--replace-fail 'LOMIRI_KEYBOARD_PLUGIN_PATH=\"''${CMAKE_INSTALL_FULL_LIBDIR}/lomiri-keyboard/plugins\"' 'LOMIRI_KEYBOARD_PLUGIN_PATH=\"${lib.getLib maliit-keyboard}/lib/maliit/keyboard2/languages\"'
|
||||||
|
substituteInPlace plugins/language/{PageComponent,SpellChecking,ThemeValues}.qml plugins/language/onscreenkeyboard-plugin.cpp plugins/sound/PageComponent.qml \
|
||||||
|
--replace-fail 'com.lomiri.keyboard.maliit' 'org.maliit.keyboard.maliit'
|
||||||
|
|
||||||
|
# Decide which entries should be visible based on the current system
|
||||||
|
substituteInPlace plugins/*/*.settings \
|
||||||
|
--replace-warn '/etc' '/run/current-system/sw/etc'
|
||||||
|
|
||||||
|
# Don't use absolute paths in desktop file
|
||||||
|
substituteInPlace lomiri-system-settings.desktop.in.in \
|
||||||
|
--replace-fail 'Icon=@SETTINGS_SHARE_DIR@/system-settings.svg' 'Icon=lomiri-system-settings' \
|
||||||
|
--replace-fail 'X-Lomiri-Splash-Image=@SETTINGS_SHARE_DIR@/system-settings-app-splash.svg' 'X-Lomiri-Splash-Image=lomiri-app-launch/splash/lomiri-system-settings.svg' \
|
||||||
|
--replace-fail 'X-Screenshot=@SETTINGS_SHARE_DIR@/screenshot.png' 'X-Screenshot=lomiri-app-launch/screenshot/lomiri-system-settings.png'
|
||||||
|
'';
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
gettext
|
||||||
|
glib # glib-compile-schemas
|
||||||
|
intltool
|
||||||
|
pkg-config
|
||||||
|
validatePkgConfig
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
accountsservice
|
||||||
|
cmake-extras
|
||||||
|
deviceinfo
|
||||||
|
geonames
|
||||||
|
gnome-desktop
|
||||||
|
gsettings-qt
|
||||||
|
gtk3
|
||||||
|
icu
|
||||||
|
json-glib
|
||||||
|
qtbase
|
||||||
|
ubports-click
|
||||||
|
upower
|
||||||
|
];
|
||||||
|
|
||||||
|
# QML components and schemas the wrapper needs
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
ayatana-indicator-datetime
|
||||||
|
content-hub
|
||||||
|
libqofono
|
||||||
|
lomiri-indicator-network
|
||||||
|
lomiri-schemas
|
||||||
|
lomiri-settings-components
|
||||||
|
lomiri-ui-toolkit
|
||||||
|
maliit-keyboard
|
||||||
|
qmenumodel
|
||||||
|
qtdeclarative
|
||||||
|
qtmultimedia
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
dbus
|
||||||
|
(python3.withPackages (ps: with ps; [
|
||||||
|
python-dbusmock
|
||||||
|
]))
|
||||||
|
xvfb-run
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
libqtdbustest
|
||||||
|
libqtdbusmock
|
||||||
|
];
|
||||||
|
|
||||||
|
# Not wrapping in this derivation
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
(lib.cmakeBool "ENABLE_LIBDEVICEINFO" true)
|
||||||
|
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
||||||
|
(lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
|
||||||
|
# Exclude tests
|
||||||
|
"-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
|
||||||
|
# Hits OpenGL context issue inside lomiri-ui-toolkit, see derivation of that on details
|
||||||
|
"^testmouse"
|
||||||
|
"^tst_notifications"
|
||||||
|
]})")
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
|
||||||
|
# CMake option had to be excluded from earlier patchset
|
||||||
|
env.NIX_CFLAGS_COMPILE = lib.optionalString (lib.strings.versionOlder python3.pkgs.python-dbusmock.version "0.30.1") "-DMODERN_PYTHON_DBUSMOCK";
|
||||||
|
|
||||||
|
# The linking for this normally ignores missing symbols, which is inconvenient for figuring out why subpages may be
|
||||||
|
# failing to load their library modules. Force it to report them at linktime instead of runtime.
|
||||||
|
env.NIX_LDFLAGS = "--unresolved-symbols=report-all";
|
||||||
|
|
||||||
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||||
|
|
||||||
|
# Parallelism breaks D-Bus tests
|
||||||
|
enableParallelChecking = false;
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
|
||||||
|
export QML2_IMPORT_PATH=${lib.makeSearchPathOutput "bin" qtbase.qtQmlPrefix ([ qtdeclarative lomiri-ui-toolkit lomiri-settings-components ] ++ lomiri-ui-toolkit.propagatedBuildInputs)}
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||||
|
|
||||||
|
mkdir -p $out/share/{icons/hicolor/scalable/apps,lomiri-app-launch/{splash,screenshot}}
|
||||||
|
|
||||||
|
ln -s $out/share/lomiri-system-settings/system-settings.svg $out/share/icons/hicolor/scalable/apps/lomiri-system-settings.svg
|
||||||
|
ln -s $out/share/lomiri-system-settings/system-settings-app-splash.svg $out/share/lomiri-app-launch/splash/lomiri-system-settings.svg
|
||||||
|
ln -s $out/share/lomiri-system-settings/screenshot.png $out/share/lomiri-app-launch/screenshot/lomiri-system-settings.png
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||||
|
updateScript = gitUpdater { };
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "System Settings application for Lomiri";
|
||||||
|
homepage = "https://gitlab.com/ubports/development/core/lomiri-system-settings";
|
||||||
|
changelog = "https://gitlab.com/ubports/development/core/lomiri-system-settings/-/blob/${finalAttrs.version}/ChangeLog";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
mainProgram = "lomiri-system-settings";
|
||||||
|
maintainers = teams.lomiri.members;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
pkgConfigModules = [
|
||||||
|
"LomiriSystemSettings"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
|
@ -0,0 +1,89 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitLab
|
||||||
|
, biometryd
|
||||||
|
, cmake
|
||||||
|
, libqtdbusmock
|
||||||
|
, libqtdbustest
|
||||||
|
, lomiri-system-settings-unwrapped
|
||||||
|
, pkg-config
|
||||||
|
, polkit
|
||||||
|
, python3
|
||||||
|
, qtbase
|
||||||
|
, qtdeclarative
|
||||||
|
, trust-store
|
||||||
|
, xvfb-run
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "lomiri-system-settings-security-privacy";
|
||||||
|
version = "1.0.2";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
owner = "ubports";
|
||||||
|
repo = "development/core/lomiri-system-settings-security-privacy";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-d7OgxV362gJ3t5N+DEFgwyK+m6Ij6juRPuxfmbCg68Y=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# CMake pkg_get_variable cannot replace prefix variable yet
|
||||||
|
for pcvar in plugin_manifest_dir plugin_private_module_dir plugin_qml_dir; do
|
||||||
|
pcvarname=$(echo $pcvar | tr '[:lower:]' '[:upper:]')
|
||||||
|
substituteInPlace CMakeLists.txt \
|
||||||
|
--replace-fail "pkg_get_variable($pcvarname LomiriSystemSettings $pcvar)" "set($pcvarname $(pkg-config LomiriSystemSettings --define-variable=prefix=$out --define-variable=libdir=$out/lib --variable=$pcvar))"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
python3
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
lomiri-system-settings-unwrapped
|
||||||
|
polkit
|
||||||
|
qtbase
|
||||||
|
qtdeclarative
|
||||||
|
trust-store
|
||||||
|
];
|
||||||
|
|
||||||
|
# QML components and schemas the wrapper needs
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
biometryd
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
xvfb-run
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
libqtdbusmock
|
||||||
|
libqtdbustest
|
||||||
|
];
|
||||||
|
|
||||||
|
# Plugin library & modules for LSS
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
|
||||||
|
];
|
||||||
|
|
||||||
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Security and privacy settings plugin for Lomiri system settings";
|
||||||
|
homepage = "https://gitlab.com/ubports/development/core/lomiri-system-settings-security-privacy";
|
||||||
|
changelog = "https://gitlab.com/ubports/development/core/lomiri-system-settings-security-privacy/-/blob/${finalAttrs.version}/ChangeLog";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = teams.lomiri.members;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
})
|
|
@ -0,0 +1,70 @@
|
||||||
|
{ stdenvNoCC
|
||||||
|
, lib
|
||||||
|
, nixosTests
|
||||||
|
, glib
|
||||||
|
, lndir
|
||||||
|
, lomiri-system-settings-unwrapped
|
||||||
|
, lomiri-system-settings-security-privacy
|
||||||
|
, wrapGAppsHook
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, plugins ? [ lomiri-system-settings-security-privacy ]
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
|
pname = "lomiri-system-settings";
|
||||||
|
inherit (lomiri-system-settings-unwrapped) version;
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
dontConfigure = true;
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
lndir
|
||||||
|
wrapGAppsHook
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
glib # schema hook
|
||||||
|
lomiri-system-settings-unwrapped
|
||||||
|
] ++ plugins;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${lib.getExe lomiri-system-settings-unwrapped} $out/bin/${finalAttrs.meta.mainProgram}
|
||||||
|
|
||||||
|
for inheritedPath in share/lomiri-app-launch share/lomiri-url-dispatcher share/applications share/icons; do
|
||||||
|
mkdir -p $out/$inheritedPath
|
||||||
|
lndir ${lomiri-system-settings-unwrapped}/$inheritedPath $out/$inheritedPath
|
||||||
|
done
|
||||||
|
|
||||||
|
for mergedPath in lib/lomiri-system-settings share/lomiri-system-settings share/locale; do
|
||||||
|
mkdir -p $out/$mergedPath
|
||||||
|
for lssPart in ${lomiri-system-settings-unwrapped} ${lib.strings.concatStringsSep " " plugins}; do
|
||||||
|
lndir $lssPart/$mergedPath $out/$mergedPath
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontWrapGApps = true;
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
qtWrapperArgs+=(
|
||||||
|
"''${gappsWrapperArgs[@]}"
|
||||||
|
--set NIX_LSS_PREFIX "$out"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.tests.standalone = nixosTests.lomiri-system-settings;
|
||||||
|
|
||||||
|
meta = lomiri-system-settings-unwrapped.meta // {
|
||||||
|
description = "System Settings application for Lomiri (wrapped)";
|
||||||
|
priority = (lomiri-system-settings-unwrapped.meta.priority or 0) - 1;
|
||||||
|
};
|
||||||
|
})
|
|
@ -8,6 +8,9 @@ let
|
||||||
inherit (self) callPackage;
|
inherit (self) callPackage;
|
||||||
in {
|
in {
|
||||||
#### Core Apps
|
#### Core Apps
|
||||||
|
lomiri-system-settings-unwrapped = callPackage ./applications/lomiri-system-settings { };
|
||||||
|
lomiri-system-settings-security-privacy = callPackage ./applications/lomiri-system-settings/plugins/lomiri-system-settings-security-privacy.nix { };
|
||||||
|
lomiri-system-settings = callPackage ./applications/lomiri-system-settings/wrapper.nix { };
|
||||||
lomiri-terminal-app = callPackage ./applications/lomiri-terminal-app { };
|
lomiri-terminal-app = callPackage ./applications/lomiri-terminal-app { };
|
||||||
morph-browser = callPackage ./applications/morph-browser { };
|
morph-browser = callPackage ./applications/morph-browser { };
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@
|
||||||
, OpenGL
|
, OpenGL
|
||||||
, audiofile
|
, audiofile
|
||||||
, libiconv
|
, libiconv
|
||||||
, withStatic ? false
|
, withStatic ? stdenv.hostPlatform.isMinGW
|
||||||
# passthru.tests
|
# passthru.tests
|
||||||
, testers
|
, testers
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit openglSupport;
|
inherit openglSupport;
|
||||||
updateScript = nix-update-script { extraArgs = ["--version-regex" "release-(.*)"]; };
|
updateScript = nix-update-script { extraArgs = [ "--version-regex" "release-(.*)" ]; };
|
||||||
tests.pkg-config = testers.hasPkgConfigModules {
|
tests.pkg-config = testers.hasPkgConfigModules {
|
||||||
package = finalAttrs.finalPackage;
|
package = finalAttrs.finalPackage;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,36 +1,26 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "deployer";
|
pname = "deployer";
|
||||||
version = "6.8.0";
|
version = "7.3.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://deployer.org/releases/v${version}/${pname}.phar";
|
owner = "deployphp";
|
||||||
sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5";
|
repo = "deployer";
|
||||||
|
rev = "v${finalAttrs.version}^";
|
||||||
|
hash = "sha256-zvK7NwIACAhWN/7D8lVY1Bv8x6xKAp/L826SovQhDYg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
vendorHash = "sha256-BDq2uryNWC31AEAEZJL9zGaAPbhXZ6hmfpsnr4wlixE=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
meta = {
|
||||||
|
description = "The PHP deployment tool with support for popular frameworks out of the box";
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/deployer/deployer.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar"
|
|
||||||
|
|
||||||
# fish support currently broken: https://github.com/deployphp/deployer/issues/2527
|
|
||||||
installShellCompletion --cmd dep \
|
|
||||||
--bash <($out/bin/dep autocomplete --install) \
|
|
||||||
--zsh <($out/bin/dep autocomplete --install)
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A deployment tool for PHP";
|
|
||||||
license = licenses.mit;
|
|
||||||
homepage = "https://deployer.org/";
|
homepage = "https://deployer.org/";
|
||||||
|
license = lib.licenses.mit;
|
||||||
mainProgram = "dep";
|
mainProgram = "dep";
|
||||||
maintainers = with maintainers; teams.php.members;
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -1,42 +1,30 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
, php
|
, php
|
||||||
, mkDerivation
|
|
||||||
, fetchurl
|
|
||||||
, makeWrapper
|
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
php' = php.withExtensions ({ enabled, all }: enabled ++ [ all.ast ]);
|
(php.withExtensions({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject (finalAttrs: {
|
||||||
in
|
|
||||||
mkDerivation rec {
|
|
||||||
pname = "phan";
|
pname = "phan";
|
||||||
version = "5.4.3";
|
version = "5.4.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/phan/phan/releases/download/${version}/phan.phar";
|
owner = "phan";
|
||||||
hash = "sha256-wZU6YIlH0q18iD044y6Z5gSscBn7cI0AwRwZgT/YhOo=";
|
repo = "phan";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
meta = {
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/phan/phan.phar
|
|
||||||
makeWrapper ${php'}/bin/php $out/bin/phan \
|
|
||||||
--add-flags "$out/libexec/phan/phan.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Static analyzer for PHP";
|
description = "Static analyzer for PHP";
|
||||||
|
homepage = "https://github.com/phan/phan";
|
||||||
|
license = lib.licenses.mit;
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
|
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives
|
||||||
and attempts to prove incorrectness rather than correctness.
|
and attempts to prove incorrectness rather than correctness.
|
||||||
'';
|
'';
|
||||||
license = licenses.mit;
|
mainProgram = "phan";
|
||||||
homepage = "https://github.com/phan/phan";
|
maintainers = with lib.maintainers; [ apeschar ] ++ lib.teams.php.members;
|
||||||
maintainers = [ maintainers.apeschar ];
|
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
7486
pkgs/development/php-packages/phing/composer.lock
generated
Normal file
7486
pkgs/development/php-packages/phing/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,34 +1,29 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
(php.withExtensions({ enabled, all }: enabled ++ (with all; [ xsl ]))).buildComposerProject (finalAttrs: {
|
||||||
pname = "phing";
|
pname = "phing";
|
||||||
version = "2.17.4";
|
version = "3.0.0-rc6";
|
||||||
in
|
|
||||||
mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/phingofficial/phing/releases/download/v${version}/phing-${version}.phar";
|
owner = "phingofficial";
|
||||||
sha256 = "sha256-3QZsl5QJkFX5Z4RovMtw2ELCp8Zl4xiZsIBikakJ474=";
|
repo = "phing";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-pOt6uQaz69WuHKYZhq6FFbjyHGrEc+Bf0Sw9uCS3Nrc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
# TODO: Open a PR against https://github.com/phingofficial/phing
|
||||||
|
# Their `composer.lock` is out of date therefore, we need to provide one
|
||||||
|
composerLock = ./composer.lock;
|
||||||
|
vendorHash = "sha256-ueTbbz3FGyRcRvlcJNirHdC77Tko4RKtYMFB3+4JdnQ=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
meta = {
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/phing/phing.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/phing \
|
|
||||||
--add-flags "$out/libexec/phing/phing.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant";
|
description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant";
|
||||||
license = licenses.lgpl3;
|
|
||||||
homepage = "https://github.com/phingofficial/phing";
|
homepage = "https://github.com/phingofficial/phing";
|
||||||
maintainers = with maintainers; teams.php.members;
|
license = lib.licenses.lgpl3;
|
||||||
|
mainProgram = "phing";
|
||||||
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -1,32 +1,27 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "phive";
|
pname = "phive";
|
||||||
version = "0.15.2";
|
version = "0.15.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar";
|
owner = "phar-io";
|
||||||
sha256 = "K7B2dT7F1nL14vlql6D+fo6ewkpDnu0A/SnvlCx5Bfk=";
|
repo = "phive";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-K/YZOGANcefjfdFY1XYEQknm0bPRorlRnNGC7dEegZ0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
vendorHash = "sha256-0fJ+SyicvVONJ4FkOFTkBTekDAOjBfaLo0dZ2DYlGJU=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
meta = {
|
||||||
|
changelog = "https://github.com/phar-io/phive/releases/tag/${finalAttrs.version}";
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/phive/phive.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/phive \
|
|
||||||
--add-flags "$out/libexec/phive/phive.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
changelog = "https://github.com/phar-io/phive/releases/tag/${version}";
|
|
||||||
description = "The Phar Installation and Verification Environment (PHIVE)";
|
description = "The Phar Installation and Verification Environment (PHIVE)";
|
||||||
homepage = "https://github.com/phar-io/phive";
|
homepage = "https://github.com/phar-io/phive";
|
||||||
license = licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
maintainers = with maintainers; teams.php.members;
|
mainProgram = "phive";
|
||||||
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
1349
pkgs/development/php-packages/php-codesniffer/composer.lock
generated
Normal file
1349
pkgs/development/php-packages/php-codesniffer/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
27
pkgs/development/php-packages/php-codesniffer/default.nix
Normal file
27
pkgs/development/php-packages/php-codesniffer/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ fetchFromGitHub
|
||||||
|
, lib
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
|
php.buildComposerProject (finalAttrs: {
|
||||||
|
pname = "php-codesniffer";
|
||||||
|
version = "3.7.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "squizlabs";
|
||||||
|
repo = "PHP_CodeSniffer";
|
||||||
|
rev = "${finalAttrs.version}";
|
||||||
|
hash = "sha256-EJF9e8gyUy5SZ+lmyWFPAabqnP7Fy5t80gfXWWxLpk8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
composerLock = ./composer.lock;
|
||||||
|
vendorHash = "sha256-svkQEKKFa0yFTiOihnAzVdi3oolq3r6JmlugyBZJATA=";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
changelog = "https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/${finalAttrs.version}";
|
||||||
|
description = "PHP coding standard tool";
|
||||||
|
license = lib.licenses.bsd3;
|
||||||
|
homepage = "https://github.com/PHPCSStandards/PHP_CodeSniffer/";
|
||||||
|
maintainers = with lib.maintainers; [ javaguirre ] ++ lib.teams.php.members;
|
||||||
|
};
|
||||||
|
})
|
4747
pkgs/development/php-packages/php-cs-fixer/composer.lock
generated
Normal file
4747
pkgs/development/php-packages/php-cs-fixer/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,35 +1,30 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "php-cs-fixer";
|
pname = "php-cs-fixer";
|
||||||
version = "3.50.0";
|
version = "3.50.0";
|
||||||
in
|
|
||||||
mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar";
|
owner = "PHP-CS-Fixer";
|
||||||
sha256 = "sha256-bJd/bsb2mJbQi4J1Z2uN4A2oLG+wqyq32rNDwcLC8gc=";
|
repo = "PHP-CS-Fixer";
|
||||||
|
rev = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-T0R/TfCLG9+Vcbsm5W8/7weI+e1RuSzTBc3VmRlG74c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
# TODO: Open a PR against https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
|
||||||
|
# Missing `composer.lock` from the repository.
|
||||||
|
composerLock = ./composer.lock;
|
||||||
|
vendorHash = "sha256-kcEB7UZ++ZY5vhaoPGjaC3q1fpxYcZ/yZeMP3AdQBEk=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
meta = {
|
||||||
|
changelog = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/${finalAttrs.version}";
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \
|
|
||||||
--add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
changelog = "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/${version}";
|
|
||||||
description = "A tool to automatically fix PHP coding standards issues";
|
description = "A tool to automatically fix PHP coding standards issues";
|
||||||
license = licenses.mit;
|
|
||||||
homepage = "https://cs.symfony.com/";
|
homepage = "https://cs.symfony.com/";
|
||||||
maintainers = with maintainers; [ ] ++ teams.php.members;
|
license = lib.licenses.mit;
|
||||||
|
mainProgram = "php-cs-fixer";
|
||||||
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
2115
pkgs/development/php-packages/php-parallel-lint/composer.lock
generated
Normal file
2115
pkgs/development/php-packages/php-parallel-lint/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,48 +1,27 @@
|
||||||
{ mkDerivation, fetchFromGitHub, makeWrapper, lib, php, php81 }:
|
{ fetchFromGitHub
|
||||||
let
|
, lib
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "php-parallel-lint";
|
pname = "php-parallel-lint";
|
||||||
version = "1.3.2";
|
version = "1.3.2.999";
|
||||||
in
|
|
||||||
mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "php-parallel-lint";
|
owner = "php-parallel-lint";
|
||||||
repo = "PHP-Parallel-Lint";
|
repo = "PHP-Parallel-Lint";
|
||||||
rev = "v${version}";
|
rev = "539292fea03d718cc86e7137ad72ea35b694f2bf";
|
||||||
# `.gitattibutes` exclude `box.json` from the archive produced git.
|
hash = "sha256-VIBuS4PwRt20Ic5gYAXTv8p/5Nq/0B3VwMcp9zKbu5U=";
|
||||||
forceFetchGit = true;
|
|
||||||
sha256 = "SPP1ynxJad2m5wknGt8z94fW7Ucx8nqLvwZVmlylOgM=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
composerLock = ./composer.lock;
|
||||||
makeWrapper
|
vendorHash = "sha256-PHQ0N1eFCM4s/aPVpTsyZN5gnQpNe9Wfs6CG2RNxxbk=";
|
||||||
php.packages.composer
|
|
||||||
# box is only available for PHP ≥ 8.1 but the purpose of this tool is to validate
|
|
||||||
# that project does not use features not available on older PHP versions.
|
|
||||||
php81.packages.box
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
meta = {
|
||||||
runHook preBuild
|
|
||||||
composer dump-autoload
|
|
||||||
box compile
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D parallel-lint.phar $out/libexec/php-parallel-lint/php-parallel-lint.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/php-parallel-lint \
|
|
||||||
--add-flags "$out/libexec/php-parallel-lint/php-parallel-lint.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Tool to check syntax of PHP files faster than serial check with fancier output";
|
description = "Tool to check syntax of PHP files faster than serial check with fancier output";
|
||||||
license = licenses.bsd2;
|
|
||||||
homepage = "https://github.com/php-parallel-lint/PHP-Parallel-Lint";
|
homepage = "https://github.com/php-parallel-lint/PHP-Parallel-Lint";
|
||||||
maintainers = with maintainers; [ ] ++ teams.php.members;
|
license = lib.licenses.bsd2;
|
||||||
|
mainProgram = "parallel-lint";
|
||||||
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
{ mkDerivation, fetchurl, lib, php, makeWrapper }:
|
|
||||||
|
|
||||||
let
|
|
||||||
pname = "phpcbf";
|
|
||||||
version = "3.7.2";
|
|
||||||
in
|
|
||||||
mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcbf.phar";
|
|
||||||
sha256 = "sha256-TspzKpl98IpMl+QyZuuBIvkW05uwAqAAYA/dU5P07+E=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/phpcbf/phpcbf.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpcbf \
|
|
||||||
--add-flags "$out/libexec/phpcbf/phpcbf.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
changelog = "https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/${version}";
|
|
||||||
description = "PHP coding standard beautifier and fixer";
|
|
||||||
license = licenses.bsd3;
|
|
||||||
homepage = "https://squizlabs.github.io/PHP_CodeSniffer/";
|
|
||||||
maintainers = with maintainers; [ cmcdragonkai ] ++ teams.php.members;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
|
||||||
|
|
||||||
let
|
|
||||||
pname = "phpcs";
|
|
||||||
version = "3.7.2";
|
|
||||||
in
|
|
||||||
mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcs.phar";
|
|
||||||
sha256 = "sha256-IEIUwepbqBT7CyYIwZzKLBC/X/zJ8OPUw0qtwBeVF7c=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/phpcs/phpcs.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpcs \
|
|
||||||
--add-flags "$out/libexec/phpcs/phpcs.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
changelog = "https://github.com/squizlabs/PHP_CodeSniffer/releases/tag/${version}";
|
|
||||||
description = "PHP coding standard tool";
|
|
||||||
license = licenses.bsd3;
|
|
||||||
homepage = "https://squizlabs.github.io/PHP_CodeSniffer/";
|
|
||||||
maintainers = with maintainers; [ javaguirre ] ++ teams.php.members;
|
|
||||||
};
|
|
||||||
}
|
|
1235
pkgs/development/php-packages/phpmd/composer.lock
generated
Normal file
1235
pkgs/development/php-packages/phpmd/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,35 +1,30 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "phpmd";
|
pname = "phpmd";
|
||||||
version = "2.15.0";
|
version = "2.15.0";
|
||||||
in
|
|
||||||
mkDerivation {
|
|
||||||
inherit pname version;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/phpmd/phpmd/releases/download/${version}/phpmd.phar";
|
owner = "phpmd";
|
||||||
sha256 = "sha256-aijvVd4MdTsHDR0VgLsIoNFGAW+J8O3c72CsT8EINUQ=";
|
repo = "phpmd";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-nTuJGzOZnkqrfE9R9Vujz/zGJRLlj8+yRZmmnxWrieQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
# Missing `composer.lock` from the repository.
|
||||||
|
# Issue open at https://github.com/phpmd/phpmd/issues/1056
|
||||||
|
composerLock = ./composer.lock;
|
||||||
|
vendorHash = "sha256-vr0wQkfhXHLEz8Q5nEq5Bocu1U1nDhXUlaHBsysvuRQ=";
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
meta = {
|
||||||
|
changelog = "https://github.com/phpmd/phpmd/releases/tag/${finalAttrs.version}";
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/phpmd/phpmd.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/phpmd \
|
|
||||||
--add-flags "$out/libexec/phpmd/phpmd.phar"
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
changelog = "https://github.com/phpmd/phpmd/releases/tag/${version}";
|
|
||||||
description = "PHP code quality analyzer";
|
description = "PHP code quality analyzer";
|
||||||
license = licenses.bsd3;
|
|
||||||
homepage = "https://phpmd.org/";
|
homepage = "https://phpmd.org/";
|
||||||
maintainers = teams.php.members;
|
license = lib.licenses.bsd3;
|
||||||
|
mainProgram = "phpmd";
|
||||||
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
529
pkgs/development/php-packages/psalm/composer.lock
generated
529
pkgs/development/php-packages/psalm/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,19 +1,23 @@
|
||||||
{ lib, fetchgit, php }:
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, php
|
||||||
|
}:
|
||||||
|
|
||||||
php.buildComposerProject (finalAttrs: {
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "psalm";
|
pname = "psalm";
|
||||||
version = "5.15.0";
|
version = "5.22.2";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/vimeo/psalm.git";
|
owner = "vimeo";
|
||||||
|
repo = "psalm";
|
||||||
rev = finalAttrs.version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-rRExT82+IwgVo7pL3rrTjW/qj/MJf4m4L3PywaeSHYU=";
|
hash = "sha256-M8Ds3PQGphK8lQciWNdxWkMN35q8vdaNTWTrP1WXTeg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Open a PR against https://github.com/vimeo/psalm
|
|
||||||
# Missing `composer.lock` from the repository.
|
# Missing `composer.lock` from the repository.
|
||||||
|
# Issue open at https://github.com/vimeo/psalm/issues/10446
|
||||||
composerLock = ./composer.lock;
|
composerLock = ./composer.lock;
|
||||||
vendorHash = "sha256-Vho1ri/Qm2SYeXB9ZoXvH1vB/eSBwHnAT/pI4jjUYhU=";
|
vendorHash = "sha256-URPyV1V/8BP8fbJqyYLf+XKG786hY2BbAzUphzPyPCs=";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
changelog = "https://github.com/vimeo/psalm/releases/tag/${finalAttrs.version}";
|
changelog = "https://github.com/vimeo/psalm/releases/tag/${finalAttrs.version}";
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "google-cloud-dataproc";
|
pname = "google-cloud-dataproc";
|
||||||
version = "5.9.1";
|
version = "5.9.2";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-qDc6E6d6hIHgRBNDGUHaJ7ROP24xDUXK1rkXTX187g0=";
|
hash = "sha256-E1LjzE4UbbHwn6QodVkkjIs9nAz+zqVsJcP09j1Y5Pg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "litellm";
|
pname = "litellm";
|
||||||
version = "1.26.8";
|
version = "1.27.4";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
@ -42,7 +42,7 @@ buildPythonPackage rec {
|
||||||
owner = "BerriAI";
|
owner = "BerriAI";
|
||||||
repo = "litellm";
|
repo = "litellm";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-w2d33mYNgQ+S+000ZswyqXE8RxOUQaH89R7M6PHe020=";
|
hash = "sha256-mgBbU5vbSKjJysPQHu2FH7VzB7aCW4XJThNkpMnu1+c=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "mplhep";
|
pname = "mplhep";
|
||||||
version = "0.3.34";
|
version = "0.3.35";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-B7pCC3n5b/cDBRDcg+p53RTad8N8iwqsLyxFA4Pm5fM=";
|
hash = "sha256-0l89Vh/vmi8kHeNer2ExGE1ehn1Kw3AbEUm8C55a92w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "myuplink";
|
pname = "myuplink";
|
||||||
version = "0.4.1";
|
version = "0.5.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
disabled = pythonOlder "3.8";
|
||||||
|
@ -17,7 +17,7 @@ buildPythonPackage rec {
|
||||||
owner = "pajzo";
|
owner = "pajzo";
|
||||||
repo = "myuplink";
|
repo = "myuplink";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-zd1ZTLwgPD1m4SR5QVZWUvkjZtlB+VEfCZDsRELuYzE=";
|
hash = "sha256-UJGRQqgtbYBwfjys2sYiC3dx8Doesu34EBys5Y++qBY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pontos";
|
pname = "pontos";
|
||||||
version = "24.2.1";
|
version = "24.2.2";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.9";
|
disabled = pythonOlder "3.9";
|
||||||
|
@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||||
owner = "greenbone";
|
owner = "greenbone";
|
||||||
repo = "pontos";
|
repo = "pontos";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-lvmi/aYDGDHbiioFWovDpTCcqgh9hu97Wk2Lcqfd6qk=";
|
hash = "sha256-xg5/UDAnT6kvDfYnQn/LCHlAgpRrt19pDC8NB5RzCnc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pubnub";
|
pname = "pubnub";
|
||||||
version = "7.4.0";
|
version = "7.4.1";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -24,7 +24,7 @@ buildPythonPackage rec {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = "python";
|
repo = "python";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-XYovKAk2GEMi7GE/DVtLjMbww7guGkZzDOHC7Z6ZpJo=";
|
hash = "sha256-XaTvLX1YA1lCSMrEEmiD2JsXoMkeQz1x0MgmnF7cjcM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pygitguardian";
|
pname = "pygitguardian";
|
||||||
version = "1.13.0";
|
version = "1.14.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -24,7 +24,7 @@ buildPythonPackage rec {
|
||||||
owner = "GitGuardian";
|
owner = "GitGuardian";
|
||||||
repo = "py-gitguardian";
|
repo = "py-gitguardian";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-LRzyZAusCo4uZlXFWoRPIfPgAGO4sP0KCGYOICNZ6f4=";
|
hash = "sha256-Uw65+YOnln+IOyT+RgqMEWt5cOZsaeS8Nu8U6ooivWA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonRelaxDeps = [
|
pythonRelaxDeps = [
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "python-roborock";
|
pname = "python-roborock";
|
||||||
version = "0.39.1";
|
version = "0.39.2";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.10";
|
disabled = pythonOlder "3.10";
|
||||||
|
@ -28,7 +28,7 @@ buildPythonPackage rec {
|
||||||
owner = "humbertogontijo";
|
owner = "humbertogontijo";
|
||||||
repo = "python-roborock";
|
repo = "python-roborock";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-iFLzrjbCwBuV9RQSHoP5LOG0PIPjiTMCpvk3wqGtMgk=";
|
hash = "sha256-hgd6/3GO1r6Xmgcq3iWVxWzi3VIN8MvV27CxF6tWwgU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "drush";
|
|
||||||
version = "8.4.12";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar";
|
|
||||||
sha256 = "sha256-YtD9lD621LJJAM/ieL4KWvY4o4Uqo3+FWgjGYGdQQaw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
dontUnpack = true;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
install -D $src $out/libexec/drush/drush.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/drush \
|
|
||||||
--add-flags "$out/libexec/drush/drush.phar" \
|
|
||||||
--prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Command-line shell and Unix scripting interface for Drupal";
|
|
||||||
homepage = "https://github.com/drush-ops/drush";
|
|
||||||
license = licenses.gpl2;
|
|
||||||
maintainers = with maintainers; [ lovek323 ];
|
|
||||||
platforms = platforms.all;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,46 +1,27 @@
|
||||||
{
|
{ lib
|
||||||
stdenv
|
, fetchFromGitHub
|
||||||
, fetchurl
|
, php81
|
||||||
, makeBinaryWrapper
|
|
||||||
, php
|
|
||||||
, lib
|
|
||||||
, unzip
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
php81.buildComposerProject (finalAttrs: {
|
||||||
pname = "n98-magerun";
|
pname = "n98-magerun";
|
||||||
version = "2.3.0";
|
version = "2.3.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/netz98/n98-magerun/releases/download/${finalAttrs.version}/n98-magerun.phar";
|
owner = "netz98";
|
||||||
hash = "sha256-s+Cdr8zU3VBaBzxOh4nXjqPe+JPPxHWiFOEVS/86qOQ=";
|
repo = "n98-magerun";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-/RffdYgl2cs8mlq4vHtzUZ6j0viV8Ot/cB/cB1dstFM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
vendorHash = "sha256-n608AY6AQdVuN3hfVQk02vJQ6hl/0+4LVBOsBL5o3+8=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
makeBinaryWrapper
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/bin $out/libexec/n98-magerun
|
|
||||||
|
|
||||||
install -D $src $out/libexec/n98-magerun/n98-magerun.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/n98-magerun \
|
|
||||||
--add-flags "$out/libexec/n98-magerun/n98-magerun.phar" \
|
|
||||||
--prefix PATH : ${lib.makeBinPath [ unzip ]}
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
broken = true; # Not compatible with PHP 8.1, see https://github.com/netz98/n98-magerun/issues/1275
|
|
||||||
changelog = "https://magerun.net/category/magerun/";
|
changelog = "https://magerun.net/category/magerun/";
|
||||||
description = "The swiss army knife for Magento1/OpenMage developers";
|
description = "The swiss army knife for Magento1/OpenMage developers";
|
||||||
homepage = "https://magerun.net/";
|
homepage = "https://magerun.net/";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
mainProgram = "n98-magerun";
|
||||||
maintainers = lib.teams.php.members;
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,45 +1,27 @@
|
||||||
{
|
{ lib
|
||||||
stdenv
|
, fetchFromGitHub
|
||||||
, fetchurl
|
|
||||||
, makeBinaryWrapper
|
|
||||||
, php
|
, php
|
||||||
, lib
|
|
||||||
, unzip
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
php.buildComposerProject (finalAttrs: {
|
||||||
pname = "n98-magerun2";
|
pname = "n98-magerun2";
|
||||||
version = "7.3.1";
|
version = "7.3.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/netz98/n98-magerun2/releases/download/${finalAttrs.version}/n98-magerun2.phar";
|
owner = "netz98";
|
||||||
hash = "sha256-5G3sfyw8C3BwRqnK2o3upJTI/pENyaFCiMC4XGOkJT4=";
|
repo = "n98-magerun2";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-a1T4SmeOEKRW/xS2VBPLZt6r9JdtaJn8YVvfRnzGdb4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
vendorHash = "sha256-1j0/spum4C9j/HNVlHwUehAFYJOz7YvMVlC6dtbNYK0=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
makeBinaryWrapper
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
mkdir -p $out/bin $out/libexec/n98-magerun2
|
|
||||||
|
|
||||||
install -D $src $out/libexec/n98-magerun2/n98-magerun2.phar
|
|
||||||
makeWrapper ${php}/bin/php $out/bin/n98-magerun2 \
|
|
||||||
--add-flags "$out/libexec/n98-magerun2/n98-magerun2.phar" \
|
|
||||||
--prefix PATH : ${lib.makeBinPath [ unzip ]}
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
changelog = "https://magerun.net/category/magerun/";
|
changelog = "https://magerun.net/category/magerun/";
|
||||||
description = "The swiss army knife for Magento2 developers";
|
description = "The swiss army knife for Magento2 developers";
|
||||||
homepage = "https://magerun.net/";
|
homepage = "https://magerun.net/";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
mainProgram = "n98-magerun2";
|
||||||
maintainers = lib.teams.php.members;
|
maintainers = lib.teams.php.members;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -212,7 +212,10 @@ let
|
||||||
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; } // lib.optionalAttrs withRust { CONFIG_RUST = "y"; };
|
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; } // lib.optionalAttrs withRust { CONFIG_RUST = "y"; };
|
||||||
} // lib.optionalAttrs (modDirVersion != null) { inherit modDirVersion; });
|
} // lib.optionalAttrs (modDirVersion != null) { inherit modDirVersion; });
|
||||||
|
|
||||||
passthru = basicArgs // {
|
in
|
||||||
|
kernel.overrideAttrs (finalAttrs: previousAttrs: {
|
||||||
|
|
||||||
|
passthru = previousAttrs.passthru or { } // basicArgs // {
|
||||||
features = kernelFeatures;
|
features = kernelFeatures;
|
||||||
inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre;
|
inherit commonStructuredConfig structuredExtraConfig extraMakeFlags isZen isHardened isLibre;
|
||||||
isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
|
isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
|
||||||
|
@ -225,9 +228,8 @@ let
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);
|
|
||||||
tests = let
|
tests = let
|
||||||
overridableKernel = finalKernel // {
|
overridableKernel = finalAttrs.finalPackage // {
|
||||||
override = args:
|
override = args:
|
||||||
lib.warn (
|
lib.warn (
|
||||||
"override is stubbed for NixOS kernel tests, not applying changes these arguments: "
|
"override is stubbed for NixOS kernel tests, not applying changes these arguments: "
|
||||||
|
@ -237,5 +239,4 @@ let
|
||||||
in [ (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) ] ++ kernelTests;
|
in [ (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) ] ++ kernelTests;
|
||||||
};
|
};
|
||||||
|
|
||||||
finalKernel = lib.extendDerivation true passthru kernel;
|
})
|
||||||
in finalKernel
|
|
||||||
|
|
|
@ -33,14 +33,12 @@ rec {
|
||||||
stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest;
|
stable = if stdenv.hostPlatform.system == "i686-linux" then legacy_390 else latest;
|
||||||
|
|
||||||
production = generic {
|
production = generic {
|
||||||
version = "535.154.05";
|
version = "550.54.14";
|
||||||
sha256_64bit = "sha256-fpUGXKprgt6SYRDxSCemGXLrEsIA6GOinp+0eGbqqJg=";
|
sha256_64bit = "sha256-jEl/8c/HwxD7h1FJvDD6pP0m0iN7LLps0uiweAFXz+M=";
|
||||||
sha256_aarch64 = "sha256-G0/GiObf/BZMkzzET8HQjdIcvCSqB1uhsinro2HLK9k=";
|
sha256_aarch64 = "sha256-sProBhYziFwk9rDAR2SbRiSaO7RMrf+/ZYryj4BkLB0=";
|
||||||
openSha256 = "sha256-wvRdHguGLxS0mR06P5Qi++pDJBCF8pJ8hr4T8O6TJIo=";
|
openSha256 = "sha256-F+9MWtpIQTF18F2CftCJxQ6WwpA8BVmRGEq3FhHLuYw=";
|
||||||
settingsSha256 = "sha256-9wqoDEWY4I7weWW05F4igj1Gj9wjHsREFMztfEmqm10=";
|
settingsSha256 = "sha256-m2rNASJp0i0Ez2OuqL+JpgEF0Yd8sYVCyrOoo/ln2a4=";
|
||||||
persistencedSha256 = "sha256-d0Q3Lk80JqkS1B54Mahu2yY/WocOqFFbZVBh+ToGhaE=";
|
persistencedSha256 = "sha256-XaPN8jVTjdag9frLPgBtqvO/goB5zxeGzaTU0CdL6C4=";
|
||||||
|
|
||||||
patches = [ rcu_patch ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
latest = selectHighestVersion production (generic {
|
latest = selectHighestVersion production (generic {
|
||||||
|
|
|
@ -13,8 +13,28 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorHash = "sha256-BHiEVyi3FXPovYy3iDP8q+y+LgfI4ElDPVZexd7nnuo=";
|
vendorHash = "sha256-BHiEVyi3FXPovYy3iDP8q+y+LgfI4ElDPVZexd7nnuo=";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# fix default configuration file location
|
||||||
|
substituteInPlace \
|
||||||
|
internal/conf/config.go \
|
||||||
|
--replace-fail "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
|
||||||
|
|
||||||
|
# fix assets location in configuration file
|
||||||
|
substituteInPlace \
|
||||||
|
config/pg_featureserv.toml.example \
|
||||||
|
--replace-fail "AssetsPath = \"./assets\"" "AssetsPath = \"$out/share/assets\""
|
||||||
|
'';
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" "-X github.com/CrunchyData/pg_featureserv/conf.setVersion=${version}" ];
|
ldflags = [ "-s" "-w" "-X github.com/CrunchyData/pg_featureserv/conf.setVersion=${version}" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share
|
||||||
|
cp -r assets $out/share
|
||||||
|
|
||||||
|
mkdir -p $out/share/config
|
||||||
|
cp config/pg_featureserv.toml.example $out/share/config/pg_featureserv.toml
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Lightweight RESTful Geospatial Feature Server for PostGIS in Go";
|
description = "Lightweight RESTful Geospatial Feature Server for PostGIS in Go";
|
||||||
homepage = "https://github.com/CrunchyData/pg_featureserv";
|
homepage = "https://github.com/CrunchyData/pg_featureserv";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, fetchFromGitHub, fetchpatch, buildGoModule }:
|
{ lib, fetchFromGitHub, buildGoModule }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "pg_tileserv";
|
pname = "pg_tileserv";
|
||||||
|
@ -13,8 +13,28 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorHash = "sha256-8CvYvoIKOYvR7npCV65ZqZGR8KCTH4GabTt/JGQG3uc=";
|
vendorHash = "sha256-8CvYvoIKOYvR7npCV65ZqZGR8KCTH4GabTt/JGQG3uc=";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# fix default configuration file location
|
||||||
|
substituteInPlace \
|
||||||
|
main.go \
|
||||||
|
--replace-fail "viper.AddConfigPath(\"/etc\")" "viper.AddConfigPath(\"$out/share/config\")"
|
||||||
|
|
||||||
|
# fix assets location in configuration file
|
||||||
|
substituteInPlace \
|
||||||
|
config/pg_tileserv.toml.example \
|
||||||
|
--replace-fail "# AssetsPath = \"/usr/share/pg_tileserv/assets\"" "AssetsPath = \"$out/share/assets\""
|
||||||
|
'';
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" "-X main.programVersion=${version}" ];
|
ldflags = [ "-s" "-w" "-X main.programVersion=${version}" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share
|
||||||
|
cp -r assets $out/share
|
||||||
|
|
||||||
|
mkdir -p $out/share/config
|
||||||
|
cp config/pg_tileserv.toml.example $out/share/config/pg_tileserv.toml
|
||||||
|
'';
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -234,6 +234,7 @@ mapAliases ({
|
||||||
dotnet-sdk_3 = dotnetCorePackages.sdk_3_1; # Added 2020-01-19
|
dotnet-sdk_3 = dotnetCorePackages.sdk_3_1; # Added 2020-01-19
|
||||||
dotnet-sdk_5 = dotnetCorePackages.sdk_5_0; # Added 2020-09-11
|
dotnet-sdk_5 = dotnetCorePackages.sdk_5_0; # Added 2020-09-11
|
||||||
drgeo = throw "'drgeo' has been removed as it is outdated and unmaintained"; # Added 2023-10-15
|
drgeo = throw "'drgeo' has been removed as it is outdated and unmaintained"; # Added 2023-10-15
|
||||||
|
drush = throw "drush as a standalone package has been removed because it's no longer supported as a standalone tool";
|
||||||
dtv-scan-tables_linuxtv = dtv-scan-tables; # Added 2023-03-03
|
dtv-scan-tables_linuxtv = dtv-scan-tables; # Added 2023-03-03
|
||||||
dtv-scan-tables_tvheadend = dtv-scan-tables; # Added 2023-03-03
|
dtv-scan-tables_tvheadend = dtv-scan-tables; # Added 2023-03-03
|
||||||
du-dust = dust; # Added 2024-01-19
|
du-dust = dust; # Added 2024-01-19
|
||||||
|
@ -280,6 +281,7 @@ mapAliases ({
|
||||||
eterm = throw "eterm was removed because it is still insecure: https://github.com/mej/Eterm/issues/7"; # Added 2023-09-10
|
eterm = throw "eterm was removed because it is still insecure: https://github.com/mej/Eterm/issues/7"; # Added 2023-09-10
|
||||||
exa = throw "'exa' has been removed because it is unmaintained upstream. Consider using 'eza', a maintained fork"; # Added 2023-09-07
|
exa = throw "'exa' has been removed because it is unmaintained upstream. Consider using 'eza', a maintained fork"; # Added 2023-09-07
|
||||||
exhibitor = throw "'exhibitor' has been removed because it is unmaintained upstream"; # Added 2023-06-20
|
exhibitor = throw "'exhibitor' has been removed because it is unmaintained upstream"; # Added 2023-06-20
|
||||||
|
eww-wayland = lib.warn "eww now can build for X11 and wayland simultaneously, so `eww-wayland` is deprecated, use the normal `eww` package instead." eww;
|
||||||
|
|
||||||
### F ###
|
### F ###
|
||||||
|
|
||||||
|
|
|
@ -18944,8 +18944,6 @@ with pkgs;
|
||||||
|
|
||||||
drm_info = callPackage ../development/tools/drm_info { };
|
drm_info = callPackage ../development/tools/drm_info { };
|
||||||
|
|
||||||
drush = callPackage ../development/tools/misc/drush { };
|
|
||||||
|
|
||||||
dura = callPackage ../development/tools/misc/dura {
|
dura = callPackage ../development/tools/misc/dura {
|
||||||
inherit (darwin.apple_sdk.frameworks) Security;
|
inherit (darwin.apple_sdk.frameworks) Security;
|
||||||
};
|
};
|
||||||
|
@ -31143,9 +31141,6 @@ with pkgs;
|
||||||
evilpixie = libsForQt5.callPackage ../applications/graphics/evilpixie { };
|
evilpixie = libsForQt5.callPackage ../applications/graphics/evilpixie { };
|
||||||
|
|
||||||
eww = callPackage ../applications/window-managers/eww { };
|
eww = callPackage ../applications/window-managers/eww { };
|
||||||
eww-wayland = callPackage ../applications/window-managers/eww {
|
|
||||||
withWayland = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
exaile = callPackage ../applications/audio/exaile { };
|
exaile = callPackage ../applications/audio/exaile { };
|
||||||
|
|
||||||
|
|
|
@ -198,14 +198,12 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
|
|
||||||
phive = callPackage ../development/php-packages/phive { };
|
phive = callPackage ../development/php-packages/phive { };
|
||||||
|
|
||||||
|
php-codesniffer = callPackage ../development/php-packages/php-codesniffer { };
|
||||||
|
|
||||||
php-cs-fixer = callPackage ../development/php-packages/php-cs-fixer { };
|
php-cs-fixer = callPackage ../development/php-packages/php-cs-fixer { };
|
||||||
|
|
||||||
php-parallel-lint = callPackage ../development/php-packages/php-parallel-lint { };
|
php-parallel-lint = callPackage ../development/php-packages/php-parallel-lint { };
|
||||||
|
|
||||||
phpcbf = callPackage ../development/php-packages/phpcbf { };
|
|
||||||
|
|
||||||
phpcs = callPackage ../development/php-packages/phpcs { };
|
|
||||||
|
|
||||||
phpmd = callPackage ../development/php-packages/phpmd { };
|
phpmd = callPackage ../development/php-packages/phpmd { };
|
||||||
|
|
||||||
phpspy = callPackage ../development/php-packages/phpspy { };
|
phpspy = callPackage ../development/php-packages/phpspy { };
|
||||||
|
@ -215,10 +213,11 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
psalm = callPackage ../development/php-packages/psalm { };
|
psalm = callPackage ../development/php-packages/psalm { };
|
||||||
|
|
||||||
psysh = callPackage ../development/php-packages/psysh { };
|
psysh = callPackage ../development/php-packages/psysh { };
|
||||||
|
} // lib.optionalAttrs config.allowAliases {
|
||||||
|
phpcbf = throw "`phpcbf` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`.";
|
||||||
|
phpcs = throw "`phpcs` is now deprecated, use `php-codesniffer` instead which contains both `phpcs` and `phpcbf`.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# This is a set of PHP extensions meant to be used in php.buildEnv
|
# This is a set of PHP extensions meant to be used in php.buildEnv
|
||||||
# or php.withExtensions to extend the functionality of the PHP
|
# or php.withExtensions to extend the functionality of the PHP
|
||||||
# interpreter.
|
# interpreter.
|
||||||
|
@ -235,7 +234,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
|
|
||||||
ast = callPackage ../development/php-packages/ast { };
|
ast = callPackage ../development/php-packages/ast { };
|
||||||
|
|
||||||
blackfire = callPackage ../development/tools/misc/blackfire/php-probe.nix { inherit php; };
|
blackfire = callPackage ../development/tools/misc/blackfire/php-probe.nix { };
|
||||||
|
|
||||||
couchbase = callPackage ../development/php-packages/couchbase { };
|
couchbase = callPackage ../development/php-packages/couchbase { };
|
||||||
|
|
||||||
|
@ -318,7 +317,7 @@ lib.makeScope pkgs.newScope (self: with self; {
|
||||||
|
|
||||||
redis = callPackage ../development/php-packages/redis { };
|
redis = callPackage ../development/php-packages/redis { };
|
||||||
|
|
||||||
relay = callPackage ../development/php-packages/relay { inherit php; };
|
relay = callPackage ../development/php-packages/relay { };
|
||||||
|
|
||||||
rrd = callPackage ../development/php-packages/rrd { };
|
rrd = callPackage ../development/php-packages/rrd { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue