Merge master into staging-next

This commit is contained in:
github-actions[bot]
2024-07-12 12:01:19 +00:00
committed by GitHub
146 changed files with 2692 additions and 2818 deletions
@@ -375,8 +375,74 @@ Assuming the following directory structure, we can define `sourceRoot` and `pnpm
pnpmRoot = "frontend";
```
### Yarn {#javascript-yarn}
Yarn based projects use a `yarn.lock` file instead of a `package-lock.json` to pin dependencies. Nixpkgs provides the Nix function `fetchYarnDeps` which fetches an offline cache suitable for running `yarn install` before building the project. In addition, Nixpkgs provides the hooks:
- `yarnConfigHook`: Fetches the dependencies from the offline cache and installs them into `node_modules`.
- `yarnBuildHook`: Runs `yarn build` or a specified `yarn` command that builds the project.
An example usage of the above attributes is:
```nix
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
nodejs,
npmHooks,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "...";
version = "...";
src = fetchFromGitHub {
owner = "...";
repo = "...";
rev = "v${finalAttrs.version}";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-mo8urQaWIHu33+r0Y7mL9mJ/aSe/5CihuIetTeDHEUQ=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
# Needed for executing package.json scripts
nodejs
npmHooks.npmInstallHook
];
meta = {
# ...
};
})
```
Note that there is no setup hook for installing yarn based packages - `npmHooks.npmInstallHook` should fit most cases, but sometimes you may need to override the `installPhase` completely.
#### `yarnConfigHook` arguments {#javascript-yarnconfighook}
By default, `yarnConfigHook` relies upon the attribute `${yarnOfflineCache}` (or `${offlineCache}` if the former is not set) to find the location of the offline cache produced by `fetchYarnDeps`. To disable this phase, you can set `dontYarnInstallDeps = true` or override the `configurePhase`.
#### `yarnBuildHook` arguments {#javascript-yarnbuildhook}
This script by default runs `yarn --offline build`, and it relies upon the project's dependencies installed at `node_modules`. Below is a list of additional `mkDerivation` arguments read by this hook:
- `yarnBuildScript`: Sets a different `yarn --offline` subcommand (defaults to `build`).
- `yarnBuildFlags`: Single string list of additional flags to pass the above command, or a Nix list of such additional flags.
### yarn2nix {#javascript-yarn2nix}
WARNING: The `yarn2nix` functions have been deprecated in favor of the new `yarnConfigHook` and `yarnBuildHook`. Documentation for them still appears here for the sake of the packages that still use them. See also a tracking issue [#324246](https://github.com/NixOS/nixpkgs/issues/324246).
#### Preparation {#javascript-yarn2nix-preparation}
You will need at least a `yarn.lock` file. If upstream does not have one you need to generate it and reference it in your package definition.
+13
View File
@@ -4123,6 +4123,12 @@
githubId = 34543609;
name = "creator54";
};
crem = {
email = "max@alstercaminer.com";
github = "MaxCaminer";
githubId = 16345077;
name = "crem";
};
crertel = {
email = "chris@kedagital.com";
github = "crertel";
@@ -7891,6 +7897,13 @@
githubId = 33969028;
name = "Sebastian Hasler";
};
hausken = {
name = "Hausken";
email = "hauskens-git@disp.lease>";
github = "hauskens";
githubId = 79340822;
keys = [ { fingerprint = "3582 5B85 66C8 4F36 45C7 EC42 809F 7938 9CB1 8650"; } ];
};
havvy = {
email = "ryan.havvy@gmail.com";
github = "Havvy";
+10
View File
@@ -922,6 +922,16 @@ with lib.maintainers;
shortName = "Steam";
};
stridtech = {
# Verify additions by approval of an already existing member of the team
members = [
superherointj
ulrikstrid
];
scope = "Group registration for Strid Tech AB team members who collectively maintain packages";
shortName = "StridTech";
};
systemd = {
members = [ ];
githubTeams = [ "systemd" ];
@@ -197,6 +197,9 @@
- `services.roundcube.maxAttachmentSize` will multiply the value set with `1.37` to offset overhead introduced by the base64 encoding applied to attachments.
- The `services.mxisd` module has been removed as both [mxisd](https://github.com/kamax-matrix/mxisd) and [ma1sd](https://github.com/ma1uta/ma1sd) are not maintained any longer.
Consequently the package `pkgs.ma1sd` has also been removed.
## Other Notable Changes {#sec-release-24.11-notable-changes}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
@@ -218,6 +221,8 @@
- `security.pam.u2f` now follows RFC42.
All module options are now settable through the freeform `.settings`.
- The hooks `yarnConfigHook` and `yarnBuildHook` were added. These should replace `yarn2nix.mkYarnPackage` and other `yarn2nix` related tools. The motivation to get rid of `yarn2nix` tools is the fact that they are too complex and hard to maintain, and they rely upon too much Nix evaluation which is problematic if import-from-derivation is not allowed (see more details at [#296856](https://github.com/NixOS/nixpkgs/issues/296856). The transition from `mkYarnPackage` to `yarn{Config,Build}Hook` is tracked at [#324246](https://github.com/NixOS/nixpkgs/issues/324246).
- Cinnamon has been updated to 6.2.
- Following Mint 22 defaults, the Cinnamon module no longer ships geary and hexchat by default.
- Nemo is now built with gtk-layer-shell support, note that for now it will be expected to see nemo-desktop
+2 -2
View File
@@ -180,7 +180,7 @@ in
#dnsmasq = 141;# dynamically allocated as of 2021-09-03
#uhub = 142; # unused
yandexdisk = 143;
mxisd = 144; # was once collectd
# mxisd = 144; # removed 2024-07-10
#consul = 145;# dynamically allocated as of 2021-09-03
#mailpile = 146; # removed 2022-01-12
redmine = 147;
@@ -503,7 +503,7 @@ in
#dnsmasq = 141; # unused
uhub = 142;
#yandexdisk = 143; # unused
mxisd = 144; # was once collectd
# mxisd = 144; # removed 2024-07-10
#consul = 145; # unused
#mailpile = 146; # removed 2022-01-12
redmine = 147;
-1
View File
@@ -1087,7 +1087,6 @@
./services/networking/mullvad-vpn.nix
./services/networking/multipath.nix
./services/networking/murmur.nix
./services/networking/mxisd.nix
./services/networking/mycelium.nix
./services/networking/namecoind.nix
./services/networking/nar-serve.nix
+2 -1
View File
@@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ lib, ... }:
let
inherit (lib)
@@ -74,6 +74,7 @@ in
(mkRemovedOptionModule [ "services" "mathics" ] "The Mathics module has been removed")
(mkRemovedOptionModule [ "services" "meguca" ] "Use meguca has been removed from nixpkgs")
(mkRemovedOptionModule [ "services" "mesos" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "mxisd" ] "The mxisd module has been removed as both mxisd and ma1sd got removed.")
(mkRemovedOptionModule [ "services" "moinmoin" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "mwlib" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "services" "pantheon" "files" ] ''
@@ -17,6 +17,109 @@ let
]
++ config
) instruction;
manifestDir = "/var/lib/rancher/k3s/server/manifests";
chartDir = "/var/lib/rancher/k3s/server/static/charts";
imageDir = "/var/lib/rancher/k3s/agent/images";
manifestModule =
let
mkTarget =
name: if (lib.hasSuffix ".yaml" name || lib.hasSuffix ".yml" name) then name else name + ".yaml";
in
lib.types.submodule (
{
name,
config,
options,
...
}:
{
options = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether this manifest file should be generated.";
};
target = lib.mkOption {
type = lib.types.nonEmptyStr;
example = lib.literalExpression "manifest.yaml";
description = ''
Name of the symlink (relative to {file}`${manifestDir}`).
Defaults to the attribute name.
'';
};
content = lib.mkOption {
type = with lib.types; nullOr (either attrs (listOf attrs));
default = null;
description = ''
Content of the manifest file. A single attribute set will
generate a single document YAML file. A list of attribute sets
will generate multiple documents separated by `---` in a single
YAML file.
'';
};
source = lib.mkOption {
type = lib.types.path;
example = lib.literalExpression "./manifests/app.yaml";
description = ''
Path of the source `.yaml` file.
'';
};
};
config = {
target = lib.mkDefault (mkTarget name);
source = lib.mkIf (config.content != null) (
let
name' = "k3s-manifest-" + builtins.baseNameOf name;
docName = "k3s-manifest-doc-" + builtins.baseNameOf name;
yamlDocSeparator = builtins.toFile "yaml-doc-separator" "\n---\n";
mkYaml = name: x: (pkgs.formats.yaml { }).generate name x;
mkSource =
value:
if builtins.isList value then
pkgs.concatText name' (
lib.concatMap (x: [
yamlDocSeparator
(mkYaml docName x)
]) value
)
else
mkYaml name' value;
in
lib.mkDerivedConfig options.content mkSource
);
};
}
);
enabledManifests = with builtins; filter (m: m.enable) (attrValues cfg.manifests);
linkManifestEntry = m: "${pkgs.coreutils-full}/bin/ln -sfn ${m.source} ${manifestDir}/${m.target}";
linkImageEntry = image: "${pkgs.coreutils-full}/bin/ln -sfn ${image} ${imageDir}/${image.name}";
linkChartEntry =
let
mkTarget = name: if (lib.hasSuffix ".tgz" name) then name else name + ".tgz";
in
name: value:
"${pkgs.coreutils-full}/bin/ln -sfn ${value} ${chartDir}/${mkTarget (builtins.baseNameOf name)}";
activateK3sContent = pkgs.writeShellScript "activate-k3s-content" ''
${lib.optionalString (
builtins.length enabledManifests > 0
) "${pkgs.coreutils-full}/bin/mkdir -p ${manifestDir}"}
${lib.optionalString (cfg.charts != { }) "${pkgs.coreutils-full}/bin/mkdir -p ${chartDir}"}
${lib.optionalString (
builtins.length cfg.images > 0
) "${pkgs.coreutils-full}/bin/mkdir -p ${imageDir}"}
${builtins.concatStringsSep "\n" (map linkManifestEntry enabledManifests)}
${builtins.concatStringsSep "\n" (lib.mapAttrsToList linkChartEntry cfg.charts)}
${builtins.concatStringsSep "\n" (map linkImageEntry cfg.images)}
'';
in
{
imports = [ (removeOption [ "docker" ] "k3s docker option is no longer supported.") ];
@@ -127,11 +230,148 @@ in
default = null;
description = "File path containing the k3s YAML config. This is useful when the config is generated (for example on boot).";
};
manifests = mkOption {
type = types.attrsOf manifestModule;
default = { };
example = lib.literalExpression ''
deployment.source = ../manifests/deployment.yaml;
my-service = {
enable = false;
target = "app-service.yaml";
content = {
apiVersion = "v1";
kind = "Service";
metadata = {
name = "app-service";
};
spec = {
selector = {
"app.kubernetes.io/name" = "MyApp";
};
ports = [
{
name = "name-of-service-port";
protocol = "TCP";
port = 80;
targetPort = "http-web-svc";
}
];
};
}
};
nginx.content = [
{
apiVersion = "v1";
kind = "Pod";
metadata = {
name = "nginx";
labels = {
"app.kubernetes.io/name" = "MyApp";
};
};
spec = {
containers = [
{
name = "nginx";
image = "nginx:1.14.2";
ports = [
{
containerPort = 80;
name = "http-web-svc";
}
];
}
];
};
}
{
apiVersion = "v1";
kind = "Service";
metadata = {
name = "nginx-service";
};
spec = {
selector = {
"app.kubernetes.io/name" = "MyApp";
};
ports = [
{
name = "name-of-service-port";
protocol = "TCP";
port = 80;
targetPort = "http-web-svc";
}
];
};
}
];
'';
description = ''
Auto-deploying manifests that are linked to {file}`${manifestDir}` before k3s starts.
Note that deleting manifest files will not remove or otherwise modify the resources
it created. Please use the the `--disable` flag or `.skip` files to delete/disable AddOns,
as mentioned in the [docs](https://docs.k3s.io/installation/packaged-components#disabling-manifests).
This option only makes sense on server nodes (`role = server`).
Read the [auto-deploying manifests docs](https://docs.k3s.io/installation/packaged-components#auto-deploying-manifests-addons)
for further information.
'';
};
charts = mkOption {
type = with types; attrsOf (either path package);
default = { };
example = lib.literalExpression ''
nginx = ../charts/my-nginx-chart.tgz;
redis = ../charts/my-redis-chart.tgz;
'';
description = ''
Packaged Helm charts that are linked to {file}`${chartDir}` before k3s starts.
The attribute name will be used as the link target (relative to {file}`${chartDir}`).
The specified charts will only be placed on the file system and made available to the
Kubernetes APIServer from within the cluster, you may use the
[k3s Helm controller](https://docs.k3s.io/helm#using-the-helm-controller)
to deploy the charts. This option only makes sense on server nodes
(`role = server`).
'';
};
images = mkOption {
type = with types; listOf package;
default = [ ];
example = lib.literalExpression ''
[
(pkgs.dockerTools.pullImage {
imageName = "docker.io/bitnami/keycloak";
imageDigest = "sha256:714dfadc66a8e3adea6609bda350345bd3711657b7ef3cf2e8015b526bac2d6b";
sha256 = "0imblp0kw9vkcr7sp962jmj20fpmb3hvd3hmf4cs4x04klnq3k90";
finalImageTag = "21.1.2-debian-11-r0";
})
]
'';
description = ''
List of derivations that provide container images.
All images are linked to {file}`${imageDir}` before k3s starts and consequently imported
by the k3s agent. This option only makes sense on nodes with an enabled agent.
'';
};
};
# implementation
config = mkIf cfg.enable {
warnings =
(lib.optional (cfg.role != "server" && cfg.manifests != { })
"k3s: Auto deploying manifests are only installed on server nodes (role == server), they will be ignored by this node."
)
++ (lib.optional (cfg.role != "server" && cfg.charts != { })
"k3s: Helm charts are only made available to the cluster on server nodes (role == server), they will be ignored by this node."
)
++ (lib.optional (cfg.disableAgent && cfg.images != [ ])
"k3s: Images are only imported on nodes with an enabled agent, they will be ignored by this node"
);
assertions = [
{
assertion = cfg.role == "agent" -> (cfg.configPath != null || cfg.serverAddr != "");
@@ -178,6 +418,7 @@ in
LimitCORE = "infinity";
TasksMax = "infinity";
EnvironmentFile = cfg.environmentFile;
ExecStartPre = activateK3sContent;
ExecStart = concatStringsSep " \\\n " (
[ "${cfg.package}/bin/k3s ${cfg.role}" ]
++ (optional cfg.clusterInit "--cluster-init")
-137
View File
@@ -1,137 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
isMa1sd =
package:
lib.hasPrefix "ma1sd" package.name;
isMxisd =
package:
lib.hasPrefix "mxisd" package.name;
cfg = config.services.mxisd;
server = optionalAttrs (cfg.server.name != null) { inherit (cfg.server) name; }
// optionalAttrs (cfg.server.port != null) { inherit (cfg.server) port; };
baseConfig = {
matrix.domain = cfg.matrix.domain;
key.path = "${cfg.dataDir}/signing.key";
storage = {
provider.sqlite.database = if isMa1sd cfg.package
then "${cfg.dataDir}/ma1sd.db"
else "${cfg.dataDir}/mxisd.db";
};
} // optionalAttrs (server != {}) { inherit server; };
# merges baseConfig and extraConfig into a single file
fullConfig = recursiveUpdate baseConfig cfg.extraConfig;
configFile = if isMa1sd cfg.package
then pkgs.writeText "ma1sd-config.yaml" (builtins.toJSON fullConfig)
else pkgs.writeText "mxisd-config.yaml" (builtins.toJSON fullConfig);
in {
options = {
services.mxisd = {
enable = mkEnableOption "matrix federated identity server";
package = mkPackageOption pkgs "ma1sd" { };
environmentFile = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Path to an environment-file which may contain secrets to be
substituted via `envsubst`.
'';
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/mxisd";
description = "Where data mxisd/ma1sd uses resides";
};
extraConfig = mkOption {
type = types.attrs;
default = {};
description = "Extra options merged into the mxisd/ma1sd configuration";
};
matrix = {
domain = mkOption {
type = types.str;
description = ''
the domain of the matrix homeserver
'';
};
};
server = {
name = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
Public hostname of mxisd/ma1sd, if different from the Matrix domain.
'';
};
port = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
HTTP port to listen on (unencrypted)
'';
};
};
};
};
config = mkIf cfg.enable {
users.users.mxisd =
{
group = "mxisd";
home = cfg.dataDir;
createHome = true;
shell = "${pkgs.bash}/bin/bash";
uid = config.ids.uids.mxisd;
};
users.groups.mxisd =
{
gid = config.ids.gids.mxisd;
};
systemd.services.mxisd = {
description = "a federated identity server for the matrix ecosystem";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = let
executable = if isMa1sd cfg.package then "ma1sd" else "mxisd";
in {
Type = "simple";
User = "mxisd";
Group = "mxisd";
EnvironmentFile = mkIf (cfg.environmentFile != null) [ cfg.environmentFile ];
ExecStart = "${cfg.package}/bin/${executable} -c ${cfg.dataDir}/mxisd-config.yaml";
ExecStartPre = "${pkgs.writeShellScript "mxisd-substitute-secrets" ''
umask 0077
${pkgs.envsubst}/bin/envsubst -o ${cfg.dataDir}/mxisd-config.yaml \
-i ${configFile}
''}";
WorkingDirectory = cfg.dataDir;
Restart = "on-failure";
};
};
};
}
-1
View File
@@ -596,7 +596,6 @@ in {
musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {};
munin = handleTest ./munin.nix {};
mutableUsers = handleTest ./mutable-users.nix {};
mxisd = handleTest ./mxisd.nix {};
mycelium = handleTest ./mycelium {};
mympd = handleTest ./mympd.nix {};
mysql = handleTest ./mysql/mysql.nix {};
+122
View File
@@ -0,0 +1,122 @@
import ../make-test-python.nix (
{
pkgs,
lib,
k3s,
...
}:
let
pauseImageEnv = pkgs.buildEnv {
name = "k3s-pause-image-env";
paths = with pkgs; [
tini
(hiPrio coreutils)
busybox
];
};
pauseImage = pkgs.dockerTools.buildImage {
name = "test.local/pause";
tag = "local";
copyToRoot = pauseImageEnv;
config.Entrypoint = [
"/bin/tini"
"--"
"/bin/sleep"
"inf"
];
};
helloImage = pkgs.dockerTools.buildImage {
name = "test.local/hello";
tag = "local";
copyToRoot = pkgs.hello;
config.Entrypoint = [ "${pkgs.hello}/bin/hello" ];
};
in
{
name = "${k3s.name}-auto-deploy";
nodes.machine =
{ pkgs, ... }:
{
environment.systemPackages = [ k3s ];
# k3s uses enough resources the default vm fails.
virtualisation.memorySize = 1536;
virtualisation.diskSize = 4096;
services.k3s.enable = true;
services.k3s.role = "server";
services.k3s.package = k3s;
# Slightly reduce resource usage
services.k3s.extraFlags = builtins.toString [
"--disable coredns"
"--disable local-storage"
"--disable metrics-server"
"--disable servicelb"
"--disable traefik"
"--pause-image test.local/pause:local"
];
services.k3s.images = [
pauseImage
helloImage
];
services.k3s.manifests = {
absent = {
enable = false;
content = {
apiVersion = "v1";
kind = "Namespace";
metadata.name = "absent";
};
};
present = {
target = "foo-namespace.yaml";
content = {
apiVersion = "v1";
kind = "Namespace";
metadata.name = "foo";
};
};
hello.content = {
apiVersion = "batch/v1";
kind = "Job";
metadata.name = "hello";
spec = {
template.spec = {
containers = [
{
name = "hello";
image = "test.local/hello:local";
}
];
restartPolicy = "OnFailure";
};
};
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("k3s")
# check existence of the manifest files
machine.fail("ls /var/lib/rancher/k3s/server/manifests/absent.yaml")
machine.succeed("ls /var/lib/rancher/k3s/server/manifests/foo-namespace.yaml")
machine.succeed("ls /var/lib/rancher/k3s/server/manifests/hello.yaml")
# check if container images got imported
machine.succeed("crictl img | grep 'test\.local/pause'")
machine.succeed("crictl img | grep 'test\.local/hello'")
# check if resources of manifests got created
machine.wait_until_succeeds("kubectl get ns foo")
machine.wait_until_succeeds("kubectl wait --for=condition=complete job/hello")
machine.fail("kubectl get ns absent")
machine.shutdown()
'';
}
)
+2
View File
@@ -19,4 +19,6 @@ in
single-node = lib.mapAttrs (_: k3s: import ./single-node.nix { inherit system pkgs k3s; }) allK3s;
# Run a multi-node k3s cluster and verify pod networking works across nodes
multi-node = lib.mapAttrs (_: k3s: import ./multi-node.nix { inherit system pkgs k3s; }) allK3s;
# Test wether container images are imported and auto deploying manifests work
auto-deploy = lib.mapAttrs (_: k3s: import ./auto-deploy.nix { inherit system pkgs k3s; }) allK3s;
}
-21
View File
@@ -1,21 +0,0 @@
import ./make-test-python.nix ({ pkgs, ... } : {
name = "mxisd";
meta = with pkgs.lib.maintainers; {
maintainers = [ mguentner ];
};
nodes = {
server = args : {
services.mxisd.enable = true;
services.mxisd.matrix.domain = "example.org";
};
};
testScript = ''
start_all()
server.wait_for_unit("mxisd.service")
server.wait_for_open_port(8090)
server.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'")
'';
})
@@ -2,6 +2,7 @@
, stdenv
, mkDerivation
, fetchFromGitHub
, fetchpatch2
, pkg-config
, cmake
, openssl
@@ -34,6 +35,14 @@ mkDerivation rec {
hash = "sha256-+9uBmmdQ/shWYnJ7tM+Y8OgqYcQHHI2qeMw2tl1lE+w=";
};
patches = [
# upnp: add compatibility for miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/Bitcoin-ABC/bitcoin-abc/commit/5678070f182124a1a8c7c60873d1877094be76ab.patch?full_index=1";
hash = "sha256-QC7TlWepVxQuIZVTbGtQy+HmmXP8PWNhJWdVYudJvmI=";
})
];
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [
openssl
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch2
, autoreconfHook
, pkg-config
, util-linux
@@ -32,6 +33,14 @@ stdenv.mkDerivation rec {
hash = "sha256-PqpePDna2gpCzF2K43N4h6cV5Y9w/e5ZcUvaNEaFaIk=";
};
patches = [
# upnp: add compatibility for miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/bitcoinknots/bitcoin/commit/643014424359a4783cf9c73bee3346ac2f04e713.patch?full_index=1";
hash = "sha256-FdLoNH3+ZZTbqrwRvhbAeJuGz4SgnIvoWUBzRxjfzs8=";
})
];
nativeBuildInputs =
[ autoreconfHook pkg-config ]
++ lib.optionals stdenv.isLinux [ util-linux ]
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchurl
, fetchpatch2
, autoreconfHook
, pkg-config
, installShellFiles
@@ -43,6 +44,14 @@ stdenv.mkDerivation rec {
sha256 = "0c1051fd921b8fae912f5c2dfd86b085ab45baa05cd7be4585b10b4d1818f3da";
};
patches = [
# upnp: fix build with miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/bitcoin/bitcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1";
hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M=";
})
];
nativeBuildInputs =
[ autoreconfHook pkg-config installShellFiles ]
++ lib.optionals stdenv.isLinux [ util-linux ]
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, autoreconfHook
, pkg-config
, util-linux
@@ -33,6 +34,14 @@ stdenv.mkDerivation rec {
sha256 = "sha256-qHtSgfZGZ4Beu5fsJAOZm8ejj7wfHBbOS6WAjOrCuw4=";
};
patches = [
# upnp: fix build with miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/bitcoin/bitcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1";
hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M=";
})
];
nativeBuildInputs =
[ autoreconfHook pkg-config ]
++ lib.optionals stdenv.isLinux [ util-linux ]
@@ -20,13 +20,13 @@
stdenv.mkDerivation rec {
pname = "gridcoin-research";
version = "5.4.8.0";
version = "5.4.8.0-hotfix-1";
src = fetchFromGitHub {
owner = "gridcoin-community";
repo = "Gridcoin-Research";
rev = "${version}";
sha256 = "sha256-HZirzXkqM2aep+wq8k2UCFWHPtN0sBZXjamgt7RYPBo=";
hash = "sha256-e58GJNiZq4LP/HTeveTQD6APeTvUbhUTwMwhU+PiVc0=";
};
nativeBuildInputs = [
@@ -2,6 +2,7 @@
, stdenv
, fetchurl
, fetchFromGitHub
, fetchpatch2
, autoreconfHook
, pkg-config
, installShellFiles
@@ -41,6 +42,14 @@ stdenv.mkDerivation rec {
sha256 = "0f6vi2k5xvjrhiazfjcd4aj246dfcg51xsnqb9wdjl41cg0ckwmf";
};
patches = [
# upnp: add compatibility for miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/Groestlcoin/groestlcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1";
hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M=";
})
];
nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ]
++ lib.optionals stdenv.isLinux [ util-linux ]
++ lib.optionals stdenv.isDarwin [ hexdump ]
@@ -1,9 +1,10 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config
, boost, miniupnpc, openssl, unbound
, zeromq, pcsclite, readline, libsodium, hidapi
, randomx, rapidjson, easyloggingpp
, CoreData, IOKit, PCSC
, trezorSupport ? true, libusb1, protobuf, python3
, monero-cli
}:
stdenv.mkDerivation rec {
@@ -18,9 +19,7 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
./use-system-libraries.patch
];
inherit (monero-cli) patches;
postPatch = ''
# remove vendored libraries
@@ -29,7 +28,7 @@ stdenv.mkDerivation rec {
cp -r . $source
'';
nativeBuildInputs = [ cmake pkg-config ];
nativeBuildInputs = [ cmake ninja pkg-config ];
buildInputs = [
boost miniupnpc openssl unbound
@@ -1,94 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb71d2d..3a710a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -364,10 +364,10 @@ if(NOT MANUAL_SUBMODULES)
endfunction ()
message(STATUS "Checking submodules")
- check_submodule(external/miniupnp)
- check_submodule(external/rapidjson)
+ # check_submodule(external/miniupnp)
+ # check_submodule(external/rapidjson)
check_submodule(external/trezor-common)
- check_submodule(external/randomx)
+ # check_submodule(external/randomx)
check_submodule(external/supercop)
endif()
endif()
@@ -300,7 +300,8 @@ endif()
# elseif(CMAKE_SYSTEM_NAME MATCHES ".*BSDI.*")
# set(BSDI TRUE)
-include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external)
+include_directories(external/easylogging++ src contrib/epee/include external)
+#include_directories(external/rapidjson/include external/easylogging++ src contrib/epee/include external)
if(APPLE)
include_directories(SYSTEM /usr/include/malloc)
diff --git a/cmake/FindMiniupnpc.cmake b/cmake/FindMiniupnpc.cmake
index ad2004a..7f4bb68 100644
--- a/cmake/FindMiniupnpc.cmake
+++ b/cmake/FindMiniupnpc.cmake
@@ -37,7 +37,7 @@ set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
- MiniUPnPc DEFAULT_MSG
+ Miniupnpc DEFAULT_MSG
MINIUPNP_INCLUDE_DIR
MINIUPNP_LIBRARY
)
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 71b165f..10189ce 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -37,21 +37,9 @@
find_package(Miniupnpc REQUIRED)
-message(STATUS "Using in-tree miniupnpc")
-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
-add_subdirectory(miniupnp/miniupnpc)
-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
-if(MSVC)
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
-elseif(NOT MSVC)
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
-endif()
-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
-endif()
-
-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
+set(UPNP_STATIC false PARENT_SCOPE)
+set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
+set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
find_package(Unbound)
@@ -69,5 +69,4 @@ endif()
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
-add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index c626e22..be570ed 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -60,9 +60,9 @@
#include "cryptonote_core/cryptonote_core.h"
#include "net/parse.h"
-#include <miniupnp/miniupnpc/miniupnpc.h>
-#include <miniupnp/miniupnpc/upnpcommands.h>
-#include <miniupnp/miniupnpc/upnperrors.h>
+#include <miniupnpc/miniupnpc.h>
+#include <miniupnpc/upnpcommands.h>
+#include <miniupnpc/upnperrors.h>
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
@@ -1,4 +1,4 @@
{ lib, stdenv, mkDerivation, fetchFromGitHub, fetchpatch
{ lib, stdenv, mkDerivation, fetchFromGitHub, fetchpatch, fetchpatch2
, pkg-config, autoreconfHook
, openssl, db48, boost, zlib, miniupnpc
, glib, protobuf, util-linux, qrencode
@@ -34,6 +34,13 @@ mkDerivation rec {
url = "https://github.com/litecoin-project/litecoin/commit/6d1adb19aa79a8e8e140582759515bbd76816aa0.patch";
hash = "sha256-1y4Iz2plMw5HMAjl9x50QQpYrYaUd2WKrrAcUnQmlBY=";
})
# net: add compatibility for miniupnpc 2.2.8
# https://github.com/litecoin-project/litecoin/pull/971
(fetchpatch2 {
url = "https://github.com/litecoin-project/litecoin/commit/5dddffa3e1bbcc7a3e6963b4860ba2d675ca847b.patch?full_index=1";
hash = "sha256-F5GcL1RM91l04WrS3qYlV5zEcwyXrcRdmLLCqu1Hop0=";
})
];
nativeBuildInputs = [ pkg-config autoreconfHook ];
@@ -1,39 +0,0 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, unbound, openssl, boost
, lmdb, miniupnpc, readline, git, libsodium, rapidjson, cppzmq }:
stdenv.mkDerivation rec {
pname = "masari";
version = "unstable-2022-10-09";
src = fetchFromGitHub {
owner = "masari-project";
repo = "masari";
rev = "ff71f52220858b84a4403dab9a14339bcad57826";
sha256 = "sha256-GunNFqZNgpLfyAA9BiBC98axgTQuK76z3BUl5T0iJqs=";
};
postPatch = ''
# remove vendored libraries
rm -r external/{miniupnpc,rapidjson}
# include missing headers
sed -i "1i #include <map>" src/device/device_default.hpp
sed -i "1i #include <boost/mpl/contains.hpp>" contrib/epee/include/storages/portable_storage.h
'';
nativeBuildInputs = [ cmake pkg-config git ];
buildInputs = [
boost miniupnpc openssl unbound
readline libsodium
rapidjson cppzmq
];
meta = with lib; {
description = "scalability-focused, untraceable, secure, and fungible cryptocurrency using the RingCT protocol";
homepage = "https://www.getmasari.org/";
license = licenses.bsd3;
maintainers = with maintainers; [ matthewcroughan ];
platforms = platforms.linux;
};
}
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
{ lib, stdenv, fetchFromGitHub, fetchpatch2, cmake, ninja, pkg-config
, boost, miniupnpc, openssl, unbound
, zeromq, pcsclite, readline, libsodium, hidapi
, randomx, rapidjson
@@ -35,6 +35,28 @@ stdenv.mkDerivation rec {
};
patches = [
# cmake: remove unused/extera cmake/FindMiniupnpc.cmake and only rely on external/miniupnpc
# https://github.com/monero-project/monero/pull/9366
(fetchpatch2 {
url = "https://github.com/monero-project/monero/commit/5074a543a49f7e23fb39b6462fd4c4c9741c3693.patch?full_index=1";
hash = "sha256-dS2hhEU6m2of0ULlsf+/tZMHUmq3vGGXJPGHvtnpQnY=";
})
# cmake: add different parameters to add_monero_library.
# https://github.com/monero-project/monero/pull/9367
(fetchpatch2 {
url = "https://github.com/monero-project/monero/commit/b91ead90254ac6d6daf908f689c38e372a44c615.patch?full_index=1";
hash = "sha256-DL2YqkvEONbeEDqLOAo2eSF5JF5gOzKcLKeNlUXBY1w=";
})
# external: update miniupnpc to 2.2.8
# https://github.com/monero-project/monero/pull/9367
(fetchpatch2 {
url = "https://github.com/monero-project/monero/commit/d81da086ec5088a04b3f7b34831e72910300e2f7.patch?full_index=1";
hash = "sha256-ZJGiDMk5DMmEXwzoUYPC+DIoebluFh54kMQtQU78ckI=";
excludes = [ "external/miniupnp" ];
})
./use-system-libraries.patch
];
@@ -47,7 +69,7 @@ stdenv.mkDerivation rec {
cp -r . $source
'';
nativeBuildInputs = [ cmake pkg-config ];
nativeBuildInputs = [ cmake ninja pkg-config ];
buildInputs = [
boost miniupnpc openssl unbound
@@ -1,14 +1,14 @@
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 5b7f69a56..5536debe8 100644
index f8b834ac17...520e148428 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -36,22 +36,9 @@
# others.
@@ -39,23 +39,12 @@
add_compile_options(-D_GNU_SOURCE)
endif()
find_package(Miniupnpc REQUIRED)
-
-message(STATUS "Using in-tree miniupnpc")
-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
-set(UPNPC_BUILD_TESTS FALSE CACHE BOOL "Disable miniupnp internal tests." FORCE)
-add_subdirectory(miniupnp/miniupnpc)
-set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
-set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
@@ -20,33 +20,19 @@ index 5b7f69a56..5536debe8 100644
-if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
- set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
-endif()
-
-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
+set(UPNP_STATIC false PARENT_SCOPE)
+set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
+set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
+include(FindPkgConfig)
+pkg_check_modules(MINIUPNPC REQUIRED IMPORTED_TARGET GLOBAL miniupnpc)
+get_target_property(MINIUPNPC_INCLUDE_DIR PkgConfig::MINIUPNPC INTERFACE_INCLUDE_DIRECTORIES)
+set_target_properties(PkgConfig::MINIUPNPC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}/miniupnpc")
+set(UPNP_LIBRARIES PkgConfig::MINIUPNPC PARENT_SCOPE)
-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
-
find_package(Unbound)
@@ -69,4 +56,3 @@ endif()
if(NOT UNBOUND_INCLUDE_DIR)
@@ -72,4 +61,3 @@
add_subdirectory(db_drivers)
add_subdirectory(easylogging++)
add_subdirectory(qrcodegen)
-add_subdirectory(randomx EXCLUDE_FROM_ALL)
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl
index d4b39869c..13071d898 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -61,9 +61,9 @@
#include "cryptonote_core/cryptonote_core.h"
#include "net/parse.h"
-#include <miniupnp/miniupnpc/miniupnpc.h>
-#include <miniupnp/miniupnpc/upnpcommands.h>
-#include <miniupnp/miniupnpc/upnperrors.h>
+#include <miniupnpc/miniupnpc.h>
+#include <miniupnpc/upnpcommands.h>
+#include <miniupnpc/upnperrors.h>
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, openssl, boost, libevent, autoreconfHook, db4, miniupnpc, eject, pkg-config, hexdump }:
{ lib, stdenv, fetchFromGitHub, fetchpatch2, openssl, boost, libevent, autoreconfHook, db4, miniupnpc, eject, pkg-config, hexdump }:
stdenv.mkDerivation rec {
pname = "namecoind";
@@ -11,6 +11,14 @@ stdenv.mkDerivation rec {
sha256 = "sha256-2KMK5Vb8osuaKbzI1aaPSYg+te+v9CEcGUkrVI6Fk54=";
};
patches = [
# upnp: add compatibility for miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/namecoin/namecoin-core/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1";
hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
@@ -4,6 +4,7 @@
, boost
, db48
, fetchFromGitHub
, fetchpatch2
, libevent
, miniupnpc
, openssl
@@ -25,6 +26,14 @@ stdenv.mkDerivation rec {
hash = "sha256-RxkLt+7u+r5jNwEWiArTUpZ8ykYwWtvIDFXTSKhGN/w=";
};
patches = [
# upnp: fix build with miniupnpc 2.2.8
(fetchpatch2 {
url = "https://github.com/bitcoin/bitcoin/commit/8acdf66540834b9f9cf28f16d389e8b6a48516d5.patch?full_index=1";
hash = "sha256-oDvHUvwAEp0LJCf6QBESn38Bu359TcPpLhvuLX3sm6M=";
})
];
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ openssl db48 boost zlib miniupnpc libevent zeromq unixtools.hexdump python3 ];
+7 -4
View File
@@ -5,7 +5,7 @@
, which
, zip
, libicns
, botan2
, botan3
, capstone
, jansson
, libunistring
@@ -32,14 +32,17 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config which zip ]
++ lib.optionals stdenv.isDarwin [ libicns ];
buildInputs = [ botan2 capstone jansson libunistring wxGTK32 ]
buildInputs = [ botan3 capstone jansson libunistring wxGTK32 ]
++ (with lua53Packages; [ lua busted ])
++ (with perlPackages; [ perl TemplateToolkit ])
++ lib.optionals stdenv.isLinux [ gtk3 ]
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa IOKit ];
makeFlags = [ "prefix=${placeholder "out"}" ]
++ lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ];
makeFlags = [
"prefix=${placeholder "out"}"
"BOTAN_PKG=botan-3"
"CXXSTD=-std=c++20"
] ++ lib.optionals stdenv.isDarwin [ "-f Makefile.osx" ];
enableParallelBuilding = true;
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, cmake
, pkg-config
, makeWrapper
@@ -27,6 +28,14 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
# miniupnp: add support for api version 18
(fetchpatch2 {
url = "https://github.com/flyinghead/flycast/commit/71982eda7a038e24942921e558845103b6c12326.patch?full_index=1";
hash = "sha256-5fFCgX7MfCqW7zxXJuHt9js+VTZZKEQHRYuWh7MTKzI=";
})
];
nativeBuildInputs = [
cmake
pkg-config
@@ -6,7 +6,10 @@
, freetype
, gtk3
, libsoup
, mkYarnPackage
, stdenvNoCC
, yarnConfigHook
, yarnBuildHook
, nodejs
, openssl
, pkg-config
, rustPlatform
@@ -25,7 +28,7 @@ let
sha256 = "sha256-VFRdkSfe2mERaYYtZlg9dvH1loGWVBGwiTRj4AoNEAo=";
};
frontend-build = mkYarnPackage {
frontend-build = stdenvNoCC.mkDerivation (finalAttrs: {
inherit version src;
pname = "xplorer-ui";
@@ -33,19 +36,16 @@ let
yarnLock = src + "/yarn.lock";
sha256 = "sha256-H37vD0GTSsWV5UH7C6UANDWnExTGh8yqajLn3y7P2T8=";
};
packageJSON = ./package.json;
buildPhase = ''
export HOME=$(mktemp -d)
yarn --offline run prebuild
cp -r deps/xplorer/out $out
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
yarnBuildScript = "prebuild";
installPhase = ''
cp -r out $out
'';
distPhase = "true";
dontInstall = true;
};
});
in
rustPlatform.buildRustPackage {
@@ -1,88 +0,0 @@
{
"name": "xplorer",
"description": "Xplorer, a customizable, modern file manager",
"version": "0.3.1",
"author": "Justin Maximillian Kimlim <kimlimjustin@gmail.com>",
"icon": "build/icon.icns",
"private": true,
"homepage": "https://xplorer.space",
"repository": {
"type": "git",
"url": "https://github.com/kimlimjustin/xplorer.git"
},
"os": ["darwin", "win32", "linux"],
"scripts": {
"start": "yarn dev",
"web": "concurrently \"cd api/web && cargo run\" \"live-server ./out/src --no-browser\"",
"dev": "yarn compile && concurrently --kill-others \"yarn compile:watch\" \"yarn sass:watch\" \"yarn web\" \"tauri dev\"",
"clean": "rimraf out",
"sass": "sass src/Public/style.scss out/src/Public/style.css",
"sass:watch": "node scripts/sass-watcher.js",
"docs": "yarn --cwd ./docs start",
"pretest": "yarn compile",
"test": "jest",
"copyfiles": "node scripts/copyfiles",
"compile": "webpack && yarn sass && yarn copyfiles",
"compile:watch": "webpack --watch",
"crowdin": "crowdin",
"crowdin:pull": "crowdin pull",
"postcrowdin:pull": "node scripts/post_crowdin_pull.js",
"crowdin:sync": "yarn --cwd ./docs write-translations && crowdin upload && crowdin download",
"lint": "eslint -c .eslintrc.yml --ext .ts ./src",
"prettier": "prettier --write src",
"grunt": "grunt",
"css:minify": "cleancss --batch --batch-suffix \"\" out/**/*.css ",
"prebuild": "yarn compile && yarn grunt && yarn css:minify",
"build": "tauri build",
"postinstall": "husky install",
"fakefiles": "python scripts/generate-fake-files.py 1000"
},
"workspaces": ["packages/*"],
"keywords": [
"Xplorer",
"File explorer",
"File",
"File manager",
"Folders",
"Directory"
],
"license": "Apache-2.0",
"devDependencies": {
"@crowdin/cli": "^3.6.5",
"@tauri-apps/cli": "^1.1.1",
"@types/jest": "^27.0.2",
"@types/marked": "^4.0.1",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"buffer": "^6.0.3",
"clean-css-cli": "^5.3.3",
"concurrently": "^6.2.1",
"cpy": "^8.1.2",
"eslint": "^8.2.0",
"grunt": "^1.4.1",
"grunt-cli": "^1.4.3",
"grunt-contrib-uglify": "^5.0.1",
"grunt-contrib-watch": "^1.1.0",
"husky": "^7.0.2",
"jest": "^27.1.0",
"live-server": "^1.2.1",
"node-watch": "^0.7.1",
"postinstall-postinstall": "^2.1.0",
"prettier": "2.5.1",
"rimraf": "^3.0.2",
"sass": "1.45.2",
"ts-jest": "^27.0.7",
"ts-loader": "^9.2.6",
"typescript": "^4.4.2",
"webpack": "^5.58.2",
"webpack-cli": "^4.9.0"
},
"dependencies": {
"@tauri-apps/api": "^1.1.0",
"highlight.js": "^11.2.0",
"mammoth": "^1.4.18",
"marked": "^4.0.15",
"xlsx": "^0.17.1"
},
"optionalDependencies": {}
}
+5 -2
View File
@@ -4,6 +4,9 @@
, cmake
, help2man
, gzip
# There is a f3d overriden with EGL enabled vtk in top-level/all-packages.nix
# compiling with EGL enabled vtk will result in f3d running in headless mode
# See https://github.com/NixOS/nixpkgs/pull/324022. This may change later.
, vtk_9
, autoPatchelfHook
, Cocoa
@@ -15,7 +18,7 @@
stdenv.mkDerivation rec {
pname = "f3d";
version = "2.4.0";
version = "2.5.0";
outputs = [ "out" ] ++ lib.optionals withManual [ "man" ];
@@ -23,7 +26,7 @@ stdenv.mkDerivation rec {
owner = "f3d-app";
repo = "f3d";
rev = "refs/tags/v${version}";
hash = "sha256-mqkPegbGos38S50CoV4Qse9Z4wZ327UmIwmSrrP35uI=";
hash = "sha256-Mw40JyXZj+Q4a9dD5UnkUSdUfQGaV92gor8ynn86VJ8=";
};
nativeBuildInputs = [
@@ -198,6 +198,17 @@ stdenv.mkDerivation (finalAttrs: {
"-DWITH_CYCLES_DEVICE_OPTIX=ON"
];
preConfigure = ''
(
expected_python_version=$(grep -E --only-matching 'set\(_PYTHON_VERSION_SUPPORTED [0-9.]+\)' build_files/cmake/Modules/FindPythonLibsUnix.cmake | grep -E --only-matching '[0-9.]+')
actual_python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[0:2])))')
if ! [[ "$actual_python_version" = "$expected_python_version" ]]; then
echo "wrong Python version, expected '$expected_python_version', got '$actual_python_version'" >&2
exit 1
fi
)
'';
nativeBuildInputs =
[
cmake
+2 -2
View File
@@ -1,7 +1,7 @@
{ lib, stdenv
, fetchFromGitLab
, extra-cmake-modules
, botan2
, botan3
, karchive
, kauth
, libdrm
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec{
wrapQtAppsHook
];
buildInputs = [
botan2
botan3
karchive
kauth
libdrm
+2 -2
View File
@@ -5,7 +5,7 @@
, qttools
, asciidoctor
, botan2
, botan3
, curl
, libXi
, libXtst
@@ -114,7 +114,7 @@ stdenv.mkDerivation rec {
buildInputs = [
curl
botan2
botan3
libXi
libXtst
libargon2
+16 -19
View File
@@ -1,17 +1,20 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, makeWrapper
, makeDesktopItem
, copyDesktopItems
, mkYarnPackage
, electron_29
}:
let
electron = electron_29;
in
mkYarnPackage rec {
stdenv.mkDerivation rec {
pname = "kuro";
version = "9.0.0";
@@ -22,8 +25,6 @@ mkYarnPackage rec {
hash = "sha256-9Z/r5T5ZI5aBghHmwiJcft/x/wTRzDlbIupujN2RFfU=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-GTiNv7u1QK/wjQgpka7REuoLn2wjZG59kYJQaZZPycI=";
@@ -32,30 +33,29 @@ mkYarnPackage rec {
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
makeWrapper
copyDesktopItems
];
postBuild = ''
pushd deps/kuro
yarn --offline run electron-builder \
--dir \
-c.electronDist=${electron}/libexec/electron \
-c.electronVersion=${electron.version}
popd
'';
yarnBuildScript = "electron-builder";
yarnBuildFlags = [
"--dir"
"-c.electronDist=${electron}/libexec/electron"
"-c.electronVersion=${electron.version}"
];
installPhase = ''
runHook preInstall
# resources
mkdir -p "$out/share/lib/kuro"
cp -r ./deps/kuro/dist/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/kuro"
cp -r ./dist/*-unpacked/{locales,resources{,.pak}} "$out/share/lib/kuro"
# icons
install -Dm644 ./deps/kuro/static/Icon.png $out/share/icons/hicolor/1024x1024/apps/kuro.png
install -Dm644 ./static/Icon.png $out/share/icons/hicolor/1024x1024/apps/kuro.png
# executable wrapper
makeWrapper '${electron}/bin/electron' "$out/bin/kuro" \
@@ -65,9 +65,6 @@ mkYarnPackage rec {
runHook postInstall
'';
# Do not attempt generating a tarball for contents again.
# note: `doDist = false;` does not work.
distPhase = "true";
desktopItems = [
(makeDesktopItem {
-149
View File
@@ -1,149 +0,0 @@
{
"name": "kuro",
"productName": "Kuro",
"version": "9.0.0",
"description": "Elegant Microsoft To-Do desktop app (Ao fork)",
"license": "MIT",
"repository": "davidsmorais/kuro",
"author": {
"name": "davidsmorais",
"email": "david@dsmorais.com",
"url": "https://github.com/davidsmorais"
},
"maintainers": [
{
"name": "davidsmorais",
"email": "david@dsmorais.com",
"url": "https://github.com/davidsmorais"
}
],
"scripts": {
"postinstall": "electron-builder install-app-deps",
"icons": "electron-icon-maker --input=./static/Icon.png --output=./build/",
"test": "xo && stylelint 'src/style/*.css'",
"release": "yarn version && rm -rf dist build && yarn icons && electron-builder --publish never",
"build-snap": "electron-builder --linux snap",
"build-win": "electron-builder --win",
"start": "electron ."
},
"dependencies": {
"auto-launch": "^5.0.1",
"electron-context-menu": "^3.6.1",
"electron-debug": "^1.4.0",
"electron-dl": "^2.0.0",
"electron-store": "^8.1.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"electron": "^22.1.0",
"electron-builder": "^23.6.0",
"electron-icon-maker": "^0.0.5",
"stylelint": "^14.9.1",
"xo": "^0.53.1"
},
"xo": {
"envs": [
"browser",
"node"
],
"rules": {
"n/prefer-global/process": 0,
"unicorn/prefer-module": 0,
"unicorn/no-for-loop": 0,
"unicorn/no-array-for-each": 0,
"import/extensions": 0,
"object-curly-spacing": 0,
"quote-props": 0,
"unicorn/prefer-query-selector": 0,
"quotes": [
"error",
"double"
]
},
"space": 2
},
"stylelint": {
"rules": {
"block-closing-brace-empty-line-before": "never",
"block-closing-brace-newline-after": "always",
"block-no-empty": true,
"block-opening-brace-space-before": "always",
"color-hex-case": "upper",
"color-hex-length": "long",
"color-no-invalid-hex": true,
"comment-no-empty": true,
"declaration-block-semicolon-space-before": "never",
"indentation": 2,
"max-empty-lines": 0,
"no-duplicate-selectors": true
}
},
"build": {
"appId": "com.davidsmorais.kuro",
"snap": {
"title": "Kuro"
},
"files": [
"**/*",
"!media${/*}",
"!docs${/*}"
],
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
}
],
"icon": "icons/win/icon.ico",
"publish": {
"provider": "github",
"releaseType": "release"
}
},
"linux": {
"category": "Office",
"icon": "icons/png",
"description": "Kuro is an unofficial, featureful, open source, community-driven, free Microsoft To-Do app, used by people in more than 120 countries. (Ao fork)",
"synopsis": "Elegant Microsoft To-Do desktop app (Ao fork)",
"publish": {
"provider": "github",
"releaseType": "release"
},
"target": [
{
"target": "AppImage",
"arch": [
"x64"
]
},
{
"target": "deb",
"arch": [
"x64"
]
},
{
"target": "pacman",
"arch": [
"x64"
]
},
{
"target": "rpm",
"arch": [
"x64"
]
},
{
"target": "snap",
"arch": [
"x64"
]
}
]
}
}
}
@@ -3,11 +3,12 @@
, fetchFromGitHub
, buildMozillaMach
, nixosTests
, python311
}:
((buildMozillaMach rec {
pname = "floorp";
packageVersion = "11.14.1";
packageVersion = "11.15.0";
applicationName = "Floorp";
binaryName = "floorp";
branding = "browser/branding/official";
@@ -22,7 +23,7 @@
repo = "Floorp";
fetchSubmodules = true;
rev = "v${packageVersion}";
hash = "sha256-PhI+hIypPF6W5RJIXhCAXblSJNwgYavfCgdQozDSXG0=";
hash = "sha256-LRuts3O3Rj5e6rT9gKTTwAIsY0oSziuiZ3rzE7wHa7o=";
};
extraConfigureFlags = [
@@ -32,10 +33,12 @@
];
extraPostPatch = ''
# Fix .desktop files for PWAs generated by Floorp; they hardcode /usr/bin
# https://github.com/NixOS/nixpkgs/issues/314115
# Fix .desktop files for PWAs generated by Floorp
# The executable path returned by Services.dirsvc.get() is absolute and
# thus is the full /nix/store/[..] path. To avoid breaking PWAs with each
# update, rely on `floorp` being in $PATH, as before.
substituteInPlace floorp/browser/base/content/modules/ssb/LinuxSupport.mjs \
--replace-fail /usr/bin/floorp floorp
--replace-fail 'Services.dirsvc.get("XREExeF",Ci.nsIFile).path' floorp
'';
updateScript = ./update.sh;
@@ -61,6 +64,7 @@
enableOfficialBranding = false;
googleAPISupport = true;
mlsAPISupport = true;
python3 = python311;
}).overrideAttrs (prev: {
MOZ_DATA_REPORTING = "";
MOZ_TELEMETRY_REPORTING = "";
@@ -95,6 +95,7 @@ let
maintainers = with maintainers; [
euank
mic92
marcusramberg
superherointj
wrmilling
yajo
@@ -23,20 +23,20 @@
}:
let
version = "0.16.2";
version = "0.17.1";
src = fetchFromGitHub {
owner = "f-koehler";
repo = "KTailctl";
rev = "v${version}";
hash = "sha256-rnuh0+i6W9ipSM61MXd9dTlIkdGUHMjtvElW/4S2YCg=";
hash = "sha256-urB8NcdQMF6RNX8F2CpzOd0ZkRi3IS4XFyOOXIeChpY=";
};
goDeps = (buildGoModule {
pname = "ktailctl-go-wrapper";
inherit src version;
modRoot = "src/wrapper";
vendorHash = "sha256-GD+G+7b8GBwR3OrRPJbGJVom+kLC67VvlGFIA0S7UF8=";
vendorHash = "sha256-Ls4MVppMJbUUukaKkDAN8Lx/s09JRJTf/RMgk0iDcnw=";
}).goModules;
in
stdenv.mkDerivation {
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, bzip2, libX11
{ lib, stdenv, fetchFromGitHub, fetchpatch2, cmake, pkg-config, bzip2, libX11
, mkDerivation, qtbase, qttools, qtmultimedia, qtscript
, libiconv, pcre-cpp, libidn, lua5, miniupnpc, aspell, gettext, perl }:
@@ -13,6 +13,13 @@ mkDerivation rec {
sha256 = "sha256-JmAopXFS6MkxW0wDQ1bC/ibRmWgOpzU0971hcqAehLU=";
};
patches = [
(fetchpatch2 {
url = "https://github.com/eiskaltdcpp/eiskaltdcpp/commit/5ab5e1137a46864b6ecd1ca302756da8b833f754.patch?full_index=1";
hash = "sha256-GIdcIHKXNSbHxbiMGRPgfq2w/zNSfR/FhyyXayFWfg8=";
})
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ qtbase qttools qtmultimedia qtscript bzip2 libX11 pcre-cpp libidn lua5 miniupnpc aspell gettext
(perl.withPackages (p: with p; [
@@ -1,12 +0,0 @@
diff --git a/libretroshare/src/util/rsdir.cc b/libretroshare/src/util/rsdir.cc
index 8556b8198..d63699216 100644
--- a/libretroshare/src/util/rsdir.cc
+++ b/libretroshare/src/util/rsdir.cc
@@ -47,6 +47,7 @@
#include <fstream>
#include <stdexcept>
+#include <filesystem>
#if defined(WIN32) || defined(__CYGWIN__)
#include "util/rsstring.h"
@@ -1,5 +1,4 @@
{ lib, mkDerivation, fetchFromGitHub
, fetchpatch
{ lib, stdenv, mkDerivation, fetchFromGitHub, fetchpatch2
, qmake, cmake, pkg-config, miniupnpc, bzip2
, speex, libmicrohttpd, libxml2, libxslt, sqlcipher, rapidjson, libXScrnSaver
, qtbase, qtx11extras, qtmultimedia, libgnome-keyring
@@ -7,13 +6,13 @@
mkDerivation rec {
pname = "retroshare";
version = "0.6.6";
version = "0.6.7.2";
src = fetchFromGitHub {
owner = "RetroShare";
repo = "RetroShare";
rev = "v${version}";
sha256 = "1hsymbhsfgycj39mdkrdp2hgq8irmvxa4a6jx2gg339m1fgf2xmh";
hash = "sha256-1A1YvOWIiWlP1JPUTg5Z/lxVGCBv4tCPf5sZdPogitU=";
fetchSubmodules = true;
};
@@ -21,13 +20,13 @@ mkDerivation rec {
# The build normally tries to get git sub-modules during build
# but we already have them checked out
./no-submodules.patch
./cpp-filesystem.patch
# Fix gcc-13 build failure
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/RetroShare/RetroShare/commit/e1934fd9b03cd52c556eb06d94fb5d68b649592e.patch";
hash = "sha256-oqxQAsD4fmkWAH2kSVmmed/q0LzTW/iqUU1SgYNdFyk=";
# Support the miniupnpc-2.2.8 API change
(fetchpatch2 {
url = "https://github.com/RetroShare/libretroshare/commit/f1b89c4f87d77714571b4135c301bf0429096a20.patch?full_index=1";
hash = "sha256-UiZMsUFaOZTLj/dx1rLr5bTR1CQ6nt2+IygQdvwJqwc=";
stripLen = 1;
extraPrefix = "libretroshare/";
})
];
@@ -48,6 +47,15 @@ mkDerivation rec {
"RS_EXTRA_VERSION="
];
postPatch = ''
# Build libsam3 as C, not C++. No, I have no idea why it tries to
# do that, either.
substituteInPlace libretroshare/src/libretroshare.pro \
--replace-fail \
"LIBSAM3_MAKE_PARAMS =" \
"LIBSAM3_MAKE_PARAMS = CC=$CC AR=$AR"
'';
postInstall = ''
# BT DHT bootstrap
cp libbitdht/src/bitdht/bdboot.txt $out/share/retroshare
@@ -1,8 +1,9 @@
Submodule libretroshare contains modified content
diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro
index 84d18944e..71aeb67d2 100644
index 923f878c..ef00f3d7 100644
--- a/libretroshare/src/libretroshare.pro
+++ b/libretroshare/src/libretroshare.pro
@@ -870,20 +870,14 @@ rs_jsonapi {
@@ -930,20 +930,14 @@ rs_jsonapi {
genrestbedlib.variable_out = PRE_TARGETDEPS
win32-g++:isEmpty(QMAKE_SH) {
genrestbedlib.commands = \
@@ -28,7 +29,7 @@ index 84d18944e..71aeb67d2 100644
mkdir -p $${RESTBED_BUILD_PATH} &&
}
genrestbedlib.commands += \
@@ -991,14 +985,9 @@ rs_broadcast_discovery {
@@ -1063,14 +1057,9 @@ rs_broadcast_discovery {
udpdiscoverycpplib.variable_out = PRE_TARGETDEPS
win32-g++:isEmpty(QMAKE_SH) {
udpdiscoverycpplib.commands = \
@@ -44,8 +45,26 @@ index 84d18944e..71aeb67d2 100644
}
udpdiscoverycpplib.commands += \
cd $$shell_path($${UDP_DISCOVERY_BUILD_PATH}) && \
@@ -1106,15 +1095,13 @@ rs_sam3_libsam3 {
win32-g++:isEmpty(QMAKE_SH) {
LIBSAM3_MAKE_PARAMS = CC=gcc
libsam3.commands = \
- cd /D $$shell_path($${RS_SRC_PATH}) && git submodule update --init supportlibs/libsam3 || cd . $$escape_expand(\\n\\t) \
+ cd /D $$shell_path($${RS_SRC_PATH}) && cd . $$escape_expand(\\n\\t) \
$(CHK_DIR_EXISTS) $$shell_path($$LIBSAM3_BUILD_PATH) $(MKDIR) $$shell_path($${LIBSAM3_BUILD_PATH}) $$escape_expand(\\n\\t) \
$(COPY_DIR) $$shell_path($${LIBSAM3_SRC_PATH}) $$shell_path($${LIBSAM3_BUILD_PATH}) || cd . $$escape_expand(\\n\\t)
} else {
LIBSAM3_MAKE_PARAMS =
libsam3.commands = \
- cd $${RS_SRC_PATH} && ( \
- git submodule update --init supportlibs/libsam3 || \
- true ) && \
+ cd $${RS_SRC_PATH} && \
mkdir -p $${LIBSAM3_BUILD_PATH} && \
(cp -r $${LIBSAM3_SRC_PATH}/* $${LIBSAM3_BUILD_PATH} || true) &&
}
diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro
index 654efd170..06cba9ba3 100644
index d73117b84..b2fc6799a 100644
--- a/retroshare-gui/src/retroshare-gui.pro
+++ b/retroshare-gui/src/retroshare-gui.pro
@@ -66,10 +66,7 @@ rs_gui_cmark {
@@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch2
, cmake
, pkg-config
, python3
@@ -69,6 +70,20 @@ stdenv.mkDerivation (finalAttrs: {
fetchSubmodules = true;
};
patches = [
(fetchpatch2 {
url = "https://github.com/transmission/transmission/commit/febfe49ca3ecab1a7142ecb34012c1f0b2bcdee8.patch?full_index=1";
hash = "sha256-Ge0+AXf/ilfMieGBAdvvImY7JOb0gGIdeKprC37AROs=";
excludes = [
# The submodule that we don't use (we use our miniupnp)
"third-party/miniupnp"
# Hunk fails for this one, but we don't care because we don't rely upon
# xcode definitions even for the Darwin build.
"Transmission.xcodeproj/project.pbxproj"
];
})
];
outputs = [ "out" "apparmor" ];
cmakeFlags = [
@@ -1,6 +1,7 @@
{ lib, stdenv, fetchFromGitHub, fetchYarnDeps, mkYarnPackage, nixosTests, writeText, python3 }:
{ lib, stdenv, fetchFromGitHub, fetchYarnDeps, yarnConfigHook, nixosTests, writeText, python3 }:
let
pname = "powerdns-admin";
version = "0.4.2";
src = fetchFromGitHub {
owner = "PowerDNS-Admin";
@@ -23,44 +24,32 @@ let
./0001-Fix-flask-2.3-issue.patch
];
assets = mkYarnPackage {
inherit src version;
packageJSON = ./package.json;
assets = stdenv.mkDerivation {
pname = "${pname}-assets";
inherit version src;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-rXIts+dgOuZQGyiSke1NIG7b4lFlR/Gfu3J6T3wP3aY=";
};
# Copied from package.json, see also
# https://github.com/NixOS/nixpkgs/pull/214952
packageResolutions = {
"@fortawesome/fontawesome-free" = "6.3.0";
};
nativeBuildInputs = pythonDeps;
nativeBuildInputs = [
yarnConfigHook
] ++ pythonDeps;
patches = all_patches ++ [
./0002-Remove-cssrewrite-filter.patch
];
buildPhase = ''
# The build process expects the directory to be writable
# with node_modules at a specific path
# https://github.com/PowerDNS-Admin/PowerDNS-Admin/blob/master/.yarnrc
approot=deps/powerdns-admin-assets
ln -s $node_modules $approot/powerdnsadmin/static/node_modules
SESSION_TYPE=filesystem FLASK_APP=$approot/powerdnsadmin/__init__.py flask assets build
SESSION_TYPE=filesystem FLASK_APP=./powerdnsadmin/__init__.py flask assets build
'';
installPhase = ''
# https://github.com/PowerDNS-Admin/PowerDNS-Admin/blob/54b257768f600c5548a1c7e50eac49c40df49f92/docker/Dockerfile#L43
mkdir $out
cp -r $approot/powerdnsadmin/static/{generated,assets,img} $out
find $node_modules -name webfonts -exec cp -r {} $out \;
find $node_modules -name fonts -exec cp -r {} $out \;
find $node_modules/icheck/skins/square -name '*.png' -exec cp {} $out/generated \;
cp -r powerdnsadmin/static/{generated,assets,img} $out
find powerdnsadmin/static/node_modules -name webfonts -exec cp -r {} $out \; -printf "Copying %P\n"
find powerdnsadmin/static/node_modules -name fonts -exec cp -r {} $out \; -printf "Copying %P\n"
find powerdnsadmin/static/node_modules/icheck/skins/square -name '*.png' -exec cp {} $out/generated \;
'';
distPhase = "true";
};
assetsPy = writeText "assets.py" ''
@@ -73,9 +62,7 @@ let
assets.register('css_main', 'generated/main.css')
'';
in stdenv.mkDerivation {
pname = "powerdns-admin";
inherit src version;
inherit pname version src;
nativeBuildInputs = [ python.pkgs.wrapPython ];
@@ -1,24 +0,0 @@
{
"dependencies": {
"@fortawesome/fontawesome-free": "6.3.0",
"admin-lte": "3.2.0",
"bootstrap": "4.6.2",
"bootstrap-datepicker": "^1.9.0",
"bootstrap-validator": "^0.11.9",
"datatables.net-plugins": "^1.13.1",
"icheck": "^1.0.2",
"jquery-slimscroll": "^1.3.8",
"jquery-sparkline": "^2.4.0",
"jquery-ui-dist": "^1.13.2",
"jquery.quicksearch": "^2.4.0",
"jquery-validation": "^1.19.5",
"jtimeout": "^3.2.0",
"knockout": "^3.5.1",
"multiselect": "^0.9.12"
},
"resolutions": {
"admin-lte/@fortawesome/fontawesome-free": "6.3.0"
},
"name": "powerdns-admin-assets",
"version": "0.4.1"
}
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, intltool
, pkg-config
, wrapGAppsHook3
@@ -19,6 +20,15 @@ stdenv.mkDerivation {
hash = "sha256-RWnNjpgXRYncz9ID8zirENffy1UsfHD1H6Mmd8DKN4k=";
};
patches = [
# Fix build with miniupnpc 2.2.8
# https://github.com/Holarse-Linuxgaming/yaup/pull/6
(fetchpatch2 {
url = "https://github.com/Holarse-Linuxgaming/yaup/commit/c92134e305932785a60bd72131388f507b4d1853.patch?full_index=1";
hash = "sha256-Exqkfp9VYIf9JpAc10cO8NuEAWvI5Houi7CLXV5zBDY=";
})
];
nativeBuildInputs = [
intltool
pkg-config
+65 -77
View File
@@ -2,100 +2,88 @@
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, yarnBuildHook
, fetchzip
, makeWrapper
, makeDesktopItem
, mkYarnPackage
, electron
, desktopToDarwinBundle
, copyDesktopItems
}:
let
executableName = "micropad";
in
mkYarnPackage rec {
pname = "micropad";
version = "4.5.1";
src = fetchFromGitHub {
owner = "MicroPad";
repo = "Micropad-Electron";
rev = "v${version}";
hash = "sha256-z+g+FwmoX4Qqf+v4BVLCtfrXwGiAUFlPLQQhp2CMhLU=";
};
stdenv.mkDerivation (finalAttrs: {
pname = "micropad";
version = "4.5.1";
micropad-core = fetchzip {
url = "https://github.com/MicroPad/MicroPad-Core/releases/download/v${version}/micropad.tar.xz";
hash = "sha256-y13PVA/AKKsc5q7NDwZFasb7fOo+56IW8qbTbsm2WWc=";
};
src = fetchFromGitHub {
owner = "MicroPad";
repo = "Micropad-Electron";
rev = "v${finalAttrs.version}";
hash = "sha256-z+g+FwmoX4Qqf+v4BVLCtfrXwGiAUFlPLQQhp2CMhLU=";
};
packageJSON = ./package.json;
# This project can't be built from source currently, because Nixpkgs lacks
# ecosystem for https://bun.sh
micropad-core = fetchzip {
url = "https://github.com/MicroPad/MicroPad-Core/releases/download/v${finalAttrs.version}/micropad.tar.xz";
hash = "sha256-y13PVA/AKKsc5q7NDwZFasb7fOo+56IW8qbTbsm2WWc=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-ESYSHuHLNsn3EYKIe2p0kg142jyC0USB+Ef//oGeF08=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-ESYSHuHLNsn3EYKIe2p0kg142jyC0USB+Ef//oGeF08=";
};
nativeBuildInputs = [ copyDesktopItems makeWrapper ]
++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
nativeBuildInputs = [ yarnBuildHook copyDesktopItems makeWrapper ]
++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
buildPhase = ''
runHook preBuild
pushd deps/micropad/
yarn --offline build
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
installPhase = ''
runHook preInstall
# resources
mkdir -p "$out/share/"
cp -r './deps/micropad' "$out/share/micropad"
ln -s '${finalAttrs.micropad-core}' "$out/share/micropad/core"
rm "$out/share/micropad/node_modules"
cp -r './node_modules' "$out/share/micropad"
# resources
mkdir -p "$out/share/"
cp -r './deps/micropad' "$out/share/micropad"
ln -s '${micropad-core}' "$out/share/micropad/core"
rm "$out/share/micropad/node_modules"
cp -r './node_modules' "$out/share/micropad"
# icons
for icon in $out/share/micropad/build/icons/*.png; do
mkdir -p "$out/share/icons/hicolor/$(basename $icon .png | sed -e 's/^icon-//')/apps"
ln -s "$icon" "$out/share/icons/hicolor/$(basename $icon .png | sed -e 's/^icon-//')/apps/micropad.png"
done
# icons
for icon in $out/share/micropad/build/icons/*.png; do
mkdir -p "$out/share/icons/hicolor/$(basename $icon .png | sed -e 's/^icon-//')/apps"
ln -s "$icon" "$out/share/icons/hicolor/$(basename $icon .png | sed -e 's/^icon-//')/apps/micropad.png"
done
# executable wrapper
makeWrapper '${electron}/bin/electron' "$out/bin/micropad" \
--add-flags "$out/share/micropad" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
# executable wrapper
makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \
--add-flags "$out/share/micropad" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
runHook postInstall
'';
runHook postInstall
'';
# Do not attempt generating a tarball for micropad again.
doDist = false;
# Do not attempt generating a tarball for micropad again.
doDist = false;
# The desktop item properties should be kept in sync with data from upstream:
# https://github.com/MicroPad/MicroPad-Electron/blob/master/package.json
desktopItems = [
(makeDesktopItem {
name = "micropad";
exec = "micropad %u";
icon = "micropad";
desktopName = "µPad";
startupWMClass = "µPad";
comment = finalAttrs.meta.description;
categories = ["Office"];
})
];
# The desktop item properties should be kept in sync with data from upstream:
# https://github.com/MicroPad/MicroPad-Electron/blob/master/package.json
desktopItems = [
(makeDesktopItem {
name = "micropad";
exec = "${executableName} %u";
icon = "micropad";
desktopName = "µPad";
startupWMClass = "µPad";
comment = meta.description;
categories = ["Office"];
})
];
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "A powerful note-taking app that helps you organise + take notes without restrictions";
homepage = "https://getmicropad.com/";
license = licenses.mpl20;
maintainers = with maintainers; [rhysmdnz];
inherit (electron.meta) platforms;
mainProgram = "micropad";
};
}
meta = {
description = "A powerful note-taking app that helps you organise + take notes without restrictions";
homepage = "https://getmicropad.com/";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [rhysmdnz];
inherit (electron.meta) platforms;
mainProgram = "micropad";
};
})
@@ -1,117 +0,0 @@
{
"name": "micropad",
"version": "4.5.1",
"description": "A powerful note-taking app that helps you organise + take notes without restrictions.",
"main": "main.js",
"scripts": {
"start": "yarn build && yarn electron . --is-dev --no-sandbox",
"build": "yarn tsc -p tsconfig.json",
"update-core": "rm -rf core && rm -rf tmp && mkdir tmp && wget https://github.com/MicroPad/MicroPad-Core/releases/download/v${npm_package_version}/micropad.tar.xz -P ./tmp && cd tmp && tar -xf micropad.tar.xz && rm build/dist/*.map && cp -r build ../core && cd .. && rm -rf tmp",
"pack": "yarn build && yarn electron-builder --dir",
"dist": "yarn build && yarn electron-builder",
"windows:version": "echo %npm_package_version%"
},
"repository": {
"type": "git",
"url": "git+https://github.com/MicroPad/Electron.git"
},
"author": {
"name": "Nick Webster",
"email": "nick@nick.geek.nz"
},
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/MicroPad/Electron/issues"
},
"homepage": "https://getmicropad.com",
"devDependencies": {
"@types/mime": "^3.0.1",
"@types/node": "^18.7.18",
"@types/typo-js": "^1.2.1",
"electron": "^28.1.0",
"electron-builder": "^24.9.1",
"typescript": "~5.2.2"
},
"dependencies": {
"dictionary-en": "^3.0.0",
"dictionary-en-au": "^2.1.1",
"electron-context-menu": "^3.1.2",
"electron-window-state": "^5.0.3",
"localforage": "^1.10.0",
"mime": "^3.0.0",
"typo-js": "^1.2.3"
},
"build": {
"appId": "com.getmicropad.micropad",
"productName": "µPad",
"publish": {
"provider": "github",
"releaseType": "release"
},
"asarUnpack": [
"preload.js"
],
"linux": {
"target": [
{
"target": "tar.gz",
"arch": [
"x64",
"armv7l",
"arm64"
]
},
{
"target": "AppImage",
"arch": [
"x64",
"armv7l",
"arm64"
]
},
"snap",
"deb",
"rpm",
"pacman"
],
"executableName": "micropad",
"category": "Office",
"icon": "build/icons"
},
"pacman": {
"depends": [
"gtk3"
]
},
"snap": {
"publish": {
"provider": "github",
"releaseType": "release"
}
},
"mac": {
"target": {
"target": "dmg",
"arch": "universal"
},
"category": "public.app-category.productivity",
"identity": null
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64",
"arm64"
]
},
"portable"
]
},
"nsis": {
"allowToChangeInstallationDirectory": true,
"oneClick": false
}
}
}
@@ -1,24 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq nix nodePackages.prettier prefetch-yarn-deps
set -eu -o pipefail
latest_version=$(curl -s https://api.github.com/repos/MicroPad/Micropad-Electron/releases/latest | jq --raw-output '.tag_name[1:]')
old_core_hash=$(nix-instantiate --eval --strict -A "micropad.micropad-core.drvAttrs.outputHash" | tr -d '"' | sed -re 's|[+]|\\&|g')
new_core_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack "https://github.com/MicroPad/MicroPad-Core/releases/download/v$latest_version/micropad.tar.xz"))
nixFile=$(nix-instantiate --eval --strict -A "micropad.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
nixFolder=$(dirname "$nixFile")
sed -i "$nixFile" -re "s|\"$old_core_hash\"|\"$new_core_hash\"|"
curl -o "$nixFolder/package.json" -s "https://raw.githubusercontent.com/MicroPad/MicroPad-Electron/v$latest_version/package.json"
curl -o "$nixFolder/yarn.lock" -s "https://raw.githubusercontent.com/MicroPad/MicroPad-Electron/v$latest_version/yarn.lock"
prettier --write "$nixFolder/package.json"
old_yarn_hash=$(nix-instantiate --eval --strict -A "micropad.offlineCache.outputHash" | tr -d '"' | sed -re 's|[+]|\\&|g')
new_yarn_hash=$(nix hash to-sri --type sha256 $(prefetch-yarn-deps "$nixFolder/yarn.lock"))
sed -i "$nixFile" -re "s|\"$old_yarn_hash\"|\"$new_yarn_hash\"|"
rm "$nixFolder/yarn.lock"
update-source-version micropad "$latest_version"
@@ -47,7 +47,7 @@ mkDerivationWith python3.pkgs.buildPythonApplication {
pyqtwebengine
pyzmq
requests
sip4
sip
];
strictDeps = true;
@@ -1,4 +1,19 @@
{ stdenv, lib, makeWrapper, coreutils, nix-prefetch-git, fetchurl, nodejs-slim, prefetch-yarn-deps, cacert, callPackage, nix }:
{
stdenv,
lib,
makeWrapper,
coreutils,
nix-prefetch-git,
fetchurl,
nodejs-slim,
prefetch-yarn-deps,
fixup-yarn-lock,
yarn,
makeSetupHook,
cacert,
callPackage,
nix,
}:
let
yarnpkg-lockfile-tar = fetchurl {
@@ -6,9 +21,9 @@ let
hash = "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==";
};
tests = callPackage ./tests {};
in {
tests = callPackage ./tests { };
in
{
prefetch-yarn-deps = stdenv.mkDerivation {
name = "prefetch-yarn-deps";
@@ -30,12 +45,20 @@ in {
patchShebangs $out/libexec
makeWrapper $out/libexec/index.js $out/bin/prefetch-yarn-deps \
--prefix PATH : ${lib.makeBinPath [ coreutils nix-prefetch-git nix ]}
--prefix PATH : ${
lib.makeBinPath [
coreutils
nix-prefetch-git
nix
]
}
runHook postInstall
'';
passthru = { inherit tests; };
passthru = {
inherit tests;
};
};
fixup-yarn-lock = stdenv.mkDerivation {
@@ -63,45 +86,93 @@ in {
runHook postInstall
'';
passthru = { inherit tests; };
passthru = {
inherit tests;
};
};
fetchYarnDeps = let
f = {
name ? "offline",
src ? null,
hash ? "",
sha256 ? "",
...
}@args: let
hash_ =
if hash != "" then { outputHashAlgo = null; outputHash = hash; }
else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
else { outputHashAlgo = "sha256"; outputHash = lib.fakeSha256; };
in stdenv.mkDerivation ({
inherit name;
fetchYarnDeps =
let
f =
{
name ? "offline",
src ? null,
hash ? "",
sha256 ? "",
...
}@args:
let
hash_ =
if hash != "" then
{
outputHashAlgo = null;
outputHash = hash;
}
else if sha256 != "" then
{
outputHashAlgo = "sha256";
outputHash = sha256;
}
else
{
outputHashAlgo = "sha256";
outputHash = lib.fakeSha256;
};
in
stdenv.mkDerivation (
{
inherit name;
dontUnpack = src == null;
dontInstall = true;
dontUnpack = src == null;
dontInstall = true;
nativeBuildInputs = [ prefetch-yarn-deps cacert ];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
nativeBuildInputs = [
prefetch-yarn-deps
cacert
];
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
runHook preBuild
buildPhase = ''
runHook preBuild
yarnLock=''${yarnLock:=$PWD/yarn.lock}
mkdir -p $out
(cd $out; prefetch-yarn-deps --verbose --builder $yarnLock)
yarnLock=''${yarnLock:=$PWD/yarn.lock}
mkdir -p $out
(cd $out; prefetch-yarn-deps --verbose --builder $yarnLock)
runHook postBuild
'';
runHook postBuild
'';
outputHashMode = "recursive";
} // hash_ // (removeAttrs args (["name" "hash" "sha256"] ++ (lib.optional (src == null) "src"))));
outputHashMode = "recursive";
}
// hash_
// (removeAttrs args (
[
"name"
"hash"
"sha256"
]
++ (lib.optional (src == null) "src")
))
);
in
lib.setFunctionArgs f (lib.functionArgs f) // { inherit tests; };
in lib.setFunctionArgs f (lib.functionArgs f) // {
inherit tests;
};
yarnConfigHook = makeSetupHook {
name = "yarn-config-hook";
propagatedBuildInputs = [
yarn
fixup-yarn-lock
];
meta = {
description = "Install nodejs dependencies from an offline yarn cache produced by fetchYarnDeps";
};
} ./yarn-config-hook.sh;
yarnBuildHook = makeSetupHook {
name = "yarn-build-hook";
meta = {
description = "Run yarn build in buildPhase";
};
} ./yarn-build-hook.sh;
}
@@ -12,6 +12,15 @@ const fixupYarnLock = async (lockContents, verbose) => {
const fixedData = Object.fromEntries(
Object.entries(lockData.object)
.map(([dep, pkg]) => {
if (pkg.resolved === undefined) {
console.warn(`no resolved URL for package ${dep}`)
var maybeFile = dep.split("@", 2)[1]
if (maybeFile.startsWith("file:")) {
console.log(`Rewriting URL for local file dependency ${dep}`)
pkg.resolved = maybeFile
}
return [dep, pkg]
}
const [ url, hash ] = pkg.resolved.split("#", 2)
if (hash || url.startsWith("https://codeload.github.com")) {
@@ -0,0 +1,24 @@
yarnBuildHook() {
runHook preBuild
echo "Executing yarnBuildHook"
if [ -z "${yarnBuildScript-}" ]; then
yarnBuildScript="build"
fi
if ! type node > /dev/null 2>&1 ; then
echo yarnConfigHook WARNING: a node interpreter was not added to the \
build, and is probably required to run \'yarn $yarnBuildHook\'. \
A common symptom of this is getting \'command not found\' errors \
for Nodejs related tools.
fi
yarn --offline "$yarnBuildScript" $yarnBuildFlags
echo "finished yarnBuildHook"
runHook postBuild
}
if [[ -z "${dontYarnBuild-}" && -z "${buildPhase-}" ]]; then
buildPhase=yarnBuildHook
fi
@@ -0,0 +1,37 @@
yarnConfigHook(){
runHook preConfigure
echo "Executing yarnConfigHook"
# Use a constant HOME directory
mkdir -p /tmp/home
export HOME=/tmp/home
if [[ -n "$yarnOfflineCache" ]]; then
offlineCache="$yarnOfflineCache"
fi
if [[ -z "$offlineCache" ]]; then
echo yarnConfigHook: No yarnOfflineCache or offlineCache were defined\! >&2
exit 2
fi
yarn config --offline set yarn-offline-mirror "$offlineCache"
fixup-yarn-lock yarn.lock
yarn install \
--frozen-lockfile \
--force \
--production=false \
--ignore-engines \
--ignore-platform \
--ignore-scripts \
--no-progress \
--non-interactive \
--offline
# TODO: Check if this is really needed
patchShebangs node_modules
echo "finished yarnConfigHook"
runHook postConfigure
}
if [[ -z "${dontYarnInstallDeps-}" && -z "${configurePhase-}" ]]; then
configurePhase=yarnConfigHook
fi
+10
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch2,
alsa-lib,
boost,
curl,
@@ -48,6 +49,15 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "sha256-IUvMfG4jtN/QXq4DQIDuI0+Bl3MSSwDGKOyjfcRWgvE=";
};
patches = [
# Fix build with miniupnpc 2.2.8
# https://github.com/Aleph-One-Marathon/alephone/pull/503
(fetchpatch2 {
url = "https://github.com/Aleph-One-Marathon/alephone/commit/e25c4bc1ac02619e811b8f19bf4c2f617550e124.patch?full_index=1";
hash = "sha256-BFLLSTjNl/+/kVb+t6EyW1jhAlKN/G+Q99TICV9VHOY=";
})
];
nativeBuildInputs = [
pkg-config
icoutils
+1 -1
View File
@@ -441,7 +441,7 @@ py.pkgs.toPythonApplication (
sourceProvenance = [ sourceTypes.fromSource ];
license = licenses.mit;
mainProgram = "az";
maintainers = with maintainers; [ katexochen ];
maintainers = with maintainers; [ katexochen ] ++ lib.teams.stridtech.members;
platforms = platforms.all;
};
}
+1 -1
View File
@@ -43,7 +43,7 @@ buildDotnetModule rec {
homepage = "https://github.com/Azure/bicep/";
changelog = "https://github.com/Azure/bicep/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ khaneliman ];
maintainers = with lib.maintainers; [ khaneliman ] ++ lib.teams.stridtech.members;
mainProgram = "bicep";
};
}
+2 -2
View File
@@ -3,7 +3,7 @@
, buildNpmPackage
, nodejs_20
, fetchFromGitHub
, python3
, python311
, darwin
, nixosTests
, xcbuild
@@ -25,7 +25,7 @@ buildNpmPackage rec {
npmDepsHash = "sha256-rwzyKaCW3LAOqw6BEu8DLS0Ad5hB6cH1OnjWzbSEgVI=";
nativeBuildInputs = [
python3
python311
] ++ lib.optionals stdenv.isDarwin [
darwin.cctools
xcbuild.xcrun
-118
View File
@@ -1,118 +0,0 @@
{
"name": "codefresh",
"version": "0.87.3",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
"scripts": {
"generate-completion": "node ./lib/interface/cli/completion/generate",
"test": "jest .spec.js --coverage",
"e2e": "bash e2e/e2e.spec.sh",
"eslint": "eslint --fix lib/logic/**",
"pkg": "pkg . -t node16-alpine-x64,node16-macos-x64,node16-linux-x64,node16-win-x64,node16-linux-arm64 --out-path ./dist",
"serve-docs": "yarn build-local-docs && cd temp && hugo server -D",
"serve-docs-beta": "ALLOW_BETA_COMMANDS=true yarn build-local-docs && cd temp && hugo server -D",
"build-local-docs": "node ./docs/index.js",
"build-public-docs": "node ./docs/index.js && cd temp && hugo",
"postinstall": "node run-check-version.js"
},
"bin": {
"codefresh": "lib/interface/cli/codefresh"
},
"repository": "git+https://github.com/codefresh-io/cli.git",
"keywords": [
"command line"
],
"pkg": {
"scripts": [
"lib/**/*.js",
"node_modules/codefresh-sdk/lib/**/*.js",
"node_modules/kubernetes-client/**/*.js"
],
"assets": "lib/**/*.hbs"
},
"resolutions": {
"websocket-extensions": "^0.1.4",
"lodash": "^4.17.21",
"json-schema": "^0.4.0",
"ajv": "^6.12.6",
"normalize-url": "^4.5.1",
"ansi-regex": "^5.0.1",
"y18n": "^4.0.1",
"shelljs": "^0.8.5",
"codefresh-sdk/swagger-client/qs": "6.9.7",
"kubernetes-client/qs": "6.9.7",
"**/request/qs": "6.5.3"
},
"dependencies": {
"@codefresh-io/docker-reference": "^0.0.5",
"adm-zip": "^0.5.5",
"ajv": "^6.12.6",
"bluebird": "^3.5.1",
"cf-errors": "^0.1.16",
"chalk": "^4.1.0",
"cli-progress": "3.10.0",
"codefresh-sdk": "^1.12.0",
"colors": "1.4.0",
"columnify": "^1.6.0",
"compare-versions": "^3.4.0",
"copy-dir": "^0.3.0",
"debug": "^3.1.0",
"diff": "^3.5.0",
"dockerode": "^2.5.7",
"draftlog": "^1.0.12",
"figlet": "^1.4.0",
"filesize": "^3.5.11",
"firebase": "git+https://github.com/codefresh-io/firebase.git#80b2ed883ff281cd67b53bd0f6a0bbd6f330fed5",
"flat": "^4.1.1",
"inquirer": "^7.1.0",
"js-yaml": "^3.10.0",
"kefir": "^3.8.1",
"kubernetes-client": "^9.0.0",
"lodash": "^4.17.21",
"mkdirp": "^0.5.1",
"moment": "^2.29.4",
"mongodb": "^4.17.2",
"node-forge": "^1.3.0",
"ora": "^5.4.1",
"prettyjson": "^1.2.5",
"promise-retry": "^2.0.1",
"recursive-readdir": "^2.2.3",
"request": "^2.88.0",
"request-promise": "^4.2.2",
"requestretry": "^7.0.2",
"rimraf": "^2.6.2",
"semver": "^7.5.4",
"tar-stream": "^2.2.0",
"uuid": "^3.1.0",
"yaml": "^1.10.0",
"yargs": "^15.4.1",
"yargs-parser": "^13.0.0",
"zip": "^1.2.0"
},
"devDependencies": {
"@types/node-forge": "^1.0.1",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^27.6.3",
"hugo-cli": "^0.5.4",
"jest": "^29.7.0",
"pkg": "5.5.2"
},
"bugs": {
"url": "https://github.com/codefresh-io/cli/issues"
},
"homepage": "https://github.com/codefresh-io/cli#readme",
"author": "Codefresh",
"license": "ISC",
"engines": {
"node": ">=14.0.0"
},
"jest": {
"testEnvironment": "node",
"setupFiles": [
"./test-setup.js"
]
}
}
+14 -10
View File
@@ -1,36 +1,40 @@
{ lib, mkYarnPackage, fetchFromGitHub, fetchYarnDeps, testers, codefresh }:
{ lib, stdenv, fetchFromGitHub, fetchYarnDeps, yarnConfigHook, npmHooks, nodejs, testers }:
mkYarnPackage rec {
stdenv.mkDerivation (finalAttrs: {
pname = "codefresh";
version = "0.87.3";
src = fetchFromGitHub {
owner = "codefresh-io";
repo = "cli";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-SUwt0oWls823EeLxT4CW+LDdsjAtSxxxKkllhMJXCtM=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-tzsHbvoQ59MwE4TYdPweLaAv9r4V8oyTQyvdeyPCsHY=";
};
packageJSON = ./package.json;
doDist = false;
nativeBuildInputs = [
yarnConfigHook
npmHooks.npmInstallHook
nodejs
];
# Tries to fetch stuff from the internet
dontNpmPrune = true;
passthru.tests.version = testers.testVersion {
package = codefresh;
package = finalAttrs.finalPackage;
# codefresh needs to read a config file, this is faked out with a subshell
command = "codefresh --cfconfig <(echo 'contexts:') version";
};
meta = {
changelog = "https://github.com/codefresh-io/cli/releases/tag/v${version}";
changelog = "https://github.com/codefresh-io/cli/releases/tag/v${finalAttrs.version}";
description = "Codefresh CLI tool to interact with Codefresh services";
homepage = "https://github.com/codefresh-io/cli";
license = lib.licenses.mit;
mainProgram = "codefresh";
maintainers = [ lib.maintainers.takac ];
};
}
})
-129
View File
@@ -1,129 +0,0 @@
{
"name": "element-call",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "NODE_OPTIONS=--max-old-space-size=16384 vite build",
"serve": "vite preview",
"prettier:check": "prettier -c .",
"prettier:format": "prettier -w .",
"lint": "yarn lint:types && yarn lint:eslint",
"lint:eslint": "eslint --max-warnings 0 src",
"lint:eslint-fix": "eslint --max-warnings 0 src --fix",
"lint:types": "tsc",
"i18n": "node_modules/i18next-parser/bin/cli.js",
"i18n:check": "node_modules/i18next-parser/bin/cli.js --fail-on-warnings --fail-on-update",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"backend": "docker-compose -f backend-docker-compose.yml up"
},
"dependencies": {
"@juggle/resize-observer": "^3.3.1",
"@livekit/components-core": "^0.10.0",
"@livekit/components-react": "^2.0.0",
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
"@opentelemetry/api": "^1.4.0",
"@opentelemetry/context-zone": "^1.9.1",
"@opentelemetry/exporter-jaeger": "^1.9.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.48.0",
"@opentelemetry/instrumentation-document-load": "^0.36.0",
"@opentelemetry/instrumentation-user-interaction": "^0.36.0",
"@opentelemetry/sdk-trace-web": "^1.9.1",
"@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-slider": "^1.1.2",
"@radix-ui/react-visually-hidden": "^1.0.3",
"@react-aria/button": "^3.3.4",
"@react-aria/focus": "^3.5.0",
"@react-aria/menu": "^3.3.0",
"@react-aria/overlays": "^3.7.3",
"@react-aria/select": "^3.6.0",
"@react-aria/tabs": "^3.1.0",
"@react-aria/tooltip": "^3.1.3",
"@react-aria/utils": "^3.10.0",
"@react-rxjs/core": "^0.10.7",
"@react-spring/web": "^9.4.4",
"@react-stately/collections": "^3.3.4",
"@react-stately/select": "^3.1.3",
"@react-stately/tooltip": "^3.0.5",
"@react-stately/tree": "^3.2.0",
"@sentry/react": "^7.0.0",
"@sentry/tracing": "^7.0.0",
"@types/lodash": "^4.14.199",
"@use-gesture/react": "^10.2.11",
"@vector-im/compound-design-tokens": "^1.0.0",
"@vector-im/compound-web": "^3.0.0",
"@vitejs/plugin-basic-ssl": "^1.0.1",
"@vitejs/plugin-react": "^4.0.1",
"buffer": "^6.0.3",
"classnames": "^2.3.1",
"events": "^3.3.0",
"i18next": "^23.0.0",
"i18next-browser-languagedetector": "^7.0.0",
"i18next-http-backend": "^2.0.0",
"livekit-client": "^2.0.2",
"lodash": "^4.17.21",
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#d55c6a36df539f6adacc335efe5b9be27c9cee4a",
"matrix-widget-api": "^1.3.1",
"normalize.css": "^8.0.1",
"pako": "^2.0.4",
"postcss-preset-env": "^9.0.0",
"posthog-js": "^1.29.0",
"react": "18",
"react-dom": "18",
"react-i18next": "^14.0.0",
"react-router-dom": "^5.2.0",
"react-use-clipboard": "^1.0.7",
"react-use-measure": "^2.1.1",
"rxjs": "^7.8.1",
"sdp-transform": "^2.14.1",
"tinyqueue": "^2.0.3",
"unique-names-generator": "^4.6.0",
"uuid": "9",
"vaul": "^0.9.0"
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/preset-env": "^7.22.20",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.23.0",
"@react-spring/rafz": "^9.7.3",
"@react-types/dialog": "^3.5.5",
"@sentry/vite-plugin": "^2.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.1",
"@types/content-type": "^1.1.5",
"@types/dom-screen-wake-lock": "^1.0.1",
"@types/dompurify": "^3.0.2",
"@types/grecaptcha": "^3.0.4",
"@types/node": "^20.0.0",
"@types/react-router-dom": "^5.3.3",
"@types/request": "^2.48.8",
"@types/sdp-transform": "^2.4.5",
"@types/uuid": "9",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"babel-loader": "^9.0.0",
"babel-plugin-transform-vite-meta-env": "^1.0.3",
"eslint": "^8.14.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-deprecate": "^0.8.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-matrix-org": "^1.2.1",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-unicorn": "^51.0.0",
"i18next-parser": "^8.0.0",
"jsdom": "^24.0.0",
"prettier": "^3.0.0",
"sass": "^1.42.1",
"typescript": "^5.1.6",
"typescript-eslint-language-service": "^5.0.5",
"vite": "^5.0.0",
"vite-plugin-html-template": "^1.1.0",
"vite-plugin-svgr": "^4.0.0",
"vitest": "^1.2.2"
}
}
+17 -19
View File
@@ -1,8 +1,11 @@
{ lib
, stdenv
, mkYarnPackage
, fetchFromGitHub
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, npmHooks
}:
let
@@ -15,38 +18,33 @@ let
aarch64-darwin = "sha256-G4doEnZORJqcl3bWaKZPuQmBeXNXud06nLO12Afr9kM=";
}.${system} or throwSystem;
in
mkYarnPackage rec {
stdenv.mkDerivation (finalAttrs: {
pname = "element-call";
version = "0.5.16";
src = fetchFromGitHub {
owner = "element-hq";
repo = "element-call";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-GTHM27i716RZk+kDELMg/lYy355/SZoQLXGPQ90M4xg=";
};
packageJSON = ./package.json;
patches = [ ./name.patch ];
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = offlineCacheHash;
};
buildPhase = ''
runHook preBuild
yarn --offline run build
runHook postBuild
'';
preInstall = ''
mkdir $out
cp -R ./deps/element-call/dist $out
'';
doDist = false;
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
npmHooks.npmInstallHook
];
# From some reason causes the build to fail due to dependencies not available
# offline
dontNpmPrune = true;
meta = with lib; {
homepage = "https://github.com/element-hq/element-call";
@@ -55,4 +53,4 @@ mkYarnPackage rec {
maintainers = with maintainers; [ kilimnik ];
mainProgram = "element-call";
};
}
})
+1 -1
View File
@@ -36,7 +36,7 @@ python3Packages.buildPythonApplication rec {
dependencies = with python3Packages; [
pygobject3
f3d
f3d_egl
];
dontWrapGApps = true;
+18
View File
@@ -0,0 +1,18 @@
{
cmake,
lib,
ninja,
stdenv,
}:
stdenv.mkDerivation {
name = "hello-cpp";
src = ./src;
nativeBuildInputs = [ cmake ninja ];
meta = {
description = "Basic sanity check that C++ and cmake infrastructure are working";
platforms = lib.platforms.all;
maintainers = stdenv.meta.maintainers or [];
mainProgram = "hello-cpp";
};
}
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.10)
project(hello-cpp)
add_executable(hello-cpp main.cpp)
install(TARGETS hello-cpp)
+6
View File
@@ -0,0 +1,6 @@
#include <iostream>
int main(int argc, char *argv[]) {
std::cout << "Hello, C++\n";
return 0;
}
-312
View File
@@ -1,312 +0,0 @@
{
"name": "koodo-reader",
"main": "main.js",
"version": "1.6.6",
"description": "A cross-platform ebook reader",
"author": {
"name": "App by Troye",
"email": "support@960960.xyz"
},
"engines": {
"node": ">=18.0.0",
"npm": ">=6.0.0"
},
"repository": "https://github.com/koodo-reader/koodo-reader",
"private": false,
"resolutions": {
"//": "See https://github.com/facebook/create-react-app/issues/11773",
"react-error-overlay": "6.0.9"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.485.0",
"adm-zip": "^0.5.2",
"axios": "^0.19.2",
"buffer": "^6.0.3",
"copy-text-to-clipboard": "^2.2.0",
"dompurify": "^3.0.1",
"electron-is-dev": "^1.1.0",
"electron-store": "^8.0.1",
"font-list": "^1.4.5",
"fs-extra": "^9.1.0",
"ftp": "^0.3.10",
"howler": "^2.2.3",
"iconv-lite": "^0.6.3",
"qs": "^6.11.2",
"react-hot-toast": "^2.1.1",
"react-tooltip": "^5.26.3",
"ssh2-sftp-client": "^9.1.0",
"webdav": "^3.6.2",
"wink-lemmatizer": "^3.0.4",
"ws": "^8.13.0",
"zip-a-folder": "^0.0.12"
},
"devDependencies": {
"@types/i18next": "^13.0.0",
"@types/iconv-lite": "^0.0.1",
"@types/node": "^13.13.2",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
"@types/react-i18next": "^8.1.0",
"@types/react-lottie": "^1.2.5",
"@types/react-redux": "^7.1.7",
"@types/react-router-dom": "^5.1.6",
"@types/spark-md5": "^3.0.2",
"@types/ws": "^8.5.5",
"classnames": "^2.2.6",
"concurrently": "^5.0.1",
"cross-env": "^6.0.3",
"electron": "14.1.1",
"electron-builder": "^23.6.0",
"hard-source-webpack-plugin": "^0.13.1",
"html-react-parser": "^0.13.0",
"i18next": "^20.2.4",
"node-sass": "^9.0.0",
"nodemon": "^2.0.6",
"rc-color-picker": "^1.2.6",
"react": "^17.0.2",
"react-device-detect": "^1.12.1",
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.0",
"react-i18next": "^13.2.2",
"react-lottie": "^1.2.3",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^5.0.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"sass-loader": "^13.3.2",
"source-map-explorer": "^2.5.2",
"spark-md5": "^3.0.1",
"typescript": "3.8.3",
"wait-on": "^7.0.1"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"ele": "electron .",
"dev": "concurrently \"cross-env BROWSER=none npm start\" \"wait-on http://127.0.0.1:3000/ && nodemon --watch main.js --exec electron .\"",
"release": "electron-builder",
"prerelease": "react-scripts build"
},
"homepage": "./",
"build": {
"appId": "xyz.960960.koodo",
"productName": "Koodo Reader",
"copyright": "Copyright (c) 2021-2022 ${author}",
"files": [
"build/**/*",
"node_modules/**/*",
"package.json",
"main.js",
"edge-tts.js"
],
"directories": {
"buildResources": "assets"
},
"publish": {
"provider": "github",
"repo": "koodo-reader",
"owner": "koodo-reader"
},
"buildDependenciesFromSource": false,
"nodeGypRebuild": false,
"fileAssociations": [
{
"ext": "epub",
"icon": "assets/icons/epub",
"role": "Viewer",
"mimeType": "application/epub+zip"
},
{
"ext": "pdf",
"icon": "assets/icons/pdf",
"role": "Viewer",
"mimeType": "application/pdf"
},
{
"ext": "mobi",
"icon": "assets/icons/mobi",
"role": "Viewer",
"mimeType": "application/x-mobipocket-ebook"
},
{
"ext": "azw3",
"icon": "assets/icons/azw3",
"role": "Viewer",
"mimeType": "application/vnd.amazon.ebook"
},
{
"ext": "azw",
"icon": "assets/icons/azw3",
"role": "Viewer",
"mimeType": "application/vnd.amazon.ebook"
},
{
"ext": "cbz",
"icon": "assets/icons/comic",
"role": "Viewer",
"mimeType": "application/x-cbz"
},
{
"ext": "cbr",
"icon": "assets/icons/comic",
"role": "Viewer",
"mimeType": "application/x-cbr"
},
{
"ext": "cbt",
"icon": "assets/icons/comic",
"role": "Viewer",
"mimeType": "application/x-cbt"
},
{
"ext": "cb7",
"icon": "assets/icons/comic",
"role": "Viewer",
"mimeType": "application/x-cb7"
},
{
"ext": "fb2",
"icon": "assets/icons/fb2",
"role": "Viewer",
"mimeType": "application/x-fictionbook+xml"
}
],
"extends": null,
"dmg": {
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"mac": {
"target": [
{
"target": "dmg",
"arch": [
"x64",
"arm64"
]
}
],
"icon": "assets/icons/icon.icns",
"category": "public.app-category.productivity",
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
},
{
"target": "zip",
"arch": [
"x64",
"ia32",
"arm64"
]
},
{
"target": "portable",
"arch": [
"x64"
]
}
],
"icon": "assets/icons/icon.ico",
"artifactName": "${productName}-${version}-${arch}-Win.${ext}",
"publisherName": "App by Troye"
},
"linux": {
"icon": "assets/icons",
"category": "Office",
"target": [
{
"target": "snap",
"arch": [
"x64"
]
},
{
"target": "deb",
"arch": [
"arm64",
"ia32",
"x64"
]
},
{
"target": "rpm",
"arch": [
"x64"
]
},
{
"target": "AppImage",
"arch": [
"arm64",
"ia32",
"x64"
]
}
],
"artifactName": "${productName}-${version}-${arch}.${ext}"
},
"portable": {
"artifactName": "${productName}-${version}-Portable.${ext}"
},
"nsis": {
"artifactName": "${productName}-${version}.${ext}",
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"include": "assets/windows/installer.nsh"
},
"snap": {
"publish": [
{
"provider": "github"
}
]
}
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"babel": {
"presets": [
"react-app"
],
"plugins": [
[
"react-hot-loader/babel"
]
]
}
}
+19 -39
View File
@@ -1,10 +1,11 @@
{
lib,
stdenv,
mkYarnPackage,
fetchFromGitHub,
applyPatches,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
nodejs,
makeDesktopItem,
copyDesktopItems,
makeWrapper,
@@ -15,31 +16,28 @@
let
electronDist = electron + (if stdenv.isDarwin then "/Applications" else "/libexec/electron");
in
mkYarnPackage rec {
stdenv.mkDerivation (finalAttrs: {
pname = "koodo-reader";
version = "1.6.6";
version = "1.6.7";
src = applyPatches {
src = fetchFromGitHub {
owner = "troyeguo";
repo = "koodo-reader";
rev = "v${version}";
hash = "sha256-g2bVm8LFeEIPaWlaxzMI0SrpM+79zQFzJ7Vs5CbWBT4=";
};
patches = [ ./update-react-i18next.patch ]; # Could be upstreamed
src = fetchFromGitHub {
owner = "troyeguo";
repo = "koodo-reader";
rev = "v${finalAttrs.version}";
hash = "sha256-ZHRU8dJjKQFLIB1t2VK/COy6a3nShUeWR8iAM9YJdto=";
};
# should be copied from `koodo-reader.src`
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-VvYkotVb74zR9+/IWiQwOX/6RJf+xukpi7okRovfVzc=";
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-58mxYt2wD6SGzhvo9c44CPmdX+/tLnbJCMPafo4txbY=";
};
nativeBuildInputs =
[
makeWrapper
yarnConfigHook
yarnBuildHook
nodejs
]
++ lib.optionals (!stdenv.isDarwin) [
copyDesktopItems
@@ -53,28 +51,12 @@ mkYarnPackage rec {
# disable code signing on Darwin
env.CSC_IDENTITY_AUTO_DISCOVERY = "false";
configurePhase = ''
runHook preConfigure
cp -r $node_modules node_modules
chmod +w node_modules
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
yarn --offline build
postBuild = ''
cp -r ${electronDist} electron-dist
chmod -R u+w electron-dist
yarn --offline run electron-builder --dir \
-c.electronDist=electron-dist \
-c.electronVersion=${electron.version}
runHook postBuild
'';
installPhase = ''
@@ -107,15 +89,13 @@ mkYarnPackage rec {
--inherit-argv0
'';
doDist = false;
desktopItems = [
(makeDesktopItem {
name = "koodo-reader";
desktopName = "Koodo Reader";
exec = "koodo-reader %U";
icon = "koodo-reader";
comment = meta.description;
comment = finalAttrs.meta.description;
categories = [ "Office" ];
mimeTypes = [
"application/epub+zip"
@@ -136,7 +116,7 @@ mkYarnPackage rec {
];
meta = {
changelog = "https://github.com/troyeguo/koodo-reader/releases/tag/v${version}";
changelog = "https://github.com/troyeguo/koodo-reader/releases/tag/v${finalAttrs.version}";
description = "A cross-platform ebook reader";
longDescription = ''
A modern ebook manager and reader with sync and backup capacities
@@ -148,4 +128,4 @@ mkYarnPackage rec {
maintainers = with lib.maintainers; [ tomasajt ];
platforms = electron.meta.platforms;
};
}
})
@@ -1,58 +0,0 @@
diff --git a/package.json b/package.json
index c71b04a1..a4b4b3ef 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,7 @@
"react-device-detect": "^1.12.1",
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.0",
- "react-i18next": "^11.8.15",
+ "react-i18next": "^13.2.2",
"react-lottie": "^1.2.3",
"react-redux": "^7.2.0",
"react-router-dom": "^5.2.0",
diff --git a/yarn.lock b/yarn.lock
index 881db5b2..2df4d362 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1828,7 +1828,7 @@
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
-"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
+"@babel/runtime@^7.1.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673"
integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==
@@ -1842,6 +1842,13 @@
dependencies:
regenerator-runtime "^0.14.0"
+"@babel/runtime@^7.22.5":
+ version "7.23.1"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.1.tgz#72741dc4d413338a91dcb044a86f3c0bc402646d"
+ integrity sha512-hC2v6p8ZSI/W0HUzh3V8C5g+NwSKzKPtJwSpTjwl0o297GP9+ZLQSkdvHz46CM3LqyoXxq+5G9komY+eSqSO0g==
+ dependencies:
+ regenerator-runtime "^0.14.0"
+
"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.3.3":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8"
@@ -10951,12 +10958,12 @@ react-i18next@*:
"@babel/runtime" "^7.20.6"
html-parse-stringify "^3.0.1"
-react-i18next@^11.8.15:
- version "11.18.6"
- resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.18.6.tgz#e159c2960c718c1314f1e8fcaa282d1c8b167887"
- integrity sha512-yHb2F9BiT0lqoQDt8loZ5gWP331GwctHz9tYQ8A2EIEUu+CcEdjBLQWli1USG3RdWQt3W+jqQLg/d4rrQR96LA==
+react-i18next@^13.2.2:
+ version "13.2.2"
+ resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-13.2.2.tgz#b1e78ed66a54f4bc819616f68b98221e1b1a1936"
+ integrity sha512-+nFUkbRByFwnrfDcYqvzBuaeZb+nACHx+fAWN/pZMddWOCJH5hoc21+Sa/N/Lqi6ne6/9wC/qRGOoQhJa6IkEQ==
dependencies:
- "@babel/runtime" "^7.14.5"
+ "@babel/runtime" "^7.22.5"
html-parse-stringify "^3.0.1"
react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0:
+11 -14
View File
@@ -1,37 +1,34 @@
{ mkYarnPackage
{ stdenv
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, meta
, version
, src
}:
mkYarnPackage {
stdenv.mkDerivation (finalAttrs: {
pname = "listmonk-frontend";
inherit version;
src = "${src}/frontend";
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/frontend/yarn.lock";
hash = "sha256-TdrglyRtb2Q8SFtoiCoDj/zBV2+7DwzIm/Fzlt0ZvSo=";
};
configurePhase = ''
ln -s $node_modules node_modules
'';
buildPhase = ''
yarn --offline build
'';
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
installPhase = ''
mkdir $out
cp -R dist/* $out
'';
doDist = false;
inherit meta;
}
})
-45
View File
@@ -1,45 +0,0 @@
{
"name": "listmonk",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore src",
"prebuild": "eslint --ext .js,.vue --ignore-path .gitignore src"
},
"dependencies": {
"@tinymce/tinymce-vue": "^3",
"axios": "^1.6.2",
"buefy": "^0.9.25",
"bulma": "^0.9.4",
"chart.js": "^4.4.1",
"codeflask": "^1.4.1",
"dayjs": "^1.11.10",
"indent.js": "^0.3.5",
"qs": "^6.10.1",
"textversionjs": "^1.1.3",
"tinymce": "^5.10.9",
"turndown": "^7.1.2",
"vue": "^2.7.14",
"vue-chartjs": "^5.3.0",
"vue-i18n": "^8.28.2",
"vue-router": "^3.2.0",
"vuex": "^3.6.2"
},
"devDependencies": {
"@vitejs/plugin-vue2": "^2.3.1",
"@vue/eslint-config-airbnb": "^7.0.1",
"cypress": "13.6.1",
"cypress-file-upload": "^5.0.2",
"eslint": "^8.56.0",
"eslint-define-config": "^2.0.0",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-vue": "^9.19.2",
"sass": "^1.34.0",
"vite": "^5.0.12",
"vue-eslint-parser": "^9.3.2",
"vue-template-compiler": "^2.6.12"
}
}
@@ -90,7 +90,7 @@ let
++ lib.optionals mediaSupport [ ffmpeg ]
);
version = "13.5";
version = "13.5.1";
sources = {
x86_64-linux = fetchurl {
@@ -102,7 +102,7 @@ let
"https://tor.eff.org/dist/mullvadbrowser/${version}/mullvad-browser-linux-x86_64-${version}.tar.xz"
"https://tor.calyxinstitute.org/dist/mullvadbrowser/${version}/mullvad-browser-linux-x86_64-${version}.tar.xz"
];
hash = "sha256-Wz1gYK1CqfK4aa7K2PR8wKx7VcvALquYKA2vetUAdeU=";
hash = "sha256-YUITJ7YyK+210ASH1zxlILJ10r0L6SJjbiw2UVASCbw=";
};
};
@@ -255,7 +255,7 @@ stdenv.mkDerivation rec {
passthru = {
inherit sources;
updateScript = callPackage ../tor-browser/update.nix {
updateScript = callPackage ./update.nix {
inherit pname version meta;
baseUrl = "https://cdn.mullvad.net/browser/";
name = "mullvad-browser";
+12 -12
View File
@@ -1,28 +1,28 @@
{ lib
, buildGoModule
, fetchFromGitHub
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "nc4nix";
version = "0-unstable-2024-03-01";
version = "0-unstable-2024-05-24";
src = fetchFromGitHub {
owner = "helsinki-systems";
repo = "nc4nix";
rev = "ba37674c0dddf93e0a011dace92ec7f0ec834765";
hash = "sha256-k12eeP2gojLCsJH1GGuiTmxz3ViPc0+oFBuptyh42Bw=";
rev = "9d605367d0d952de9d022155e8df28e6793ff104";
hash = "sha256-QAtN4fcbsX0e6DIchOjxpHDDmIt7SGiN8riLplqXIYs=";
};
vendorHash = "sha256-ZXl4kMDY9ADkHUcLsl3uNpyErMzbgS+J65+uUeIXpSE=";
vendorHash = "sha256-qntRsv3KvAbV3lENjAHKkQOqh3uTo3gacfwase489tQ=";
meta = with lib; {
meta = {
description = "Packaging helper for Nextcloud apps";
mainProgram = "nc4nix";
homepage = "https://github.com/helsinki-systems/nc4nix";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
platforms = platforms.linux;
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ onny ];
platforms = lib.platforms.linux;
};
}
+3 -3
View File
@@ -9,15 +9,15 @@
rustPlatform.buildRustPackage rec {
pname = "nix-health";
version = "0.3.0";
version = "0.4.0";
src = fetchCrate {
inherit version;
pname = "nix_health";
hash = "sha256-u5ipQnux/ulllfPFyUdeLj7gAf3Vu7KL2Q4uYxtv1q4=";
hash = "sha256-/I6LdcH61wgJOEv51J1jkWlD8BlSAaRR1e7gc5H9bQI=";
};
cargoHash = "sha256-oTO9V+zGmMgDXrt6w1fB81b+WmK3MRI/eCTNEuVM0hk=";
cargoHash = "sha256-mqJA5Fv/sYj6ZkE73emtaHvg9hdT/5lN0kM3sl+GRCo=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libiconv openssl ]
@@ -0,0 +1,38 @@
{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication {
pname = "ntlm-challenger";
version = "0-unstable-2022-11-10";
format = "other";
src = fetchFromGitHub {
owner = "nopfor";
repo = "ntlm_challenger";
rev = "bd61ef65c7692fb1968383894da662bf99026aec";
hash = "sha256-F9aZB8M25gPDY7J7cXkAH30m7zmk4NHczUHyBDBZInA=";
};
propagatedBuildInputs = with python3.pkgs; [
requests
impacket
];
installPhase = ''
runHook preInstall
install -D ntlm_challenger.py $out/bin/ntlm_challenger
runHook postInstall
'';
meta = with lib; {
description = "Parse NTLM challenge messages over HTTP and SMB";
mainProgram = "ntlm_challenger";
homepage = "https://github.com/nopfor/ntlm_challenger";
license = licenses.mit;
maintainers = [ maintainers.crem ];
};
}
@@ -1,165 +0,0 @@
{
"name": "@postlight/parser",
"version": "2.2.3",
"description": "Postlight Parser transforms web pages into clean text. Publishers and programmers use it to make the web make sense, and readers use it to read any web article comfortably.",
"author": "Postlight <mercury@postlight.com>",
"homepage": "https://reader.postlight.com",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/postlight/parser.git"
},
"bugs": {
"url": "https://github.com/postlight/parser/issues"
},
"keywords": [
"mercury",
"parser",
"reader",
"web",
"content"
],
"files": [
"dist",
"cli.js",
"src/shims/"
],
"main": "./dist/mercury.js",
"bin": {
"mercury-parser": "./cli.js",
"postlight-parser": "./cli.js"
},
"scripts": {
"lint": "eslint . --fix",
"lint:ci": "remark . && eslint .",
"lint-fix-quiet": "eslint --fix --quiet",
"build": "yarn lint && rollup -c && yarn test:build",
"build:ci": "rollup -c && yarn test:build",
"build:web": "yarn lint && rollup -c rollup.config.web.js && yarn test:build:web",
"build:esm": "yarn lint && rollup -c rollup.config.esm.js && yarn test:build:esm",
"build:esm:ci": "rollup -c rollup.config.esm.js && yarn test:build:esm",
"build:web:ci": "rollup -c rollup.config.web.js && yarn test:build:web",
"release": "yarn build && yarn build:web",
"build:generator": "rollup -c scripts/rollup.config.js",
"test_build": "rollup -c",
"test": "yarn test:node && yarn test:web",
"test:node": "jest --json --outputFile test-output.json",
"test:web": "node ./node_modules/karma/bin/karma start karma.conf.js --auto-watch",
"test:build": "cd ./scripts && jest check-build.test.js",
"test:build:web": "node ./scripts/proxy-browser-test.js",
"test:build:esm": "node ./scripts/proxy-browser-test.js",
"watch:test": "jest --watch",
"generate-parser": "node ./dist/generate-custom-parser.js"
},
"engines": {
"node": ">=10"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@jesses/circle-github-bot": "^2.1.0",
"@octokit/rest": "^16.9.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.4.2",
"babel-plugin-module-alias": "^1.6.0",
"babel-plugin-module-resolver": "^3.1.2",
"babelify": "^10.0.0",
"babelrc-rollup": "^3.0.0",
"brfs": "^2.0.1",
"brfs-babel": "^2.0.0",
"browserify": "^16.2.3",
"changelog-maker": "^2.3.0",
"eslint": "^5.12.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^6.1.0",
"eslint-import-resolver-babel-module": "^2.2.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.12.3",
"express": "^4.16.4",
"husky": "^3.0.0",
"inquirer": "^7.0.0",
"jasmine-core": "^2.5.2",
"jest": "^23.6.0",
"jest-cli": "^23.6.0",
"karma": "^6.3.16",
"karma-browserify": "8.1.0",
"karma-chrome-launcher": "^3.0.0",
"karma-cli": "^2.0.0",
"karma-jasmine": "^1.0.2",
"karma-mocha": "^1.3.0",
"karma-requirejs": "^1.1.0",
"lint-staged": "^8.1.0",
"mocha": "^6.0.0",
"nock": "^10.0.6",
"ora": "^4.0.0",
"prettier": "^1.15.3",
"remark-cli": "^7.0.0",
"remark-lint": "^6.0.4",
"remark-preset-lint-recommended": "^3.0.2",
"request": "^2.88.2",
"requirejs": "^2.3.6",
"rollup": "^1.1.0",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-uglify": "^6.0.1",
"watchify": "^3.11.1"
},
"dependencies": {
"@babel/runtime-corejs2": "^7.2.0",
"@postlight/ci-failed-test-reporter": "^1.0",
"browser-request": "github:postlight/browser-request#feat-add-headers-to-response",
"cheerio": "^0.22.0",
"difflib": "github:postlight/difflib.js",
"ellipsize": "0.1.0",
"iconv-lite": "0.5.0",
"jquery": "^3.5.0",
"moment": "^2.23.0",
"moment-parseformat": "3.0.0",
"moment-timezone": "0.5.37",
"postman-request": "^2.88.1-postman.31",
"string-direction": "^0.1.2",
"turndown": "^7.1.1",
"valid-url": "^1.0.9",
"wuzzy": "^0.1.4",
"yargs-parser": "^15.0.1"
},
"bundleDependencies": [
"jquery",
"moment-timezone",
"browser-request"
],
"browser": {
"main": "./dist/mercury.web.js",
"cheerio": "./src/shims/cheerio-query",
"jquery": "./node_modules/jquery/dist/jquery.min.js",
"postman-request": "browser-request",
"iconv-lite": "./src/shims/iconv-lite",
"moment-timezone": "./node_modules/moment-timezone/builds/moment-timezone-with-data-2012-2022.min.js"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"prettier --write",
"git add"
],
"*.{json,css,md}": [
"remark .",
"prettier --write",
"git add"
]
}
}
+30 -13
View File
@@ -1,36 +1,53 @@
{ lib
, stdenv
, mkYarnPackage
, fetchFromGitHub
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, npmHooks
}:
mkYarnPackage rec {
stdenv.mkDerivation (finalAttrs: {
pname = "postlight-parser";
version = "2.2.3";
src = fetchFromGitHub {
owner = "postlight";
repo = "parser";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-k6m95FHeJ+iiWSeY++1zds/bo1RtNXbnv2spaY/M+L0=";
};
packageJSON = ./package.json;
doDist = false;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-Vs8bfkhEbPv33ew//HBeDnpQcyWveByHi1gUsdl2CNI=";
};
meta = with lib; {
changelog = "https://github.com/postlight/parser/blob/${src.rev}/CHANGELOG.md";
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
npmHooks.npmInstallHook
];
# Upstream doesn't include a script in package.json that only builds without
# testing, and tests fail because they need to access online websites. Hence
# we use the builtin interface of yarnBuildHook to lint, and in `postBuild`
# we run the rest of commands needed to create the js files eventually
# distributed and wrapped by npmHooks.npmInstallHook
yarnBuildScript = "lint";
postBuild = ''
yarn --offline run rollup -c
'';
# Tries to download stuff from the internet in this phase.
dontNpmPrune = true;
meta = {
changelog = "https://github.com/postlight/parser/blob/${finalAttrs.src.rev}/CHANGELOG.md";
homepage = "https://reader.postlight.com";
description = "Extracts the bits that humans care about from any URL you give it";
license = licenses.mit;
maintainers = with maintainers; [ viraptor ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ viraptor ];
mainProgram = "postlight-parser";
};
}
})
+55
View File
@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
libevent,
file,
qrencode,
openssl,
miniupnpc,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pshs";
version = "0.4.3";
src = fetchFromGitHub {
owner = "projg2";
repo = "pshs";
rev = "v${finalAttrs.version}";
hash = "sha256-sfhhxeQa0rmBerfAemuHou0N001Zq5Hh7s7utxLQHOI=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
libevent
file
qrencode
openssl
miniupnpc
];
strictDeps = true;
__structuredAttrs = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Pretty small HTTP server - a command-line tool to share files";
mainProgram = "pshs";
homepage = "https://github.com/mgorny/pshs";
sourceProvenance = [ lib.sourceTypes.fromSource ];
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.unix;
};
})
+88
View File
@@ -0,0 +1,88 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchpatch2,
autoreconfHook,
ncurses,
SDL,
gpm,
miniupnpc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qodem";
version = "1.0.1-unstable-2022-02-12";
src = fetchFromGitLab {
owner = "AutumnMeowMeow";
repo = "qodem";
rev = "69cc7458ef23243f790348a4cc503a8173008e55";
hash = "sha256-Ocb2inuxeDOfqge+h7pHL9I9Kn72Mgi8Eq179/58alk=";
};
patches = [
# Fix ICH with count>1
# https://gitlab.com/AutumnMeowMeow/qodem/-/issues/77
(fetchpatch2 {
url = "https://gitlab.com/-/project/6684464/uploads/c2ceaef82d483c13ff9ec64424f3c40a/0001-Fix-ICH-with-count-1.patch";
hash = "sha256-lCqj4p8onUS4pehQMXS6lbC7JH5dP6sOjDALpasgd2M=";
})
# Don't clear line rendition on partial ED
# https://gitlab.com/AutumnMeowMeow/qodem/-/issues/78
(fetchpatch2 {
url = "https://gitlab.com/-/project/6684464/uploads/462c0b1cf05c3fc2857ce982e62fefcc/0001-Don-t-clear-line-rendition-on-partial-ED.patch";
hash = "sha256-lSuxP0tUfGa3BjK3ehpdMi16XaGZrdVvAcM2vnjAme8=";
})
# DECCOLM should clear line rendition attributes
# https://gitlab.com/AutumnMeowMeow/qodem/-/issues/78
(fetchpatch2 {
url = "https://gitlab.com/-/project/6684464/uploads/812bdfdfaee44eed346fcff85f53efbe/0002-DECCOLM-should-clear-line-rendition-attributes.patch";
hash = "sha256-XO+h5fpBTLLYC3t4FRCy1uFiMkmSXbre4T2NB/FC3uQ=";
})
# Fix build with miniupnpc 2.2.8
./qodem-fix-miniupnpc-2.2.8.patch
];
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
ncurses
SDL
miniupnpc
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform gpm) [
gpm
];
configureFlags = lib.optionals (!(lib.meta.availableOn stdenv.hostPlatform gpm)) [
"--disable-gpm"
];
strictDeps = true;
enableParallelBuilding = true;
__structuredAttrs = true;
meta = {
homepage = "https://qodem.sourceforge.net/";
description = "Re-implementation of the DOS-era Qmodem serial communications package";
longDescription = ''
Qodem is a from-scratch clone implementation of the Qmodem
communications program made popular in the days when Bulletin Board
Systems ruled the night. Qodem emulates the dialing directory and the
terminal screen features of Qmodem over both modem and Internet
connections.
'';
changelog = "${finalAttrs.src.meta.homepage}-/blob/${finalAttrs.src.rev}/ChangeLog";
maintainers = with lib.maintainers; [ embr ];
sourceProvenance = [ lib.sourceTypes.fromSource ];
license = lib.licenses.publicDomain;
platforms = lib.platforms.unix;
};
})
@@ -0,0 +1,55 @@
diff --git a/source/netclient.c b/source/netclient.c
index 6b6f99ec9b...88d4b91077 100644
--- a/source/netclient.c
+++ b/source/netclient.c
@@ -496,7 +496,7 @@
*/
device_list = upnpDiscover(2000, NULL, NULL, 0, 0, 2, NULL);
# else
-# if (MINIUPNPC_API_VERSION == 17)
+# if (MINIUPNPC_API_VERSION >= 17)
/*
* Version 17
*
@@ -516,8 +516,13 @@
if (device_list != NULL) {
+#if (MINIUPNPC_API_VERSION <= 17) || !defined(MINIUPNPC_API_VERSION)
rc = UPNP_GetValidIGD(device_list, &upnp_urls, &upnp_igd_datas,
local_host, sizeof(local_host));
+#else
+ rc = UPNP_GetValidIGD(device_list, &upnp_urls, &upnp_igd_datas,
+ local_host, sizeof(local_host), NULL, 0);
+#endif
switch (rc) {
@@ -525,13 +530,27 @@
DLOG(("Found valid IGD : %s\n", upnp_urls.controlURL));
break;
+#if (MINIUPNPC_API_VERSION >= 18)
case 2:
+ DLOG(("Found a (reserved?) IGD : %s\n", upnp_urls.controlURL));
+ DLOG(("Trying to continue anyway\n"));
+ break;
+#endif
+#if (MINIUPNPC_API_VERSION <= 17) || !defined(MINIUPNPC_API_VERSION)
+ case 2:
+#else
+ case 3:
+#endif
DLOG(("Found a (not connected?) IGD : %s\n", upnp_urls.controlURL));
DLOG(("Trying to continue anyway\n"));
break;
+#if (MINIUPNPC_API_VERSION <= 17) || !defined(MINIUPNPC_API_VERSION)
case 3:
+#else
+ case 4:
+#endif
DLOG(("UPnP device found. Is it an IGD ? : %s\n",
upnp_urls.controlURL));
DLOG(("Trying to continue anyway\n"));
+2 -2
View File
@@ -7,13 +7,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "simdutf";
version = "5.2.8";
version = "5.3.0";
src = fetchFromGitHub {
owner = "simdutf";
repo = "simdutf";
rev = "v${finalAttrs.version}";
hash = "sha256-EFyKefq03fpkrKQoSgfvWAjMwwB5UubQouZZU9Obn3k=";
hash = "sha256-SSAErbGE1OThqnef4IzAvsZfLFfM3GhCWmJTWdvjabU=";
};
# Fix build on darwin
+143
View File
@@ -0,0 +1,143 @@
{ lib
, stdenv
, fetchgit
, expat
, fontconfig
, freetype
, harfbuzzFull
, icu
, gn
, libGL
, libjpeg
, libwebp
, libX11
, ninja
, python3
, testers
, vulkan-headers
, vulkan-memory-allocator
, xcbuild
, enableVulkan ? !stdenv.isDarwin
}:
stdenv.mkDerivation (finalAttrs: {
pname = "skia";
# Version from https://skia.googlesource.com/skia/+/refs/heads/main/RELEASE_NOTES.md
# or https://chromiumdash.appspot.com/releases
# plus date of the tip of the corresponding chrome/m$version branch
version = "124-unstable-2024-05-22";
src = fetchgit {
url = "https://skia.googlesource.com/skia.git";
# Tip of the chrome/m$version branch
rev = "a747f7ea37db6ea3871816dbaf2eb41b5776c826";
hash = "sha256-zHfv4OZK/nVJc2rl+dBSCc4f6qndpAKcFZtThw06+LY=";
};
postPatch = ''
# System zlib detection bug workaround
substituteInPlace BUILD.gn \
--replace-fail 'deps = [ "//third_party/zlib" ]' 'deps = []'
'';
nativeBuildInputs = [
gn
ninja
python3
] ++ lib.optional stdenv.isDarwin xcbuild;
buildInputs = [
expat
fontconfig
freetype
harfbuzzFull
icu
libGL
libjpeg
libwebp
libX11
] ++ lib.optionals enableVulkan [
vulkan-headers
vulkan-memory-allocator
];
configurePhase = ''
runHook preConfigure
gn gen build --args='${toString ([
# Build in release mode
"is_official_build=true"
"is_component_build=true"
# Don't use missing tools
"skia_use_dng_sdk=false"
"skia_use_wuffs=false"
# Use system dependencies
"extra_cflags=[\"-I${harfbuzzFull.dev}/include/harfbuzz\"]"
] ++ map (lib: "skia_use_system_${lib}=true") [
"zlib"
"harfbuzz"
"libpng"
"libwebp"
] ++ lib.optionals enableVulkan [
"skia_use_vulkan=true"
])}'
cd build
runHook postConfigure
'';
# Somewhat arbitrary, but similar to what other distros are doing
installPhase = ''
runHook preInstall
# Libraries
mkdir -p $out/lib
cp *.so *.a $out/lib
# Includes
pushd ../include
find . -name '*.h' -exec install -Dm644 {} $out/include/skia/{} \;
popd
pushd ../modules
find . -name '*.h' -exec install -Dm644 {} $out/include/skia/modules/{} \;
popd
# Pkg-config
mkdir -p $out/lib/pkgconfig
cat > $out/lib/pkgconfig/skia.pc <<'EOF'
prefix=${placeholder "out"}
exec_prefix=''${prefix}
libdir=''${prefix}/lib
includedir=''${prefix}/include/skia
Name: skia
Description: 2D graphic library for drawing text, geometries and images.
URL: https://skia.org/
Version: ${lib.versions.major finalAttrs.version}
Libs: -L''${libdir} -lskia
Cflags: -I''${includedir}
EOF
runHook postInstall
'';
preFixup = ''
# Some skia includes are assumed to be under an include sub directory by
# other includes
for file in $(grep -rl '#include "include/' $out/include); do
substituteInPlace "$file" \
--replace-fail '#include "include/' '#include "'
done
'';
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
description = "2D graphic library for drawing text, geometries and images";
homepage = "https://skia.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fgaz ];
platforms = lib.platforms.all;
pkgConfigModules = [ "skia" ];
# https://github.com/NixOS/nixpkgs/pull/325871#issuecomment-2220610016
broken = stdenv.isDarwin;
};
})
@@ -1,159 +0,0 @@
{
"activationEvents": [
"onStartupFinished"
],
"author": "Stoplight <support@stoplight.io>",
"bugs": {
"url": "https://github.com/stoplightio/vscode-spectral/issues"
},
"categories": [
"Linters"
],
"contributes": {
"configuration": {
"properties": {
"spectral.enable": {
"default": true,
"description": "Controls whether or not Spectral is enabled.",
"scope": "resource",
"type": "boolean"
},
"spectral.rulesetFile": {
"description": "Location of the ruleset file to use when validating. If omitted, the default is a .spectral.yml/.spectral.json in the same folder as the document being validated. Paths are relative to the workspace. This can also be a remote HTTP url.",
"scope": "resource",
"type": "string"
},
"spectral.run": {
"default": "onType",
"description": "Run the linter on save (onSave) or as you type (onType).",
"enum": [
"onSave",
"onType"
],
"scope": "resource",
"type": "string"
},
"spectral.trace.server": {
"default": "off",
"description": "Traces the communication between VS Code and the language server.",
"enum": [
"off",
"messages",
"verbose"
],
"scope": "window",
"type": "string"
},
"spectral.validateFiles": {
"description": "An array of file globs (e.g., `**/*.yaml`) in minimatch glob format which should be validated by Spectral. If language identifiers are also specified, the file must match both in order to be validated. You can also use negative file globs (e.g., `!**/package.json`) here to exclude files.",
"items": {
"type": "string"
},
"scope": "resource",
"type": "array"
},
"spectral.validateLanguages": {
"default": [
"json",
"yaml"
],
"description": "An array of language IDs which should be validated by Spectral. If file globs are also specified, the file must match both in order to be validated.",
"items": {
"type": "string"
},
"scope": "resource",
"type": "array"
}
},
"title": "Spectral",
"type": "object"
},
"commands": [
{
"title": "Show Output Channel",
"category": "Spectral",
"command": "spectral.showOutputChannel"
}
]
},
"description": "JSON/YAML linter with OpenAPI and custom ruleset support.",
"devDependencies": {
"@types/chai": "^4.3.1",
"@types/chai-jest-snapshot": "^1.3.6",
"@types/glob": "^7.2.0",
"@types/mocha": "^9.1.0",
"@types/node": "^18.11.18",
"@types/vscode": "^1.48.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.1.0",
"chai": "^4.2.0",
"chai-jest-snapshot": "^2.0.0",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
"eslint": "^7.8.1",
"eslint-config-google": "^0.14.0",
"glob": "^8.0.3",
"http-test-servers": "^2.0.0",
"merge-options": "^3.0.0",
"mocha": "^8.1.3",
"rimraf": "^3.0.2",
"semver": "^7.3.2",
"shelljs": "^0.8.5",
"ts-loader": "^9.2.8",
"ts-node": "^8.10.2",
"typescript": "beta",
"vsce": "^1.103.1",
"vscode-test": "^1.5.0",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2"
},
"displayName": "Spectral",
"engines": {
"vscode": "^1.48.0",
"node": "^12.20 || >= 14.13"
},
"homepage": "https://github.com/stoplightio/vscode-spectral",
"icon": "icon.png",
"keywords": [
"linter",
"validator",
"OpenAPI",
"Swagger",
"API",
"style guide",
"API description",
"API specification",
"OAS",
"OAS2",
"OAS3",
"AsyncAPI",
"json",
"yaml"
],
"license": "Apache-2.0",
"main": "./client/index.js",
"name": "spectral",
"private": true,
"publisher": "stoplight",
"repository": {
"type": "git",
"url": "https://github.com/stoplightio/vscode-spectral"
},
"scripts": {
"clean": "rimraf dist && rimraf \"{server,client}/dist\"",
"lint": "eslint --ext .ts,.js .",
"test": "mocha -r ts-node/register \"./+(client|server)/__tests__/unit/**/*.test.ts\"",
"test:e2e": "cross-env CI=true CHAI_JEST_SNAPSHOT_UPDATE_ALL=false ts-node ./client/src/__tests__/e2e/index.ts"
},
"version": "1.1.2",
"workspaces": {
"packages": [
"client",
"server"
],
"nohoist": [
"client/**",
"server/**"
]
}
}
@@ -1,7 +1,10 @@
{ lib
, buildNpmPackage
, mkYarnPackage
, stdenv
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, fetchFromGitHub
, typescript
, jq
@@ -10,33 +13,29 @@
let
# Instead of the build script that spectral-language-server provides (ref: https://github.com/luizcorreia/spectral-language-server/blob/master/script/vscode-spectral-build.sh), we build vscode-spectral manually.
# This is because the script must go through the network and will not work under the Nix sandbox environment.
vscodeSpectral = mkYarnPackage rec {
vscodeSpectral = stdenv.mkDerivation (finalAttrs: {
pname = "vscode-spectral";
version = "1.1.2";
src = fetchFromGitHub {
owner = "stoplightio";
repo = "vscode-spectral";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-TWy+bC6qhTKDY874ORTBbvCIH8ycpmBiU8GLYxBIiAs=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-am27A9VyFoXuOlgG9mnvNqV3Q7Bi7GJzDqqVFGDVWIA=";
};
nativeBuildInputs = [ typescript jq ];
nativeBuildInputs = [ typescript jq yarnConfigHook ];
postPatch = ''
cp server/tsconfig.json server/tsconfig.json.bak
jq '.compilerOptions += {"module": "NodeNext", "moduleResolution": "NodeNext"}' server/tsconfig.json.bak > server/tsconfig.json
'';
dontConfigure = true;
buildPhase = ''
runHook preBuild
# FIXME: vscode-spactral depends on @rollup/pluginutils, but it may have a bug that doesn't provide the type definitions for NodeNext module resolution. (ref: https://github.com/rollup/plugins/issues/1192)
@@ -53,14 +52,12 @@ let
runHook postInstall
'';
doDist = false;
meta = with lib; {
homepage = "https://github.com/stoplightio/vscode-spectral";
description = "VS Code extension bringing the awesome Spectral JSON/YAML linter with OpenAPI/AsyncAPI support";
license = licenses.asl20;
};
};
});
in
buildNpmPackage rec {
pname = "spectral-language-server";
+89
View File
@@ -0,0 +1,89 @@
{
lib,
stdenv,
maven,
jdk8,
fetchFromGitHub,
makeWrapper,
mvnDepsHash ? null,
}:
let
maven' = maven.override { jdk = jdk8; };
mvnDepsHashes = {
"x86_64-linux" = "sha256-M8O1EJtlTm+mVy/qxapRcBWxD14eYL/LLUxP2uOBoM4=";
"aarch64-linux" = "sha256-+ewdV9g0MfgiBiRAimkIZp9lrOTKnKnBB1LqhIlOSaQ=";
"x86_64-darwin" = "sha256-nUAy2+O8REuq6pOWb8d+/c/YxPxj+XwtCtkaxfihDzc=";
"aarch64-darwin" = "sha256-D6adBXtBH1IokUwwA2Z6m+6rJP2xg6BK4rcPyDSgo6o=";
};
knownMvnDepsHash =
mvnDepsHashes.${stdenv.system}
or (lib.warn "This platform doesn't have a default mvnDepsHash value, you'll need to specify it manually" lib.fakeHash);
in
maven'.buildMavenPackage rec {
pname = "tika";
version = "2.9.2";
src = fetchFromGitHub {
owner = "apache";
repo = "tika";
rev = version;
hash = "sha256-4pSQcLDKgIcU+YypJ/ywdthi6tI1852fGVOCREzUFH0=";
};
buildOffline = true;
manualMvnArtifacts = [
"org.objenesis:objenesis:2.1"
"org.apache.apache.resources:apache-jar-resource-bundle:1.5"
"org.apache.maven.surefire:surefire-junit-platform:3.1.2"
"org.junit.platform:junit-platform-launcher:1.10.0"
];
mvnHash = if mvnDepsHash != null then mvnDepsHash else knownMvnDepsHash;
mvnParameters = toString [
"-DskipTests=true" # skip tests (out of memory execptions)
"-Dossindex.skip" # skip dependency with vulnerability (recommended by upstream)
];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
# Note: using * instead of version would match multiple files
install -Dm644 tika-app/target/tika-app-${version}.jar $out/share/tika/tika-app.jar
install -Dm644 tika-server/tika-server-standard/target/tika-server-standard-${version}.jar $out/share/tika/tika-server.jar
makeWrapper ${jdk8.jre}/bin/java $out/bin/tika-app \
--add-flags "-jar $out/share/tika/tika-app.jar"
makeWrapper ${jdk8.jre}/bin/java $out/bin/tika-server \
--prefix PATH : ${lib.makeBinPath [ jdk8.jre ]} \
--add-flags "-jar $out/share/tika/tika-server.jar"
runHook postInstall
'';
meta = {
changelog = "https://github.com/apache/tika/blob/${src.rev}/CHANGES.txt";
description = "A toolkit for extracting metadata and text from over a thousand different file types";
longDescription = ''
The Apache Tika toolkit detects and extracts metadata and text
from over a thousand different file types (such as PPT, XLS, and PDF).
All of these file types can be parsed through a single interface,
making Tika useful for search engine indexing, content analysis,
translation, and much more.
'';
homepage = "https://tika.apache.org";
license = lib.licenses.asl20;
mainProgram = "tika-server";
maintainers = with lib.maintainers; [ tomasajt ];
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # maven dependencies
];
};
}
@@ -101,7 +101,7 @@ lib.warnIf (useHardenedMalloc != null)
++ lib.optionals mediaSupport [ ffmpeg ]
);
version = "13.5";
version = "13.5.1";
sources = {
x86_64-linux = fetchurl {
@@ -111,7 +111,7 @@ lib.warnIf (useHardenedMalloc != null)
"https://tor.eff.org/dist/torbrowser/${version}/tor-browser-linux-x86_64-${version}.tar.xz"
"https://tor.calyxinstitute.org/dist/torbrowser/${version}/tor-browser-linux-x86_64-${version}.tar.xz"
];
hash = "sha256-npqrGyCwqMeZ8JssR/EpvDClkLQ3K0xEfE19fHn+GDs=";
hash = "sha256-1TxxLWjNd63UxiCqTWjqa5upreOrhX4MaMDwPEEIyoo=";
};
i686-linux = fetchurl {
@@ -121,7 +121,7 @@ lib.warnIf (useHardenedMalloc != null)
"https://tor.eff.org/dist/torbrowser/${version}/tor-browser-linux-i686-${version}.tar.xz"
"https://tor.calyxinstitute.org/dist/torbrowser/${version}/tor-browser-linux-i686-${version}.tar.xz"
];
hash = "sha256-qeXLBFhcCPDWRuCZiLL1wOY6BRWsk0h36jWe5U6eCJ8=";
hash = "sha256-x1Eo1fF/J79r5ZCq5JkVu38CZk5MTOiHh4Yhmji8oOc=";
};
};
+64
View File
@@ -0,0 +1,64 @@
{ lib
, writeShellScript
, coreutils
, gnused
, gnugrep
, curl
, gnupg
, nix
, common-updater-scripts
# options
, pname
, version
, meta
, baseUrl ? "https://dist.torproject.org/torbrowser/"
# name used to match published archive
, name ? "tor-browser"
, prerelease ? false
}:
let
versionMatch = if prerelease
then ''[0-9]+(\.[0-9]+)*.*''
else ''[0-9]+(\.[0-9]+)*'';
in writeShellScript "update-${pname}" ''
PATH="${lib.makeBinPath [ coreutils curl gnugrep gnused gnupg nix common-updater-scripts ]}"
set -euo pipefail
trap
url=${baseUrl}
version=$(curl -s $url \
| sed -rne 's,^.*href="(${versionMatch})/".*,\1,p' \
| sort --version-sort | tail -1)
if [[ "${version}" = "$version" ]]; then
echo "The new version same as the old version."
exit 0
fi
HOME=$(mktemp -d)
export GNUPGHOME=$(mktemp -d)
trap 'rm -rf "$HOME" "$GNUPGHOME"' EXIT
gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
gpg --output $HOME/tor.keyring --export 0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290
curl --silent --show-error --fail -o $HOME/shasums "$url$version/sha256sums-signed-build.txt"
curl --silent --show-error --fail -o $HOME/shasums.asc "$url$version/sha256sums-signed-build.txt.asc"
gpgv --keyring=$HOME/tor.keyring $HOME/shasums.asc $HOME/shasums
declare -A platforms=(
['x86_64-linux']='linux-x86_64'
['i686-linux']='linux-i686'
)
for platform in ${lib.escapeShellArgs meta.platforms}; do
arch="''${platforms[$platform]}"
sha256=$(grep "${name}-$arch-$version.tar.xz" "$HOME/shasums" | cut -d" " -f1)
hash=$(nix hash to-sri --type sha256 "$sha256")
update-source-version "${pname}" "$version" "$hash" --ignore-same-version --source-key="sources.$platform"
done
''
@@ -47,6 +47,8 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
# fix build with openssl 3.0
./transmission-3.00-openssl-3.patch
# fix build with miniupnpc 2.2.8
./transmission-3.00-miniupnpc-2.2.8.patch
];
outputs = [ "out" "apparmor" ];
@@ -0,0 +1,18 @@
diff --git a/libtransmission/upnp.c b/libtransmission/upnp.c
index c9e248a379...c7b2580bcb 100644
--- a/libtransmission/upnp.c
+++ b/libtransmission/upnp.c
@@ -194,8 +194,13 @@
errno = 0;
+#if (MINIUPNPC_API_VERSION >= 18)
if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr,
+ sizeof(handle->lanaddr), NULL, 0) == UPNP_IGD_VALID_CONNECTED)
+#else
+ if (UPNP_GetValidIGD(devlist, &handle->urls, &handle->data, handle->lanaddr,
sizeof(handle->lanaddr)) == UPNP_IGD_VALID_CONNECTED)
+#endif
{
tr_logAddNamedInfo(getKey(), _("Found Internet Gateway Device \"%s\""), handle->urls.controlURL);
tr_logAddNamedInfo(getKey(), _("Local Address is \"%s\""), handle->lanaddr);
-68
View File
@@ -1,68 +0,0 @@
{
"name": "treedome",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri",
"clean": "rm -rf node_modules",
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts*' --write"
},
"dependencies": {
"@column-resizer/react": "^1.3.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fontsource/noto-sans": "^5.0.8",
"@fontsource/noto-sans-mono": "^5.0.8",
"@leeoniya/ufuzzy": "^1.0.8",
"@mantine/core": "^7.5.0",
"@mantine/form": "^7.5.0",
"@mantine/hooks": "^7.5.0",
"@mantine/modals": "^7.5.0",
"@mantine/notifications": "^7.5.0",
"@mantine/spotlight": "^7.5.0",
"@mantine/tiptap": "^7.5.0",
"@minoru/react-dnd-treeview": "^3.4.4",
"@mui/icons-material": "^5.14.0",
"@mui/material": "^5.14.0",
"@tabler/icons-react": "^2.28.0",
"@tauri-apps/api": "^1.4.0",
"@tiptap/extension-code-block-lowlight": "^2.0.4",
"@tiptap/extension-highlight": "^2.0.4",
"@tiptap/extension-image": "^2.0.4",
"@tiptap/extension-link": "^2.0.4",
"@tiptap/extension-placeholder": "^2.0.4",
"@tiptap/extension-subscript": "^2.0.4",
"@tiptap/extension-superscript": "^2.0.4",
"@tiptap/extension-text-align": "^2.0.4",
"@tiptap/extension-typography": "^2.2.3",
"@tiptap/extension-underline": "^2.0.4",
"@tiptap/pm": "^2.0.4",
"@tiptap/react": "^2.0.4",
"@tiptap/starter-kit": "^2.0.4",
"@types/lodash": "^4.14.195",
"fuse.js": "^7.0.0",
"jotai": "^2.2.2",
"lodash": "^4.17.21",
"lowlight": "^2.9.0",
"rc-tree": "^5.7.8",
"react": "^18.2.0",
"react-dnd": "^16.0.1",
"react-dom": "^18.2.0",
"react-idle-timer": "^5.7.2",
"wouter": "^2.11.0"
},
"devDependencies": {
"@tauri-apps/cli": "^1.4.0",
"@types/node": "^20.4.4",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.19",
"@vitejs/plugin-react": "^4.0.3",
"prettier": "^3.0.0",
"typescript": "^5.1.6",
"vite": "^4.4.6"
}
}
+12 -22
View File
@@ -8,7 +8,10 @@
, gsettings-desktop-schemas
, gtk3
, libsoup
, mkYarnPackage
, stdenv
, yarnConfigHook
, yarnBuildHook
, nodejs
, openssl
, pkg-config
, rustPlatform
@@ -28,31 +31,20 @@ let
fetchLFS = true;
};
frontend-build = mkYarnPackage {
inherit version src;
frontend-build = stdenv.mkDerivation (finalAttrs: {
pname = "treedome-ui";
inherit version src;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-CrD/n8z5fJKkBKEcvpRHJaqXBt1gbON7VsuLb2JGu1A=";
};
packageJSON = ./package.json;
configurePhase = ''
runHook preConfigure
ln -s $node_modules node_modules
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
yarn --offline run build
runHook postBuild
'';
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
installPhase = ''
runHook preInstall
@@ -62,9 +54,7 @@ let
runHook postInstall
'';
doDist = false;
};
});
in
rustPlatform.buildRustPackage {
inherit version pname src;
@@ -1,49 +0,0 @@
{
"name": "vim-language-server",
"version": "2.3.1",
"description": "vim language server",
"keywords": [
"viml",
"vim",
"lsp",
"language",
"server",
"autocomplete"
],
"main": "./out/index.js",
"repository": "https://github.com/iamcco/vim-language-server",
"author": "iamcco <ooiss@qq.com>",
"license": "MIT",
"scripts": {
"build-docs": "rm ./src/docs/builtin-docs.json && ./bin/build-docs.js",
"build": "rm -rf ./out && webpack",
"watch": "webpack -w",
"test": "mocha test/src/**/*.ts --require ts-node/register",
"lint": "tslint -c tslint.json --format verbose {.,test}/src/**/*.ts src/index.ts",
"fix": "tslint -c tslint.json --fix {.,test}/src/**/*.ts src/index.ts"
},
"bin": {
"vim-language-server": "./bin/index.js"
},
"devDependencies": {
"@types/mocha": "^7.0.2",
"@types/node": "^11.13.6",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"fast-glob": "^3.2.4",
"findup": "^0.1.5",
"mocha": "^7.1.2",
"rxjs": "^6.6.7",
"rxjs-operators": "^1.1.3",
"shvl": "^2.0.0",
"ts-loader": "^8.1.0",
"ts-node": "^9.1.1",
"tslint": "^6.1.3",
"typescript": "^4.2.3",
"vscode-languageserver": "^7.0.0",
"vscode-languageserver-textdocument": "^1.0.1",
"vscode-uri": "^3.0.2",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0"
}
}
+19 -16
View File
@@ -1,38 +1,41 @@
{ lib
, mkYarnPackage
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, npmHooks
}:
mkYarnPackage rec {
stdenv.mkDerivation (finalAttrs: {
pname = "vim-language-server";
version = "2.3.1";
src = fetchFromGitHub {
owner = "iamcco";
repo = "vim-language-server";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-NfBKNCTvCMIJrSiTlCG+LtVoMBMdCc3rzpDb9Vp2CGM=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-mo8urQaWIHu33+r0Y7mL9mJ/aSe/5CihuIetTeDHEUQ=";
};
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
# https://stackoverflow.com/a/69699772/4935114
env NODE_OPTIONS=--openssl-legacy-provider yarn --offline build
runHook postBuild
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
# Needed for executing package.json scripts
nodejs
npmHooks.npmInstallHook
];
# https://stackoverflow.com/a/69699772/4935114
preBuild = ''
export NODE_OPTIONS=--openssl-legacy-provider
'';
doDist = false;
meta = with lib; {
description = "VImScript language server, LSP for vim script";
homepage = "https://github.com/iamcco/vim-language-server";
@@ -40,4 +43,4 @@ mkYarnPackage rec {
maintainers = with maintainers; [ doronbehar ];
mainProgram = "vim-language-server";
};
}
})
+22 -37
View File
@@ -1,49 +1,36 @@
{
apiEndpoint ? "http://localhost:3000",
fetchYarnDeps,
your_spotify,
mkYarnPackage,
fixup-yarn-lock,
stdenv,
src,
version,
yarn,
meta,
offlineCache,
apiEndpoint ? "http://localhost:3000",
yarnConfigHook,
yarnBuildHook,
nodejs
}:
mkYarnPackage rec {
inherit version src;
stdenv.mkDerivation (finalAttrs: {
pname = "your_spotify_client";
name = "your_spotify_client-${version}";
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-5SgknaRVzgO2Dzc8MhAaM8UERWMv+PrItzevoWHbWnA=";
};
configurePhase = ''
runHook preConfigure
inherit version src offlineCache;
export HOME=$(mktemp -d)
yarn config --offline set yarn-offline-mirror $offlineCache
fixup-yarn-lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
API_ENDPOINT="${apiEndpoint}";
preBuild = ''
pushd ./apps/client/
yarn --offline run build
export API_ENDPOINT="${apiEndpoint}"
'';
postBuild = ''
substituteInPlace scripts/run/variables.sh --replace-quiet '/app/apps/client/' "./"
chmod +x ./scripts/run/variables.sh
patchShebangs --build ./scripts/run/variables.sh
./scripts/run/variables.sh
popd
runHook postBuild
'';
nativeBuildInputs = [yarn fixup-yarn-lock];
installPhase = ''
runHook preInstall
@@ -51,8 +38,6 @@ mkYarnPackage rec {
cp -r ./apps/client/build/* $out
runHook postInstall
'';
doDist = false;
meta = {
inherit (your_spotify.meta) homepage changelog description license maintainers;
};
}
inherit meta;
})
-10
View File
@@ -1,10 +0,0 @@
{
"name": "@your_spotify/root",
"version": "1.10.1",
"repository": "git@github.com:Yooooomi/your_spotify.git",
"author": "Timothee <timothee.boussus@gmail.com>",
"private": true,
"workspaces": [
"apps/*"
]
}
+64 -73
View File
@@ -1,85 +1,76 @@
{
callPackage,
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
lib,
makeWrapper,
mkYarnPackage,
yarnConfigHook,
yarnBuildHook,
nodejs,
fixup-yarn-lock,
yarn,
}: let
makeWrapper,
callPackage,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "your_spotify_server";
version = "1.10.1";
src = fetchFromGitHub {
owner = "Yooooomi";
repo = "your_spotify";
rev = "refs/tags/${version}";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-e82j2blGxQLWAlBNuAnFvlD9vwMk4/mRI0Vf7vuaPA0=";
};
client = callPackage ./client.nix {inherit src version;};
in
mkYarnPackage rec {
inherit version src;
pname = "your_spotify_server";
name = "your_spotify_server-${version}";
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = src + "/yarn.lock";
hash = "sha256-5SgknaRVzgO2Dzc8MhAaM8UERWMv+PrItzevoWHbWnA=";
offlineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-5SgknaRVzgO2Dzc8MhAaM8UERWMv+PrItzevoWHbWnA=";
};
nativeBuildInputs = [
makeWrapper
yarnConfigHook
yarnBuildHook
nodejs
];
preBuild = ''
pushd ./apps/server/
'';
postBuild = ''
popd
rm -r node_modules
export NODE_ENV="production"
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/your_spotify
cp -r node_modules $out/share/your_spotify/node_modules
cp -r ./apps/server/{lib,package.json} $out
mkdir -p $out/bin
makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_migrate" \
--add-flags "$out/lib/migrations.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_server" \
--add-flags "$out/lib/index.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
runHook postInstall
'';
passthru = {
client = callPackage ./client.nix {
inherit (finalAttrs) src version offlineCache meta;
};
};
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
yarn config --offline set yarn-offline-mirror $offlineCache
fixup-yarn-lock yarn.lock
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
pushd ./apps/server/
yarn --offline run build
popd
rm -r node_modules
export NODE_ENV="production"
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
runHook postBuild
'';
nativeBuildInputs = [makeWrapper yarn fixup-yarn-lock];
installPhase = ''
runHook preInstall
mkdir -p $out/share/your_spotify
cp -r node_modules $out/share/your_spotify/node_modules
cp -r ./apps/server/{lib,package.json} $out
mkdir -p $out/bin
makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_migrate" \
--add-flags "$out/lib/migrations.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_server" \
--add-flags "$out/lib/index.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
runHook postInstall
'';
doDist = false;
passthru = {
inherit client;
};
meta = with lib; {
homepage = "https://github.com/Yooooomi/your_spotify";
changelog = "https://github.com/Yooooomi/your_spotify/releases/tag/${version}";
description = "Self-hosted application that tracks what you listen and offers you a dashboard to explore statistics about it";
license = licenses.gpl3Only;
maintainers = with maintainers; [patrickdag];
mainProgram = "your_spotify_server";
};
}
meta = {
homepage = "https://github.com/Yooooomi/your_spotify";
changelog = "https://github.com/Yooooomi/your_spotify/releases/tag/${finalAttrs.version}";
description = "Self-hosted application that tracks what you listen and offers you a dashboard to explore statistics about it";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ patrickdag ];
mainProgram = "your_spotify_server";
};
})
+15 -15
View File
@@ -1,14 +1,12 @@
{
lib,
asar,
binutils,
commandLineArgs ? "",
copyDesktopItems,
electron_30,
fetchurl,
makeDesktopItem,
makeWrapper,
nix-update-script,
stdenv,
zstd,
}:
@@ -16,19 +14,21 @@ stdenv.mkDerivation (finalAttrs: {
pname = "ytmdesktop";
version = "2.0.5";
desktopItem = makeDesktopItem {
desktopName = "Youtube Music Desktop App";
exec = "ytmdesktop";
icon = "ytmdesktop";
name = "ytmdesktop";
genericName = finalAttrs.meta.description;
mimeTypes = [ "x-scheme-handler/ytmd" ];
categories = [
"AudioVideo"
"Audio"
];
startupNotify = true;
};
desktopItems = [
(makeDesktopItem {
desktopName = "Youtube Music Desktop App";
exec = "ytmdesktop";
icon = "ytmdesktop";
name = "ytmdesktop";
genericName = finalAttrs.meta.description;
mimeTypes = [ "x-scheme-handler/ytmd" ];
categories = [
"AudioVideo"
"Audio"
];
startupNotify = true;
})
];
nativeBuildInputs = [
asar

Some files were not shown because too many files have changed in this diff Show More