mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
Merge master into haskell-updates
This commit is contained in:
commit
d8a4ff618f
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@ -337,8 +337,8 @@ nixos/modules/tasks/filesystems/zfs.nix @raitobezarius
|
||||
nixos/tests/zfs.nix @raitobezarius
|
||||
|
||||
# Zig
|
||||
/pkgs/development/compilers/zig @AndersonTorres @figsoda
|
||||
/doc/hooks/zig.section.md @AndersonTorres @figsoda
|
||||
/pkgs/development/compilers/zig @figsoda
|
||||
/doc/hooks/zig.section.md @figsoda
|
||||
|
||||
# Linux Kernel
|
||||
pkgs/os-specific/linux/kernel/manual-config.nix @amjoseph-nixpkgs
|
||||
|
@ -13130,6 +13130,12 @@
|
||||
fingerprint = "9B1A 7906 5D2F 2B80 6C8A 5A1C 7D2A CDAF 4653 CF28";
|
||||
}];
|
||||
};
|
||||
ninjafb = {
|
||||
email = "oscar@oronberg.com";
|
||||
github = "NinjaFB";
|
||||
githubId = 54169044;
|
||||
name = "NinjaFB";
|
||||
};
|
||||
nintron = {
|
||||
email = "nintron@sent.com";
|
||||
github = "Nintron27";
|
||||
@ -19222,6 +19228,12 @@
|
||||
githubId = 118959;
|
||||
name = "VinyMeuh";
|
||||
};
|
||||
viperML = {
|
||||
email = "ayatsfer@gmail.com";
|
||||
github = "viperML";
|
||||
githubId = 11395853;
|
||||
name = "Fernando Ayats";
|
||||
};
|
||||
viraptor = {
|
||||
email = "nix@viraptor.info";
|
||||
github = "viraptor";
|
||||
|
@ -20,7 +20,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
|
||||
- [Breaking Changes](#sec-release-23.11-nixos-breaking-changes)
|
||||
- [New Services](#sec-release-23.11-nixos-new-services)
|
||||
- [Other Notable Changes](#sec-release-23.11-nixos-notable-changes)
|
||||
- [Nixpkgs Library Changes](#sec-release-23.11-nixpkgs-lib)
|
||||
- [Nixpkgs Library](#sec-release-23.11-nixpkgs-lib)
|
||||
- [Breaking Changes](#sec-release-23.11-lib-breaking)
|
||||
- [Additions and Improvements](#sec-release-23.11-lib-additions-improvements)
|
||||
- [Deprecations](#sec-release-23.11-lib-deprecations)
|
||||
@ -1317,14 +1317,14 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
|
||||
|
||||
### Breaking Changes {#sec-release-23.11-lib-breaking}
|
||||
|
||||
- [`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl-prime)
|
||||
- [`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl-prime)
|
||||
now always evaluates the initial accumulator argument first. If you depend on
|
||||
the lazier behavior, consider using
|
||||
[`lib.lists.foldl`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl)
|
||||
[`lib.lists.foldl`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl)
|
||||
or
|
||||
[`builtins.foldl'`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-foldl')
|
||||
instead.
|
||||
- [`lib.attrsets.foldlAttrs`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.attrsets.foldlAttrs)
|
||||
- [`lib.attrsets.foldlAttrs`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.attrsets.foldlAttrs)
|
||||
now always evaluates the initial accumulator argument first.
|
||||
- Now that the internal NixOS transition to Markdown documentation is complete,
|
||||
`lib.options.literalDocBook` has been removed after deprecation in 22.11.
|
||||
@ -1332,7 +1332,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
|
||||
|
||||
### Additions and Improvements {#sec-release-23.11-lib-additions-improvements}
|
||||
|
||||
- [`lib.fileset`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-fileset):
|
||||
- [`lib.fileset`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-fileset):
|
||||
A new sub-library to select local files to use for sources, designed to be
|
||||
easy and safe to use.
|
||||
|
||||
@ -1341,7 +1341,7 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
|
||||
post](https://www.tweag.io/blog/2023-11-28-file-sets/) or [the
|
||||
tutorial](https://nix.dev/tutorials/file-sets).
|
||||
|
||||
- [`lib.gvariant`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-gvariant):
|
||||
- [`lib.gvariant`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-gvariant):
|
||||
A partial and basic implementation of GVariant formatted strings. See
|
||||
[GVariant Format
|
||||
Strings](https://docs.gtk.org/glib/gvariant-format-strings.html) for details.
|
||||
@ -1351,58 +1351,58 @@ Make sure to also check the many updates in the [Nixpkgs library](#sec-release-2
|
||||
change in backwards incompatible ways without prior notice.
|
||||
:::
|
||||
|
||||
- [`lib.asserts`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-asserts):
|
||||
- [`lib.asserts`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-asserts):
|
||||
New function:
|
||||
[`assertEachOneOf`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.asserts.assertEachOneOf).
|
||||
- [`lib.attrsets`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-attrsets):
|
||||
[`assertEachOneOf`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.asserts.assertEachOneOf).
|
||||
- [`lib.attrsets`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-attrsets):
|
||||
New function:
|
||||
[`attrsToList`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.attrsets.attrsToList).
|
||||
- [`lib.customisation`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-customisation):
|
||||
[`attrsToList`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.attrsets.attrsToList).
|
||||
- [`lib.customisation`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-customisation):
|
||||
New function:
|
||||
[`makeScopeWithSplicing'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.customisation.makeScopeWithSplicing-prime).
|
||||
- [`lib.fixedPoints`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-fixedPoints):
|
||||
[`makeScopeWithSplicing'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.customisation.makeScopeWithSplicing-prime).
|
||||
- [`lib.fixedPoints`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-fixedPoints):
|
||||
Documentation improvements for
|
||||
[`lib.fixedPoints.fix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.fixedPoints.fix).
|
||||
[`lib.fixedPoints.fix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.fixedPoints.fix).
|
||||
- `lib.generators`: New functions:
|
||||
[`mkDconfKeyValue`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.generators.mkDconfKeyValue),
|
||||
[`toDconfINI`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.generators.toDconfINI).
|
||||
[`mkDconfKeyValue`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.generators.mkDconfKeyValue),
|
||||
[`toDconfINI`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.generators.toDconfINI).
|
||||
|
||||
`lib.generators.toKeyValue` now supports the `indent` attribute in its first
|
||||
argument.
|
||||
- [`lib.lists`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-lists):
|
||||
- [`lib.lists`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-lists):
|
||||
New functions:
|
||||
[`findFirstIndex`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.findFirstIndex),
|
||||
[`hasPrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.hasPrefix),
|
||||
[`removePrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.removePrefix),
|
||||
[`commonPrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.commonPrefix),
|
||||
[`allUnique`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.allUnique).
|
||||
[`findFirstIndex`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.findFirstIndex),
|
||||
[`hasPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.hasPrefix),
|
||||
[`removePrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.removePrefix),
|
||||
[`commonPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.commonPrefix),
|
||||
[`allUnique`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.allUnique).
|
||||
|
||||
Documentation improvements for
|
||||
[`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.lists.foldl-prime).
|
||||
- [`lib.meta`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-meta):
|
||||
[`lib.lists.foldl'`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.lists.foldl-prime).
|
||||
- [`lib.meta`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-meta):
|
||||
Documentation of functions now gets rendered
|
||||
- [`lib.path`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-path):
|
||||
- [`lib.path`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-path):
|
||||
New functions:
|
||||
[`hasPrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.hasPrefix),
|
||||
[`removePrefix`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.removePrefix),
|
||||
[`splitRoot`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.splitRoot),
|
||||
[`subpath.components`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.path.subpath.components).
|
||||
- [`lib.strings`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-strings):
|
||||
[`hasPrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.hasPrefix),
|
||||
[`removePrefix`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.removePrefix),
|
||||
[`splitRoot`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.splitRoot),
|
||||
[`subpath.components`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.path.subpath.components).
|
||||
- [`lib.strings`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-strings):
|
||||
New functions:
|
||||
[`replicate`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.replicate),
|
||||
[`cmakeOptionType`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.cmakeOptionType),
|
||||
[`cmakeBool`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.cmakeBool),
|
||||
[`cmakeFeature`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.strings.cmakeFeature).
|
||||
- [`lib.trivial`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-trivial):
|
||||
[`replicate`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.replicate),
|
||||
[`cmakeOptionType`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeOptionType),
|
||||
[`cmakeBool`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeBool),
|
||||
[`cmakeFeature`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.strings.cmakeFeature).
|
||||
- [`lib.trivial`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-trivial):
|
||||
New function:
|
||||
[`mirrorFunctionArgs`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.trivial.mirrorFunctionArgs).
|
||||
[`mirrorFunctionArgs`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.trivial.mirrorFunctionArgs).
|
||||
- `lib.systems`: New function:
|
||||
[`equals`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.systems.equals).
|
||||
- [`lib.options`](https://nixos.org/manual/nixpkgs/unstable#sec-functions-library-options):
|
||||
[`equals`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.systems.equals).
|
||||
- [`lib.options`](https://nixos.org/manual/nixpkgs/stable#sec-functions-library-options):
|
||||
Improved documentation for
|
||||
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption).
|
||||
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.options.mkPackageOption).
|
||||
|
||||
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/unstable#function-library-lib.options.mkPackageOption).
|
||||
[`mkPackageOption`](https://nixos.org/manual/nixpkgs/stable#function-library-lib.options.mkPackageOption).
|
||||
now also supports the `pkgsText` attribute.
|
||||
|
||||
Module system:
|
||||
|
@ -27,6 +27,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- The `power.ups` module now generates `upsd.conf`, `upsd.users` and `upsmon.conf` automatically from a set of new configuration options. This breaks compatibility with existing `power.ups` setups where these files were created manually. Back up these files before upgrading NixOS.
|
||||
|
||||
- `mkosi` was updated to v19. Parts of the user interface have changed. Consult the
|
||||
[release notes](https://github.com/systemd/mkosi/releases/tag/v19) for a list of changes.
|
||||
|
||||
|
@ -27,31 +27,37 @@ var ${bucket:=nixos-amis}
|
||||
var ${service_role_name:=vmimport}
|
||||
|
||||
# Output of the command:
|
||||
# > aws ec2 describe-regions --all-regions --query "Regions[].{Name:RegionName}" --output text | sort
|
||||
# $ nix-shell -I nixpkgs=. -p awscli --run 'aws ec2 describe-regions --region us-east-1 --all-regions --query "Regions[].{Name:RegionName}" --output text | sort | sed -e s/^/\ \ /'
|
||||
var ${regions:=
|
||||
af-south-1
|
||||
ap-east-1
|
||||
ap-northeast-1
|
||||
ap-northeast-2
|
||||
ap-northeast-3
|
||||
ap-south-1
|
||||
ap-southeast-1
|
||||
ap-southeast-2
|
||||
ap-southeast-3
|
||||
ca-central-1
|
||||
eu-central-1
|
||||
eu-north-1
|
||||
eu-south-1
|
||||
eu-west-1
|
||||
eu-west-2
|
||||
eu-west-3
|
||||
me-south-1
|
||||
sa-east-1
|
||||
us-east-1
|
||||
us-east-2
|
||||
us-west-1
|
||||
us-west-2
|
||||
}
|
||||
af-south-1
|
||||
ap-east-1
|
||||
ap-northeast-1
|
||||
ap-northeast-2
|
||||
ap-northeast-3
|
||||
ap-south-1
|
||||
ap-south-2
|
||||
ap-southeast-1
|
||||
ap-southeast-2
|
||||
ap-southeast-3
|
||||
ap-southeast-4
|
||||
ca-central-1
|
||||
eu-central-1
|
||||
eu-central-2
|
||||
eu-north-1
|
||||
eu-south-1
|
||||
eu-south-2
|
||||
eu-west-1
|
||||
eu-west-2
|
||||
eu-west-3
|
||||
il-central-1
|
||||
me-central-1
|
||||
me-south-1
|
||||
sa-east-1
|
||||
us-east-1
|
||||
us-east-2
|
||||
us-west-1
|
||||
us-west-2
|
||||
}
|
||||
|
||||
regions=($regions)
|
||||
|
||||
|
@ -109,13 +109,17 @@ let
|
||||
if pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform then ''
|
||||
echo "Ignoring validation for cross-compilation"
|
||||
''
|
||||
else ''
|
||||
else
|
||||
let
|
||||
showCommand = if isNixAtLeast "2.20pre" then "config show" else "show-config";
|
||||
in
|
||||
''
|
||||
echo "Validating generated nix.conf"
|
||||
ln -s $out ./nix.conf
|
||||
set -e
|
||||
set +o pipefail
|
||||
NIX_CONF_DIR=$PWD \
|
||||
${cfg.package}/bin/nix show-config ${optionalString (isNixAtLeast "2.3pre") "--no-net"} \
|
||||
${cfg.package}/bin/nix ${showCommand} ${optionalString (isNixAtLeast "2.3pre") "--no-net"} \
|
||||
${optionalString (isNixAtLeast "2.4pre") "--option experimental-features nix-command"} \
|
||||
|& sed -e 's/^warning:/error:/' \
|
||||
| (! grep '${if cfg.checkAllErrors then "^error:" else "^error: unknown setting"}')
|
||||
|
@ -288,7 +288,7 @@ in
|
||||
telegraf = 256;
|
||||
gitlab-runner = 257;
|
||||
postgrey = 258;
|
||||
hound = 259;
|
||||
# hound = 259; # unused, removed 2023-11-21
|
||||
leaps = 260;
|
||||
ipfs = 261;
|
||||
# stanchion = 262; # unused, removed 2020-10-14
|
||||
@ -599,7 +599,7 @@ in
|
||||
#telegraf = 256; # unused
|
||||
gitlab-runner = 257;
|
||||
postgrey = 258;
|
||||
hound = 259;
|
||||
# hound = 259; # unused, removed 2023-11-21
|
||||
leaps = 260;
|
||||
ipfs = 261;
|
||||
# stanchion = 262; # unused, removed 2020-10-14
|
||||
|
@ -1334,6 +1334,7 @@
|
||||
./services/web-apps/vikunja.nix
|
||||
./services/web-apps/whitebophir.nix
|
||||
./services/web-apps/wiki-js.nix
|
||||
./services/web-apps/windmill.nix
|
||||
./services/web-apps/wordpress.nix
|
||||
./services/web-apps/writefreely.nix
|
||||
./services/web-apps/youtrack.nix
|
||||
|
@ -13,6 +13,13 @@ in
|
||||
###### interface
|
||||
options.services.kubernetes.flannel = {
|
||||
enable = mkEnableOption (lib.mdDoc "flannel networking");
|
||||
|
||||
openFirewallPorts = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Whether to open the Flannel UDP ports in the firewall on all interfaces.'';
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
@ -38,7 +45,7 @@ in
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall.allowedUDPPorts = [
|
||||
firewall.allowedUDPPorts = mkIf cfg.openFirewallPorts [
|
||||
8285 # flannel udp
|
||||
8472 # flannel vxlan
|
||||
];
|
||||
|
@ -21,6 +21,7 @@ let
|
||||
NODE_ENV = "production";
|
||||
RAILS_SERVE_STATIC_FILES = "true";
|
||||
RAILS_LOG_TO_STDOUT = "true";
|
||||
REDIS_URL = "redis://${cfg.redis.host}:${toString cfg.redis.port}";
|
||||
};
|
||||
databaseConfig = settingsFormat.generate "database.yml" cfg.database.settings;
|
||||
in
|
||||
@ -65,6 +66,36 @@ in
|
||||
description = lib.mdDoc "Websocket service port.";
|
||||
};
|
||||
|
||||
redis = {
|
||||
createLocally = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = lib.mdDoc "Whether to create a local redis automatically.";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = "zammad";
|
||||
description = lib.mdDoc ''
|
||||
Name of the redis server. Only used if `createLocally` is set to true.
|
||||
'';
|
||||
};
|
||||
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = lib.mdDoc ''
|
||||
Redis server address.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 6379;
|
||||
description = lib.mdDoc "Port of the redis server.";
|
||||
};
|
||||
};
|
||||
|
||||
database = {
|
||||
type = mkOption {
|
||||
type = types.enum [ "PostgreSQL" "MySQL" ];
|
||||
@ -206,6 +237,10 @@ in
|
||||
assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
|
||||
message = "a password cannot be specified if services.zammad.database.createLocally is set to true";
|
||||
}
|
||||
{
|
||||
assertion = cfg.redis.createLocally -> cfg.redis.host == "localhost";
|
||||
message = "the redis host must be localhost if services.zammad.redis.createLocally is set to true";
|
||||
}
|
||||
];
|
||||
|
||||
services.mysql = optionalAttrs (cfg.database.createLocally && cfg.database.type == "MySQL") {
|
||||
@ -231,6 +266,13 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
services.redis = optionalAttrs cfg.redis.createLocally {
|
||||
servers."${cfg.redis.name}" = {
|
||||
enable = true;
|
||||
port = cfg.redis.port;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.zammad-web = {
|
||||
inherit environment;
|
||||
serviceConfig = serviceConfig // {
|
||||
@ -240,6 +282,8 @@ in
|
||||
after = [
|
||||
"network.target"
|
||||
"postgresql.service"
|
||||
] ++ optionals cfg.redis.createLocally [
|
||||
"redis-${cfg.redis.name}.service"
|
||||
];
|
||||
requires = [
|
||||
"postgresql.service"
|
||||
@ -303,16 +347,15 @@ in
|
||||
script = "./script/websocket-server.rb -b ${cfg.host} -p ${toString cfg.websocketPort} start";
|
||||
};
|
||||
|
||||
systemd.services.zammad-scheduler = {
|
||||
inherit environment;
|
||||
serviceConfig = serviceConfig // { Type = "forking"; };
|
||||
systemd.services.zammad-worker = {
|
||||
inherit serviceConfig environment;
|
||||
after = [ "zammad-web.service" ];
|
||||
requires = [ "zammad-web.service" ];
|
||||
description = "Zammad scheduler";
|
||||
description = "Zammad background worker";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = "./script/scheduler.rb start";
|
||||
script = "./script/background-worker.rb start";
|
||||
};
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ garbas taeer ];
|
||||
meta.maintainers = with lib.maintainers; [ taeer netali ];
|
||||
}
|
||||
|
@ -41,12 +41,12 @@ let
|
||||
# This becomes the main config file for Prometheus
|
||||
promConfig = {
|
||||
global = filterValidPrometheus cfg.globalConfig;
|
||||
rule_files = map (promtoolCheck "check rules" "rules") (cfg.ruleFiles ++ [
|
||||
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg.rules))
|
||||
]);
|
||||
scrape_configs = filterValidPrometheus cfg.scrapeConfigs;
|
||||
remote_write = filterValidPrometheus cfg.remoteWrite;
|
||||
remote_read = filterValidPrometheus cfg.remoteRead;
|
||||
rule_files = optionals (!(cfg.enableAgentMode)) (map (promtoolCheck "check rules" "rules") (cfg.ruleFiles ++ [
|
||||
(pkgs.writeText "prometheus.rules" (concatStringsSep "\n" cfg.rules))
|
||||
]));
|
||||
alerting = {
|
||||
inherit (cfg) alertmanagers;
|
||||
};
|
||||
@ -62,15 +62,20 @@ let
|
||||
promtoolCheck "check config ${lib.optionalString (cfg.checkConfig == "syntax-only") "--syntax-only"}" "prometheus.yml" yml;
|
||||
|
||||
cmdlineArgs = cfg.extraFlags ++ [
|
||||
"--storage.tsdb.path=${workingDir}/data/"
|
||||
"--config.file=${
|
||||
if cfg.enableReload
|
||||
then "/etc/prometheus/prometheus.yaml"
|
||||
else prometheusYml
|
||||
}"
|
||||
"--web.listen-address=${cfg.listenAddress}:${builtins.toString cfg.port}"
|
||||
"--alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity}"
|
||||
] ++ optional (cfg.webExternalUrl != null) "--web.external-url=${cfg.webExternalUrl}"
|
||||
] ++ (
|
||||
if (cfg.enableAgentMode) then [
|
||||
"--enable-feature=agent"
|
||||
] else [
|
||||
"--alertmanager.notification-queue-capacity=${toString cfg.alertmanagerNotificationQueueCapacity }"
|
||||
"--storage.tsdb.path=${workingDir}/data/"
|
||||
])
|
||||
++ optional (cfg.webExternalUrl != null) "--web.external-url=${cfg.webExternalUrl}"
|
||||
++ optional (cfg.retentionTime != null) "--storage.tsdb.retention.time=${cfg.retentionTime}"
|
||||
++ optional (cfg.webConfigFile != null) "--web.config.file=${cfg.webConfigFile}";
|
||||
|
||||
@ -1612,6 +1617,8 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
enableAgentMode = mkEnableOption (lib.mdDoc "agent mode");
|
||||
|
||||
configText = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
|
@ -6,9 +6,83 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.power.ups;
|
||||
in
|
||||
defaultPort = 3493;
|
||||
|
||||
nutFormat = {
|
||||
|
||||
type = with lib.types; let
|
||||
|
||||
singleAtom = nullOr (oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
]) // {
|
||||
description = "atom (null, bool, int, float or string)";
|
||||
};
|
||||
|
||||
in attrsOf (oneOf [
|
||||
singleAtom
|
||||
(listOf (nonEmptyListOf singleAtom))
|
||||
]);
|
||||
|
||||
generate = name: value:
|
||||
let
|
||||
normalizedValue =
|
||||
lib.mapAttrs (key: val:
|
||||
if lib.isList val
|
||||
then forEach val (elem: if lib.isList elem then elem else [elem])
|
||||
else
|
||||
if val == null
|
||||
then []
|
||||
else [[val]]
|
||||
) value;
|
||||
|
||||
mkValueString = concatMapStringsSep " " (v:
|
||||
let str = generators.mkValueStringDefault {} v;
|
||||
in
|
||||
# Quote the value if it has spaces and isn't already quoted.
|
||||
if (hasInfix " " str) && !(hasPrefix "\"" str && hasSuffix "\"" str)
|
||||
then "\"${str}\""
|
||||
else str
|
||||
);
|
||||
|
||||
in pkgs.writeText name (lib.generators.toKeyValue {
|
||||
mkKeyValue = generators.mkKeyValueDefault { inherit mkValueString; } " ";
|
||||
listsAsDuplicateKeys = true;
|
||||
} normalizedValue);
|
||||
|
||||
};
|
||||
|
||||
installSecrets = source: target: secrets:
|
||||
pkgs.writeShellScript "installSecrets.sh" ''
|
||||
install -m0600 -D ${source} "${target}"
|
||||
${concatLines (forEach secrets (name: ''
|
||||
${pkgs.replace-secret}/bin/replace-secret \
|
||||
'@${name}@' \
|
||||
"$CREDENTIALS_DIRECTORY/${name}" \
|
||||
"${target}"
|
||||
''))}
|
||||
chmod u-w "${target}"
|
||||
'';
|
||||
|
||||
upsmonConf = nutFormat.generate "upsmon.conf" cfg.upsmon.settings;
|
||||
|
||||
upsdUsers = pkgs.writeText "upsd.users" (let
|
||||
# This looks like INI, but it's not quite because the
|
||||
# 'upsmon' option lacks a '='. See: man upsd.users
|
||||
userConfig = name: user: concatStringsSep "\n " (concatLists [
|
||||
[
|
||||
"[${name}]"
|
||||
"password = \"@upsdusers_password_${name}@\""
|
||||
]
|
||||
(optional (user.upsmon != null) "upsmon ${user.upsmon}")
|
||||
(forEach user.actions (action: "actions = ${action}"))
|
||||
(forEach user.instcmds (instcmd: "instcmds = ${instcmd}"))
|
||||
]);
|
||||
in concatStringsSep "\n\n" (mapAttrsToList userConfig cfg.users));
|
||||
|
||||
|
||||
let
|
||||
upsOptions = {name, config, ...}:
|
||||
{
|
||||
options = {
|
||||
@ -95,6 +169,213 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
listenOptions = {
|
||||
options = {
|
||||
address = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
Address of the interface for `upsd` to listen on.
|
||||
See `man upsd.conf` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = defaultPort;
|
||||
description = lib.mdDoc ''
|
||||
TCP port for `upsd` to listen on.
|
||||
See `man upsd.conf` for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
upsdOptions = {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
defaultText = literalMD "`true` if `mode` is one of `standalone`, `netserver`";
|
||||
description = mdDoc "Whether to enable `upsd`.";
|
||||
};
|
||||
|
||||
listen = mkOption {
|
||||
type = with types; listOf (submodule listenOptions);
|
||||
default = [];
|
||||
example = [
|
||||
{
|
||||
address = "192.168.50.1";
|
||||
}
|
||||
{
|
||||
address = "::1";
|
||||
port = 5923;
|
||||
}
|
||||
];
|
||||
description = lib.mdDoc ''
|
||||
Address of the interface for `upsd` to listen on.
|
||||
See `man upsd` for details`.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = lib.mdDoc ''
|
||||
Additional lines to add to `upsd.conf`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
enable = mkDefault (elem cfg.mode [ "standalone" "netserver" ]);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
monitorOptions = { name, config, ... }: {
|
||||
options = {
|
||||
system = mkOption {
|
||||
type = types.str;
|
||||
default = name;
|
||||
description = lib.mdDoc ''
|
||||
Identifier of the UPS to monitor, in this form: `<upsname>[@<hostname>[:<port>]]`
|
||||
See `upsmon.conf` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
powerValue = mkOption {
|
||||
type = types.int;
|
||||
default = 1;
|
||||
description = lib.mdDoc ''
|
||||
Number of power supplies that the UPS feeds on this system.
|
||||
See `upsmon.conf` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
Username from `upsd.users` for accessing this UPS.
|
||||
See `upsmon.conf` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
defaultText = literalMD "power.ups.users.\${user}.passwordFile";
|
||||
description = lib.mdDoc ''
|
||||
The full path to a file containing the password from
|
||||
`upsd.users` for accessing this UPS. The password file
|
||||
is read on service start.
|
||||
See `upsmon.conf` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
type = mkOption {
|
||||
type = types.str;
|
||||
default = "master";
|
||||
description = lib.mdDoc ''
|
||||
The relationship with `upsd`.
|
||||
See `upsmon.conf` for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
passwordFile = mkDefault cfg.users.${config.user}.passwordFile;
|
||||
};
|
||||
};
|
||||
|
||||
upsmonOptions = {
|
||||
options = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
defaultText = literalMD "`true` if `mode` is one of `standalone`, `netserver`, `netclient`";
|
||||
description = mdDoc "Whether to enable `upsmon`.";
|
||||
};
|
||||
|
||||
monitor = mkOption {
|
||||
type = with types; attrsOf (submodule monitorOptions);
|
||||
default = {};
|
||||
description = lib.mdDoc ''
|
||||
Set of UPS to monitor. See `man upsmon.conf` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = nutFormat.type;
|
||||
default = {};
|
||||
defaultText = literalMD ''
|
||||
{
|
||||
MINSUPPLIES = 1;
|
||||
RUN_AS_USER = "root";
|
||||
NOTIFYCMD = "''${pkgs.nut}/bin/upssched";
|
||||
SHUTDOWNCMD = "''${pkgs.systemd}/bin/shutdown now";
|
||||
}
|
||||
'';
|
||||
description = mdDoc "Additional settings to add to `upsmon.conf`.";
|
||||
example = literalMD ''
|
||||
{
|
||||
MINSUPPLIES = 2;
|
||||
NOTIFYFLAG = [
|
||||
[ "ONLINE" "SYSLOG+EXEC" ]
|
||||
[ "ONBATT" "SYSLOG+EXEC" ]
|
||||
];
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
enable = mkDefault (elem cfg.mode [ "standalone" "netserver" "netclient" ]);
|
||||
settings = {
|
||||
RUN_AS_USER = "root"; # TODO: replace 'root' by another username.
|
||||
MINSUPPLIES = mkDefault 1;
|
||||
NOTIFYCMD = mkDefault "${pkgs.nut}/bin/upssched";
|
||||
SHUTDOWNCMD = mkDefault "${pkgs.systemd}/bin/shutdown now";
|
||||
MONITOR = flip mapAttrsToList cfg.upsmon.monitor (name: monitor: with monitor; [ system powerValue user "\"@upsmon_password_${name}@\"" type ]);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
userOptions = {
|
||||
options = {
|
||||
passwordFile = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
The full path to a file that contains the user's (clear text)
|
||||
password. The password file is read on service start.
|
||||
'';
|
||||
};
|
||||
|
||||
actions = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = lib.mdDoc ''
|
||||
Allow the user to do certain things with upsd.
|
||||
See `man upsd.users` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
instcmds = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
description = lib.mdDoc ''
|
||||
Let the user initiate specific instant commands. Use "ALL" to grant all commands automatically. For the full list of what your UPS supports, use "upscmd -l".
|
||||
See `man upsd.users` for details.
|
||||
'';
|
||||
};
|
||||
|
||||
upsmon = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = lib.mdDoc ''
|
||||
Add the necessary actions for a upsmon process to work.
|
||||
See `man upsd.users` for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
|
||||
@ -103,19 +384,14 @@ in
|
||||
# powerManagement.powerDownCommands
|
||||
|
||||
power.ups = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = with types; bool;
|
||||
description = lib.mdDoc ''
|
||||
Enables support for Power Devices, such as Uninterruptible Power
|
||||
Supplies, Power Distribution Units and Solar Controllers.
|
||||
'';
|
||||
};
|
||||
enable = mkEnableOption (lib.mdDoc ''
|
||||
Enables support for Power Devices, such as Uninterruptible Power
|
||||
Supplies, Power Distribution Units and Solar Controllers.
|
||||
'');
|
||||
|
||||
# This option is not used yet.
|
||||
mode = mkOption {
|
||||
default = "standalone";
|
||||
type = types.str;
|
||||
type = types.enum [ "none" "standalone" "netserver" "netclient" ];
|
||||
description = lib.mdDoc ''
|
||||
The MODE determines which part of the NUT is to be started, and
|
||||
which configuration files must be modified.
|
||||
@ -148,6 +424,13 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Open ports in the firewall for `upsd`.
|
||||
'';
|
||||
};
|
||||
|
||||
maxStartDelay = mkOption {
|
||||
default = 45;
|
||||
@ -161,6 +444,22 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
upsmon = mkOption {
|
||||
default = {};
|
||||
description = lib.mdDoc ''
|
||||
Options for the `upsmon.conf` configuration file.
|
||||
'';
|
||||
type = types.submodule upsmonOptions;
|
||||
};
|
||||
|
||||
upsd = mkOption {
|
||||
default = {};
|
||||
description = lib.mdDoc ''
|
||||
Options for the `upsd.conf` configuration file.
|
||||
'';
|
||||
type = types.submodule upsdOptions;
|
||||
};
|
||||
|
||||
ups = mkOption {
|
||||
default = {};
|
||||
# see nut/etc/ups.conf.sample
|
||||
@ -172,46 +471,95 @@ in
|
||||
type = with types; attrsOf (submodule upsOptions);
|
||||
};
|
||||
|
||||
users = mkOption {
|
||||
default = {};
|
||||
description = lib.mdDoc ''
|
||||
Users that can access upsd. See `man upsd.users`.
|
||||
'';
|
||||
type = with types; attrsOf (submodule userOptions);
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = [
|
||||
(let
|
||||
totalPowerValue = foldl' add 0 (map (monitor: monitor.powerValue) (attrValues cfg.upsmon.monitor));
|
||||
minSupplies = cfg.upsmon.settings.MINSUPPLIES;
|
||||
in mkIf cfg.upsmon.enable {
|
||||
assertion = totalPowerValue >= minSupplies;
|
||||
message = ''
|
||||
`power.ups.upsmon`: Total configured power value (${toString totalPowerValue}) must be at least MINSUPPLIES (${toString minSupplies}).
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.nut ];
|
||||
|
||||
systemd.services.upsmon = {
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts =
|
||||
if cfg.upsd.listen == []
|
||||
then [ defaultPort ]
|
||||
else unique (forEach cfg.upsd.listen (listen: listen.port));
|
||||
};
|
||||
|
||||
systemd.services.upsmon = let
|
||||
secrets = mapAttrsToList (name: monitor: "upsmon_password_${name}") cfg.upsmon.monitor;
|
||||
createUpsmonConf = installSecrets upsmonConf "/run/nut/upsmon.conf" secrets;
|
||||
in {
|
||||
enable = cfg.upsmon.enable;
|
||||
description = "Uninterruptible Power Supplies (Monitor)";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "forking";
|
||||
script = "${pkgs.nut}/sbin/upsmon";
|
||||
environment.NUT_CONFPATH = "/etc/nut/";
|
||||
environment.NUT_STATEPATH = "/var/lib/nut/";
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
ExecStartPre = "${createUpsmonConf}";
|
||||
ExecStart = "${pkgs.nut}/sbin/upsmon";
|
||||
ExecReload = "${pkgs.nut}/sbin/upsmon -c reload";
|
||||
LoadCredential = mapAttrsToList (name: monitor: "upsmon_password_${name}:${monitor.passwordFile}") cfg.upsmon.monitor;
|
||||
};
|
||||
environment.NUT_CONFPATH = "/etc/nut";
|
||||
environment.NUT_STATEPATH = "/var/lib/nut";
|
||||
};
|
||||
|
||||
systemd.services.upsd = {
|
||||
systemd.services.upsd = let
|
||||
secrets = mapAttrsToList (name: user: "upsdusers_password_${name}") cfg.users;
|
||||
createUpsdUsers = installSecrets upsdUsers "/run/nut/upsd.users" secrets;
|
||||
in {
|
||||
enable = cfg.upsd.enable;
|
||||
description = "Uninterruptible Power Supplies (Daemon)";
|
||||
after = [ "network.target" "upsmon.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "forking";
|
||||
# TODO: replace 'root' by another username.
|
||||
script = "${pkgs.nut}/sbin/upsd -u root";
|
||||
environment.NUT_CONFPATH = "/etc/nut/";
|
||||
environment.NUT_STATEPATH = "/var/lib/nut/";
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
ExecStartPre = "${createUpsdUsers}";
|
||||
# TODO: replace 'root' by another username.
|
||||
ExecStart = "${pkgs.nut}/sbin/upsd -u root";
|
||||
ExecReload = "${pkgs.nut}/sbin/upsd -c reload";
|
||||
LoadCredential = mapAttrsToList (name: user: "upsdusers_password_${name}:${user.passwordFile}") cfg.users;
|
||||
};
|
||||
environment.NUT_CONFPATH = "/etc/nut";
|
||||
environment.NUT_STATEPATH = "/var/lib/nut";
|
||||
restartTriggers = [
|
||||
config.environment.etc."nut/upsd.conf".source
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.upsdrv = {
|
||||
enable = cfg.upsd.enable;
|
||||
description = "Uninterruptible Power Supplies (Register all UPS)";
|
||||
after = [ "upsd.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
# TODO: replace 'root' by another username.
|
||||
script = "${pkgs.nut}/bin/upsdrvctl -u root start";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
# TODO: replace 'root' by another username.
|
||||
ExecStart = "${pkgs.nut}/bin/upsdrvctl -u root start";
|
||||
};
|
||||
environment.NUT_CONFPATH = "/etc/nut/";
|
||||
environment.NUT_STATEPATH = "/var/lib/nut/";
|
||||
environment.NUT_CONFPATH = "/etc/nut";
|
||||
environment.NUT_STATEPATH = "/var/lib/nut";
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
@ -223,24 +571,23 @@ in
|
||||
''
|
||||
maxstartdelay = ${toString cfg.maxStartDelay}
|
||||
|
||||
${flip concatStringsSep (forEach (attrValues cfg.ups) (ups: ups.summary)) "
|
||||
|
||||
"}
|
||||
${concatStringsSep "\n\n" (forEach (attrValues cfg.ups) (ups: ups.summary))}
|
||||
'';
|
||||
"nut/upsd.conf".source = pkgs.writeText "upsd.conf"
|
||||
''
|
||||
${concatStringsSep "\n" (forEach cfg.upsd.listen (listen: "LISTEN ${listen.address} ${toString listen.port}"))}
|
||||
${cfg.upsd.extraConfig}
|
||||
'';
|
||||
"nut/upssched.conf".source = cfg.schedulerRules;
|
||||
# These file are containing private information and thus should not
|
||||
# be stored inside the Nix store.
|
||||
/*
|
||||
"nut/upsd.conf".source = "";
|
||||
"nut/upsd.users".source = "";
|
||||
"nut/upsmon.conf".source = "";
|
||||
*/
|
||||
"nut/upsd.users".source = "/run/nut/upsd.users";
|
||||
"nut/upsmon.conf".source = "/run/nut/upsmon.conf";
|
||||
};
|
||||
|
||||
power.ups.schedulerRules = mkDefault "${pkgs.nut}/etc/upssched.conf.sample";
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/state/ups -"
|
||||
"d /var/lib/nut 700"
|
||||
];
|
||||
|
||||
|
||||
|
@ -3,6 +3,12 @@ with lib;
|
||||
let
|
||||
cfg = config.services.hound;
|
||||
in {
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "services" "hound" "extraGroups" ] "Use users.users.hound.extraGroups instead")
|
||||
];
|
||||
|
||||
meta.maintainers = with maintainers; [ SuperSandro2000 ];
|
||||
|
||||
options = {
|
||||
services.hound = {
|
||||
enable = mkOption {
|
||||
@ -13,6 +19,8 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOptionMD pkgs "hound" { };
|
||||
|
||||
user = mkOption {
|
||||
default = "hound";
|
||||
type = types.str;
|
||||
@ -29,27 +37,15 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
extraGroups = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
example = [ "dialout" ];
|
||||
description = lib.mdDoc ''
|
||||
List of extra groups that the "hound" user should be a part of.
|
||||
'';
|
||||
};
|
||||
|
||||
home = mkOption {
|
||||
default = "/var/lib/hound";
|
||||
type = types.path;
|
||||
description = lib.mdDoc ''
|
||||
The path to use as hound's $HOME. If the default user
|
||||
"hound" is configured then this is the home of the "hound"
|
||||
user.
|
||||
The path to use as hound's $HOME.
|
||||
If the default user "hound" is configured then this is the home of the "hound" user.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "hound" { };
|
||||
|
||||
config = mkOption {
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
@ -57,63 +53,62 @@ in {
|
||||
should be an absolute path to a writable location on disk.
|
||||
'';
|
||||
example = literalExpression ''
|
||||
'''
|
||||
{
|
||||
"max-concurrent-indexers" : 2,
|
||||
"dbpath" : "''${services.hound.home}/data",
|
||||
"repos" : {
|
||||
"nixpkgs": {
|
||||
"url" : "https://www.github.com/NixOS/nixpkgs.git"
|
||||
}
|
||||
}
|
||||
{
|
||||
"max-concurrent-indexers" : 2,
|
||||
"repos" : {
|
||||
"nixpkgs": {
|
||||
"url" : "https://www.github.com/NixOS/nixpkgs.git"
|
||||
}
|
||||
}
|
||||
'''
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
listen = mkOption {
|
||||
type = types.str;
|
||||
default = "0.0.0.0:6080";
|
||||
example = "127.0.0.1:6080 or just :6080";
|
||||
example = ":6080";
|
||||
description = lib.mdDoc ''
|
||||
Listen on this IP:port / :port
|
||||
Listen on this [IP]:port
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.groups = optionalAttrs (cfg.group == "hound") {
|
||||
hound.gid = config.ids.gids.hound;
|
||||
users.groups = lib.mkIf (cfg.group == "hound") {
|
||||
hound = { };
|
||||
};
|
||||
|
||||
users.users = optionalAttrs (cfg.user == "hound") {
|
||||
users.users = lib.mkIf (cfg.user == "hound") {
|
||||
hound = {
|
||||
description = "hound code search";
|
||||
description = "Hound code search";
|
||||
createHome = true;
|
||||
home = cfg.home;
|
||||
group = cfg.group;
|
||||
extraGroups = cfg.extraGroups;
|
||||
uid = config.ids.uids.hound;
|
||||
isSystemUser = true;
|
||||
inherit (cfg) home group;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.hound = {
|
||||
systemd.services.hound = let
|
||||
configFile = pkgs.writeTextFile {
|
||||
name = "hound.json";
|
||||
text = cfg.config;
|
||||
checkPhase = ''
|
||||
# check if the supplied text is valid json
|
||||
${lib.getExe pkgs.jq} . $target > /dev/null
|
||||
'';
|
||||
};
|
||||
in {
|
||||
description = "Hound Code Search";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
WorkingDirectory = cfg.home;
|
||||
ExecStartPre = "${pkgs.git}/bin/git config --global --replace-all http.sslCAinfo /etc/ssl/certs/ca-certificates.crt";
|
||||
ExecStart = "${cfg.package}/bin/houndd" +
|
||||
" -addr ${cfg.listen}" +
|
||||
" -conf ${pkgs.writeText "hound.json" cfg.config}";
|
||||
|
||||
ExecStart = "${cfg.package}/bin/houndd -addr ${cfg.listen} -conf ${configFile}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ with lib;
|
||||
let
|
||||
clamavUser = "clamav";
|
||||
stateDir = "/var/lib/clamav";
|
||||
runDir = "/run/clamav";
|
||||
clamavGroup = clamavUser;
|
||||
cfg = config.services.clamav;
|
||||
pkg = pkgs.clamav;
|
||||
@ -99,6 +98,29 @@ in
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
scanner = {
|
||||
enable = mkEnableOption (lib.mdDoc "ClamAV scanner");
|
||||
|
||||
interval = mkOption {
|
||||
type = types.str;
|
||||
default = "*-*-* 04:00:00";
|
||||
description = lib.mdDoc ''
|
||||
How often clamdscan is invoked. See systemd.time(7) for more
|
||||
information about the format.
|
||||
By default this runs using 10 cores at most, be sure to run it at a time of low traffic.
|
||||
'';
|
||||
};
|
||||
|
||||
scanDirectories = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [ "/home" "/var/lib" "/tmp" "/etc" "/var/tmp" ];
|
||||
description = lib.mdDoc ''
|
||||
List of directories to scan.
|
||||
The default includes everything I could think of that is valid for nixos. Feel free to contribute a PR to add to the default if you see something missing.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -117,9 +139,8 @@ in
|
||||
|
||||
services.clamav.daemon.settings = {
|
||||
DatabaseDirectory = stateDir;
|
||||
LocalSocket = "${runDir}/clamd.ctl";
|
||||
PidFile = "${runDir}/clamd.pid";
|
||||
TemporaryDirectory = "/tmp";
|
||||
LocalSocket = "/run/clamav/clamd.ctl";
|
||||
PidFile = "/run/clamav/clamd.pid";
|
||||
User = "clamav";
|
||||
Foreground = true;
|
||||
};
|
||||
@ -182,7 +203,6 @@ in
|
||||
ExecStart = "${pkg}/bin/freshclam";
|
||||
SuccessExitStatus = "1"; # if databases are up to date
|
||||
StateDirectory = "clamav";
|
||||
RuntimeDirectory = "clamav";
|
||||
User = clamavUser;
|
||||
Group = clamavGroup;
|
||||
PrivateTmp = "yes";
|
||||
@ -204,7 +224,6 @@ in
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
StateDirectory = "clamav";
|
||||
RuntimeDirectory = "clamav";
|
||||
User = clamavUser;
|
||||
Group = clamavGroup;
|
||||
PrivateTmp = "yes";
|
||||
@ -230,12 +249,31 @@ in
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.fangfrisch}/bin/fangfrisch --conf ${fangfrischConfigFile} refresh";
|
||||
StateDirectory = "clamav";
|
||||
RuntimeDirectory = "clamav";
|
||||
User = clamavUser;
|
||||
Group = clamavGroup;
|
||||
PrivateTmp = "yes";
|
||||
PrivateDevices = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.clamdscan = mkIf cfg.scanner.enable {
|
||||
description = "Timer for ClamAV virus scanner";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = cfg.scanner.interval;
|
||||
Unit = "clamdscan.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.clamdscan = mkIf cfg.scanner.enable {
|
||||
description = "ClamAV virus scanner";
|
||||
after = optionals cfg.updater.enable [ "clamav-freshclam.service" ];
|
||||
wants = optionals cfg.updater.enable [ "clamav-freshclam.service" ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkg}/bin/clamdscan --multiscan --fdpass --infected --allmatch ${lib.concatStringsSep " " cfg.scanner.scanDirectories}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
177
nixos/modules/services/web-apps/windmill.nix
Normal file
177
nixos/modules/services/web-apps/windmill.nix
Normal file
@ -0,0 +1,177 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.windmill;
|
||||
in
|
||||
{
|
||||
options.services.windmill = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "windmill service");
|
||||
|
||||
serverPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8001;
|
||||
description = lib.mdDoc "Port the windmill server listens on.";
|
||||
};
|
||||
|
||||
lspPort = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 3001;
|
||||
description = lib.mdDoc "Port the windmill lsp listens on.";
|
||||
};
|
||||
|
||||
database = {
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
# the simplest database setup is to have the database named like the user.
|
||||
default = "windmill";
|
||||
description = lib.mdDoc "Database name.";
|
||||
};
|
||||
|
||||
user = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
# the simplest database setup is to have the database user like the name.
|
||||
default = "windmill";
|
||||
description = lib.mdDoc "Database user.";
|
||||
};
|
||||
|
||||
urlPath = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = lib.mdDoc ''
|
||||
Path to the file containing the database url windmill should connect to. This is not deducted from database user and name as it might contain a secret
|
||||
'';
|
||||
example = "config.age.secrets.DATABASE_URL_FILE.path";
|
||||
};
|
||||
createLocally = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = lib.mdDoc "Whether to create a local database automatically.";
|
||||
};
|
||||
};
|
||||
|
||||
baseUrl = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = lib.mdDoc ''
|
||||
The base url that windmill will be served on.
|
||||
'';
|
||||
example = "https://windmill.example.com";
|
||||
};
|
||||
|
||||
logLevel = lib.mkOption {
|
||||
type = lib.types.enum [ "error" "warn" "info" "debug" "trace" ];
|
||||
default = "info";
|
||||
description = lib.mdDoc "Log level";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
services.postgresql = lib.optionalAttrs (cfg.database.createLocally) {
|
||||
enable = lib.mkDefault true;
|
||||
|
||||
ensureDatabases = [ cfg.database.name ];
|
||||
ensureUsers = [
|
||||
{ name = cfg.database.user;
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
systemd.services =
|
||||
let
|
||||
serviceConfig = {
|
||||
DynamicUser = true;
|
||||
# using the same user to simplify db connection
|
||||
User = cfg.database.user;
|
||||
ExecStart = "${pkgs.windmill}/bin/windmill";
|
||||
|
||||
Restart = "always";
|
||||
LoadCredential = [
|
||||
"DATABASE_URL_FILE:${cfg.database.urlPath}"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
# coming from https://github.com/windmill-labs/windmill/blob/main/init-db-as-superuser.sql
|
||||
# modified to not grant priviledges on all tables
|
||||
# create role windmill_user and windmill_admin only if they don't exist
|
||||
postgresql.postStart = lib.mkIf cfg.database.createLocally (lib.mkAfter ''
|
||||
$PSQL -tA <<"EOF"
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT FROM pg_catalog.pg_roles
|
||||
WHERE rolname = 'windmill_user'
|
||||
) THEN
|
||||
CREATE ROLE windmill_user;
|
||||
GRANT ALL PRIVILEGES ON DATABASE ${cfg.database.name} TO windmill_user;
|
||||
ELSE
|
||||
RAISE NOTICE 'Role "windmill_user" already exists. Skipping.';
|
||||
END IF;
|
||||
IF NOT EXISTS (
|
||||
SELECT FROM pg_catalog.pg_roles
|
||||
WHERE rolname = 'windmill_admin'
|
||||
) THEN
|
||||
CREATE ROLE windmill_admin WITH BYPASSRLS;
|
||||
GRANT windmill_user TO windmill_admin;
|
||||
ELSE
|
||||
RAISE NOTICE 'Role "windmill_admin" already exists. Skipping.';
|
||||
END IF;
|
||||
GRANT windmill_admin TO windmill;
|
||||
END
|
||||
$$;
|
||||
EOF
|
||||
'');
|
||||
|
||||
windmill-server = {
|
||||
description = "Windmill server";
|
||||
after = [ "network.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = serviceConfig // { StateDirectory = "windmill";};
|
||||
|
||||
environment = {
|
||||
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
|
||||
PORT = builtins.toString cfg.serverPort;
|
||||
WM_BASE_URL = cfg.baseUrl;
|
||||
RUST_LOG = cfg.logLevel;
|
||||
MODE = "server";
|
||||
};
|
||||
};
|
||||
|
||||
windmill-worker = {
|
||||
description = "Windmill worker";
|
||||
after = [ "network.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = serviceConfig // { StateDirectory = "windmill-worker";};
|
||||
|
||||
environment = {
|
||||
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
|
||||
WM_BASE_URL = cfg.baseUrl;
|
||||
RUST_LOG = cfg.logLevel;
|
||||
MODE = "worker";
|
||||
WORKER_GROUP = "default";
|
||||
KEEP_JOB_DIR = "false";
|
||||
};
|
||||
};
|
||||
|
||||
windmill-worker-native = {
|
||||
description = "Windmill worker native";
|
||||
after = [ "network.target" ] ++ lib.optional cfg.database.createLocally "postgresql.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = serviceConfig // { StateDirectory = "windmill-worker-native";};
|
||||
|
||||
environment = {
|
||||
DATABASE_URL_FILE = "%d/DATABASE_URL_FILE";
|
||||
WM_BASE_URL = cfg.baseUrl;
|
||||
RUST_LOG = cfg.logLevel;
|
||||
MODE = "worker";
|
||||
WORKER_GROUP = "native";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1612,7 +1612,7 @@ let
|
||||
description = lib.mdDoc ''
|
||||
Each attribute in this set specifies an option in the
|
||||
`[WireGuardPeer]` section of the unit. See
|
||||
{manpage}`systemd.network(5)` for details.
|
||||
{manpage}`systemd.netdev(5)` for details.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ import ./make-test-python.nix (
|
||||
{
|
||||
name = "zammad";
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ garbas taeer n0emis ];
|
||||
meta.maintainers = with lib.maintainers; [ taeer n0emis netali ];
|
||||
|
||||
nodes.machine = { config, ... }: {
|
||||
services.zammad.enable = true;
|
||||
@ -44,9 +44,10 @@ import ./make-test-python.nix (
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_unit("redis-zammad.service")
|
||||
machine.wait_for_unit("zammad-web.service")
|
||||
machine.wait_for_unit("zammad-websocket.service")
|
||||
machine.wait_for_unit("zammad-scheduler.service")
|
||||
machine.wait_for_unit("zammad-worker.service")
|
||||
# wait for zammad to fully come up
|
||||
machine.sleep(120)
|
||||
|
||||
|
@ -22,13 +22,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lightdm-slick-greeter";
|
||||
version = "2.0.0";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = "slick-greeter";
|
||||
rev = version;
|
||||
sha256 = "sha256-2iwH8npCfo4z1K4WQNP2Pd32PJTkCX/rT0+1RTrBO8E=";
|
||||
sha256 = "sha256-Tyyhsel4yWfp8Npn9vERtd+9jzxdvjsj91ebEnvA/D0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
172
pkgs/applications/editors/jetbrains/bin/ides.json
Normal file
172
pkgs/applications/editors/jetbrains/bin/ides.json
Normal file
@ -0,0 +1,172 @@
|
||||
{
|
||||
"clion": {
|
||||
"product": "CLion",
|
||||
"wmClass": "jetbrains-clion",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "C/C++ IDE from JetBrains",
|
||||
"maintainers": [ "edwtjo", "mic92", "tymscar" ],
|
||||
"longDescription": "Enhancing productivity for every C and C++ developer on Linux, macOS and Windows.",
|
||||
"homepage": "https://www.jetbrains.com/clion/"
|
||||
}
|
||||
},
|
||||
"datagrip": {
|
||||
"product": "DataGrip",
|
||||
"wmClass": "jetbrains-datagrip",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Database IDE from JetBrains",
|
||||
"maintainers": [ ],
|
||||
"longDescription": "DataGrip is a new IDE from JetBrains built for database admins. It allows you to quickly migrate and refactor relational databases, construct efficient, statically checked SQL queries and much more.",
|
||||
"homepage": "https://www.jetbrains.com/datagrip/"
|
||||
}
|
||||
},
|
||||
"dataspell": {
|
||||
"product": "DataSpell",
|
||||
"wmClass": "jetbrains-dataspell",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Data science IDE from JetBrains",
|
||||
"maintainers": [ "leona" ],
|
||||
"longDescription": "DataSpell is a new IDE from JetBrains built for Data Scientists. Mainly it integrates Jupyter notebooks in the IntelliJ platform.",
|
||||
"homepage": "https://www.jetbrains.com/dataspell/"
|
||||
}
|
||||
},
|
||||
"gateway": {
|
||||
"product": "JetBrains Gateway",
|
||||
"productShort": "Gateway",
|
||||
"wmClass": "jetbrains-gateway",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Remote development for JetBrains products",
|
||||
"maintainers": [ ],
|
||||
"longDescription": "JetBrains Gateway is a lightweight launcher that connects a remote server with your local machine, downloads necessary components on the backend, and opens your project in JetBrains Client.",
|
||||
"homepage": "https://www.jetbrains.com/remote-development/gateway/"
|
||||
}
|
||||
},
|
||||
"goland": {
|
||||
"product": "Goland",
|
||||
"wmClass": "jetbrains-goland",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Go IDE from JetBrains",
|
||||
"maintainers": [ "tymscar" ],
|
||||
"longDescription": "Goland is the codename for a new commercial IDE by JetBrains aimed at providing an ergonomic environment for Go development.\n The new IDE extends the IntelliJ platform with the coding assistance and tool integrations specific for the Go language",
|
||||
"homepage": "https://www.jetbrains.com/go/"
|
||||
}
|
||||
},
|
||||
"idea-community": {
|
||||
"product": "IntelliJ IDEA CE",
|
||||
"productShort": "IDEA",
|
||||
"wmClass": "jetbrains-idea-ce",
|
||||
"meta": {
|
||||
"isOpenSource": true,
|
||||
"description": "Free Java, Kotlin, Groovy and Scala IDE from jetbrains",
|
||||
"maintainers": [ "edwtjo", "gytis-ivaskevicius", "steinybot", "AnatolyPopov", "tymscar" ],
|
||||
"longDescription": "IDE for Java SE, Groovy & Scala development Powerful environment for building Google Android apps Integration with JUnit, TestNG, popular SCMs, Ant & Maven. Also known as IntelliJ.",
|
||||
"homepage": "https://www.jetbrains.com/idea/"
|
||||
}
|
||||
},
|
||||
"idea-ultimate": {
|
||||
"product": "IntelliJ IDEA",
|
||||
"productShort": "IDEA",
|
||||
"wmClass": "jetbrains-idea",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Paid-for Java, Kotlin, Groovy and Scala IDE from jetbrains",
|
||||
"maintainers": [ "edwtjo", "gytis-ivaskevicius", "steinybot", "AnatolyPopov", "tymscar" ],
|
||||
"longDescription": "IDE for Java SE, Groovy & Scala development Powerful environment for building Google Android apps Integration with JUnit, TestNG, popular SCMs, Ant & Maven. Also known as IntelliJ.",
|
||||
"homepage": "https://www.jetbrains.com/idea/"
|
||||
}
|
||||
},
|
||||
"mps": {
|
||||
"product": "MPS",
|
||||
"wmClass": "jetbrains-MPS",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "IDE for building domain-specific languages from JetBrains",
|
||||
"maintainers": [ "rasendubi" ],
|
||||
"longDescription": "A metaprogramming system which uses projectional editing which allows users to overcome the limits of language parsers, and build DSL editors, such as ones with tables and diagrams.",
|
||||
"homepage": "https://www.jetbrains.com/mps/"
|
||||
}
|
||||
},
|
||||
"phpstorm": {
|
||||
"product": "PhpStorm",
|
||||
"wmClass": "jetbrains-phpstorm",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "PHP IDE from JetBrains",
|
||||
"maintainers": [ "dritter", "tymscar" ],
|
||||
"longDescription": "PhpStorm provides an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code. ",
|
||||
"homepage": "https://www.jetbrains.com/phpstorm/"
|
||||
}
|
||||
},
|
||||
"pycharm-community": {
|
||||
"product": "PyCharm CE",
|
||||
"productShort": "PyCharm",
|
||||
"wmClass": "jetbrains-pycharm-ce",
|
||||
"meta": {
|
||||
"isOpenSource": true,
|
||||
"description": "Free Python IDE from JetBrains",
|
||||
"maintainers": [ "genericnerdyusername", "tymscar" ],
|
||||
"longDescription": "Python IDE with complete set of tools for productive development with Python programming language. In addition, the IDE provides high-class capabilities for professional Web development with Django framework and Google App Engine. It has powerful coding assistance, navigation, a lot of refactoring features, tight integration with various Version Control Systems, Unit testing, powerful all-singing all-dancing Debugger and entire customization. PyCharm is developer driven IDE. It was developed with the aim of providing you almost everything you need for your comfortable and productive development!",
|
||||
"homepage": "https://www.jetbrains.com/pycharm/"
|
||||
}
|
||||
},
|
||||
"pycharm-professional": {
|
||||
"product": "PyCharm",
|
||||
"productShort": "PyCharm",
|
||||
"wmClass": "jetbrains-pycharm",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Paid-for Python IDE from JetBrains",
|
||||
"maintainers": [ "genericnerdyusername", "tymscar" ],
|
||||
"longDescription": "Python IDE with complete set of tools for productive development with Python programming language. In addition, the IDE provides high-class capabilities for professional Web development with Django framework and Google App Engine. It has powerful coding assistance, navigation, a lot of refactoring features, tight integration with various Version Control Systems, Unit testing, powerful all-singing all-dancing Debugger and entire customization. PyCharm is developer driven IDE. It was developed with the aim of providing you almost everything you need for your comfortable and productive development!",
|
||||
"homepage": "https://www.jetbrains.com/pycharm/"
|
||||
}
|
||||
},
|
||||
"rider": {
|
||||
"product": "Rider",
|
||||
"wmClass": "jetbrains-rider",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": ".NET IDE from JetBrains",
|
||||
"maintainers": [ "raphaelr" ],
|
||||
"longDescription": "JetBrains Rider is a new .NET IDE based on the IntelliJ platform and ReSharper. Rider supports .NET Core, .NET Framework and Mono based projects. This lets you develop a wide array of applications including .NET desktop apps, services and libraries, Unity games, ASP.NET and ASP.NET Core web applications.",
|
||||
"homepage": "https://www.jetbrains.com/rider/"
|
||||
}
|
||||
},
|
||||
"ruby-mine": {
|
||||
"product": "RubyMine",
|
||||
"wmClass": "jetbrains-rubymine",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Ruby IDE from JetBrains",
|
||||
"maintainers": [ "edwtjo", "tymscar"],
|
||||
"longDescription": "Ruby IDE from JetBrains",
|
||||
"homepage": "https://www.jetbrains.com/ruby/"
|
||||
}
|
||||
},
|
||||
"rust-rover": {
|
||||
"product": "RustRover",
|
||||
"wmClass": "jetbrains-rustrover",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Rust IDE from JetBrains",
|
||||
"maintainers": [ "genericnerdyusername"],
|
||||
"longDescription": "Rust IDE from JetBrains",
|
||||
"homepage": "https://www.jetbrains.com/rust/"
|
||||
}
|
||||
},
|
||||
"webstorm": {
|
||||
"product": "WebStorm",
|
||||
"wmClass": "jetbrains-webstorm",
|
||||
"meta": {
|
||||
"isOpenSource": false,
|
||||
"description": "Web IDE from JetBrains",
|
||||
"maintainers": [ "abaldeau", "tymscar"],
|
||||
"longDescription": "WebStorm provides an editor for HTML, JavaScript (incl. Node.js), and CSS with on-the-fly code analysis, error prevention and automated refactorings for JavaScript code.",
|
||||
"homepage": "https://www.jetbrains.com/webstorm/"
|
||||
}
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@
|
||||
, udev
|
||||
, e2fsprogs
|
||||
, python3
|
||||
, autoPatchelfHook
|
||||
, vmopts ? null
|
||||
}:
|
||||
|
||||
@ -26,8 +27,11 @@
|
||||
, buildNumber
|
||||
, jdk
|
||||
, meta
|
||||
, libdbm
|
||||
, fsnotifier
|
||||
, extraLdPath ? [ ]
|
||||
, extraWrapperArgs ? [ ]
|
||||
, extraBuildInputs ? [ ]
|
||||
}@args:
|
||||
|
||||
let
|
||||
@ -56,38 +60,16 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||
|
||||
vmoptsFile = lib.optionalString (vmopts != null) (writeText vmoptsName vmopts);
|
||||
|
||||
nativeBuildInputs = [ makeWrapper patchelf unzip ];
|
||||
nativeBuildInputs = [ makeWrapper patchelf unzip autoPatchelfHook ];
|
||||
buildInputs = extraBuildInputs;
|
||||
|
||||
postPatch = ''
|
||||
get_file_size() {
|
||||
local fname="$1"
|
||||
echo $(ls -l $fname | cut -d ' ' -f5)
|
||||
}
|
||||
|
||||
munge_size_hack() {
|
||||
local fname="$1"
|
||||
local size="$2"
|
||||
strip $fname
|
||||
truncate --size=$size $fname
|
||||
}
|
||||
|
||||
rm -rf jbr
|
||||
# When using the IDE as a remote backend using gateway, it expects the jbr directory to contain the jdk
|
||||
ln -s ${jdk.home} jbr
|
||||
|
||||
interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
|
||||
if [[ "${stdenv.hostPlatform.system}" == "x86_64-linux" && -e bin/fsnotifier64 ]]; then
|
||||
target_size=$(get_file_size bin/fsnotifier64)
|
||||
patchelf --set-interpreter "$interpreter" bin/fsnotifier64
|
||||
munge_size_hack bin/fsnotifier64 $target_size
|
||||
else
|
||||
target_size=$(get_file_size bin/fsnotifier)
|
||||
patchelf --set-interpreter "$interpreter" bin/fsnotifier
|
||||
munge_size_hack bin/fsnotifier $target_size
|
||||
fi
|
||||
|
||||
if [ -d "plugins/remote-dev-server" ]; then
|
||||
patch -p1 < ${./JetbrainsRemoteDev.patch}
|
||||
patch -p1 < ${../patches/jetbrains-remote-dev.patch}
|
||||
fi
|
||||
|
||||
vmopts_file=bin/linux/${vmoptsName}
|
||||
@ -109,18 +91,19 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/{bin,$pname,share/pixmaps,libexec/${pname},share/icons/hicolor/scalable/apps}
|
||||
mkdir -p $out/{bin,$pname,share/pixmaps,share/icons/hicolor/scalable/apps}
|
||||
cp -a . $out/$pname
|
||||
[[ -f $out/$pname/bin/${loName}.png ]] && ln -s $out/$pname/bin/${loName}.png $out/share/pixmaps/${pname}.png
|
||||
[[ -f $out/$pname/bin/${loName}.svg ]] && ln -s $out/$pname/bin/${loName}.svg $out/share/pixmaps/${pname}.svg \
|
||||
&& ln -s $out/$pname/bin/${loName}.svg $out/share/icons/hicolor/scalable/apps/${pname}.svg
|
||||
mv bin/fsnotifier* $out/libexec/${pname}/.
|
||||
cp ${libdbm}/lib/libdbm.so $out/$pname/bin/libdbm.so
|
||||
cp ${fsnotifier}/bin/fsnotifier $out/$pname/bin/fsnotifier
|
||||
|
||||
jdk=${jdk.home}
|
||||
item=${desktopItem}
|
||||
|
||||
wrapProgram "$out/$pname/bin/${loName}.sh" \
|
||||
--prefix PATH : "$out/libexec/${pname}:${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--prefix PATH : "${lib.makeBinPath [ jdk coreutils gnugrep which git ]}" \
|
||||
--suffix PATH : "${lib.makeBinPath [ python3 ]}" \
|
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath extraLdPath}" \
|
||||
${lib.concatStringsSep " " extraWrapperArgs} \
|
||||
@ -132,6 +115,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
|
||||
--set-default ${hiName}_VM_OPTIONS ${vmoptsFile}
|
||||
|
||||
ln -s "$out/$pname/bin/${loName}.sh" $out/bin/$pname
|
||||
rm -rf $out/$pname/plugins/remote-dev-server/selfcontained/
|
||||
echo -e '#!/usr/bin/env bash\n'"$out/$pname/bin/remote-dev-server.sh"' "$@"' > $out/$pname/bin/remote-dev-server-wrapped.sh
|
||||
chmod +x $out/$pname/bin/remote-dev-server-wrapped.sh
|
||||
ln -s "$out/$pname/bin/remote-dev-server-wrapped.sh" $out/bin/$pname-remote-dev-server
|
@ -126,6 +126,6 @@ logging.info("#### Committing changes... ####")
|
||||
subprocess.run(['git', 'commit', f'-m{commitMessage}', '--', f'{versions_file_path}'], check=True)
|
||||
|
||||
logging.info("#### Updating plugins ####")
|
||||
plugin_script = current_path.joinpath("plugins/update_plugins.py").resolve()
|
||||
plugin_script = current_path.joinpath("../plugins/update_plugins.py").resolve()
|
||||
subprocess.call(plugin_script)
|
||||
|
@ -2,245 +2,86 @@
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchurl
|
||||
|
||||
, jdk
|
||||
, cmake
|
||||
, gdb
|
||||
, zlib
|
||||
, python3
|
||||
, lldb
|
||||
, dotnet-sdk_7
|
||||
, maven
|
||||
, autoPatchelfHook
|
||||
, libdbusmenu
|
||||
, patchelf
|
||||
, openssl
|
||||
, expat
|
||||
, libxcrypt
|
||||
, libxcrypt-legacy
|
||||
, fontconfig
|
||||
, libxml2
|
||||
, runCommand
|
||||
, musl
|
||||
, R
|
||||
, libgcc
|
||||
, lttng-ust_2_12
|
||||
, xz
|
||||
|
||||
, vmopts ? null
|
||||
}:
|
||||
|
||||
let
|
||||
platforms = lib.platforms.linux ++ [ "x86_64-darwin" "aarch64-darwin" ];
|
||||
ideaPlatforms = [ "x86_64-darwin" "i686-darwin" "i686-linux" "x86_64-linux" "aarch64-darwin" "aarch64-linux" ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
||||
versions = builtins.fromJSON (lib.readFile (./versions.json));
|
||||
# `ides.json` is handwritten and contains information that doesn't change across updates, like maintainers and other metadata
|
||||
# `versions.json` contains everything generated/needed by the update script version numbers, build numbers and tarball hashes
|
||||
ideInfo = lib.importJSON ./bin/ides.json;
|
||||
versions = lib.importJSON ./bin/versions.json;
|
||||
products = versions.${system} or (throw "Unsupported system: ${system}");
|
||||
|
||||
package = if stdenv.isDarwin then ./darwin.nix else ./linux.nix;
|
||||
mkJetBrainsProduct = callPackage package { inherit vmopts; };
|
||||
package = if stdenv.isDarwin then ./bin/darwin.nix else ./bin/linux.nix;
|
||||
mkJetBrainsProductCore = callPackage package { inherit vmopts; };
|
||||
mkMeta = meta: fromSource: {
|
||||
inherit (meta) homepage longDescription;
|
||||
description = meta.description + lib.optionalString meta.isOpenSource (if fromSource then " (built from source)" else " (patched binaries from jetbrains)");
|
||||
maintainers = map (x: lib.maintainers."${x}") meta.maintainers;
|
||||
license = if meta.isOpenSource then lib.licenses.asl20 else lib.licenses.unfree;
|
||||
};
|
||||
|
||||
# Sorted alphabetically
|
||||
|
||||
buildClion = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "CLion";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/clion/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Enhancing productivity for every C and C++
|
||||
developer on Linux, macOS and Windows.
|
||||
'';
|
||||
maintainers = with maintainers; [ edwtjo tymscar ];
|
||||
mkJetBrainsProduct =
|
||||
{ pname
|
||||
, fromSource ? false
|
||||
, extraWrapperArgs ? [ ]
|
||||
, extraLdPath ? [ ]
|
||||
, extraBuildInputs ? [ ]
|
||||
}:
|
||||
mkJetBrainsProductCore {
|
||||
inherit pname jdk extraWrapperArgs extraLdPath extraBuildInputs;
|
||||
src = if fromSource then communitySources."${pname}" else
|
||||
fetchurl {
|
||||
url = products."${pname}".url;
|
||||
sha256 = products."${pname}".sha256;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||
autoPatchelfHook
|
||||
];
|
||||
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||
python3
|
||||
stdenv.cc.cc
|
||||
libdbusmenu
|
||||
openssl.out
|
||||
expat
|
||||
libxcrypt-legacy
|
||||
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||
libxml2
|
||||
xz
|
||||
];
|
||||
dontAutoPatchelf = true;
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||
(
|
||||
cd $out/clion
|
||||
inherit (products."${pname}") version;
|
||||
buildNumber = products."${pname}".build_number;
|
||||
inherit (ideInfo."${pname}") wmClass product;
|
||||
productShort = ideInfo."${pname}".productShort or ideInfo."${pname}".product;
|
||||
meta = mkMeta ideInfo."${pname}".meta fromSource;
|
||||
libdbm = if ideInfo."${pname}".meta.isOpenSource then communitySources."${pname}".libdbm else communitySources.idea-community.libdbm;
|
||||
fsnotifier = if ideInfo."${pname}".meta.isOpenSource then communitySources."${pname}".fsnotifier else communitySources.idea-community.fsnotifier;
|
||||
};
|
||||
|
||||
# I think the included gdb has a couple of patches, so we patch it instead of replacing
|
||||
ls -d $PWD/bin/gdb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
communitySources = callPackage ./source { };
|
||||
|
||||
ls -d $PWD/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
autoPatchelf $PWD/bin
|
||||
)
|
||||
'';
|
||||
});
|
||||
|
||||
buildDataGrip = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "DataGrip";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/datagrip/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
DataGrip is a new IDE from JetBrains built for database admins.
|
||||
It allows you to quickly migrate and refactor relational databases,
|
||||
construct efficient, statically checked SQL queries and much more.
|
||||
'';
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
});
|
||||
|
||||
buildDataSpell = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "DataSpell";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/dataspell/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
DataSpell is a new IDE from JetBrains built for Data Scientists.
|
||||
Mainly it integrates Jupyter notebooks in the IntelliJ platform.
|
||||
'';
|
||||
maintainers = with maintainers; [ leona ];
|
||||
};
|
||||
});
|
||||
|
||||
buildGateway = { pname, version, src, license, description, wmClass, buildNumber, product, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber product;
|
||||
productShort = "Gateway";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/remote-development/gateway/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
JetBrains Gateway is a lightweight launcher that connects a remote
|
||||
server with your local machine, downloads necessary components on the
|
||||
backend, and opens your project in JetBrains Client.
|
||||
'';
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
});
|
||||
|
||||
buildGoland = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "Goland";
|
||||
extraWrapperArgs = [
|
||||
# fortify source breaks build since delve compiles with -O0
|
||||
''--prefix CGO_CPPFLAGS " " "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"''
|
||||
];
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/go/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Goland is the codename for a new commercial IDE by JetBrains
|
||||
aimed at providing an ergonomic environment for Go development.
|
||||
The new IDE extends the IntelliJ platform with the coding assistance
|
||||
and tool integrations specific for the Go language
|
||||
'';
|
||||
maintainers = with maintainers; [ tymscar ];
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
|
||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||
patchelf --set-interpreter $interp $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
|
||||
chmod +x $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
|
||||
'';
|
||||
});
|
||||
|
||||
buildIdea = { pname, version, src, license, description, wmClass, buildNumber, product, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber product;
|
||||
productShort = "IDEA";
|
||||
buildIdea = args:
|
||||
mkJetBrainsProduct (args // {
|
||||
extraLdPath = [ zlib ];
|
||||
extraWrapperArgs = [
|
||||
''--set M2_HOME "${maven}/maven"''
|
||||
''--set M2 "${maven}/maven/bin"''
|
||||
];
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/idea/";
|
||||
inherit description license;
|
||||
longDescription = ''
|
||||
IDE for Java SE, Groovy & Scala development Powerful
|
||||
environment for building Google Android apps Integration
|
||||
with JUnit, TestNG, popular SCMs, Ant & Maven. Also known
|
||||
as IntelliJ.
|
||||
'';
|
||||
maintainers = with maintainers; [ edwtjo gytis-ivaskevicius steinybot AnatolyPopov tymscar ];
|
||||
platforms = ideaPlatforms;
|
||||
};
|
||||
});
|
||||
|
||||
buildMps = { pname, version, src, license, description, wmClass, product, buildNumber, ... }:
|
||||
(mkJetBrainsProduct rec {
|
||||
inherit pname version src wmClass jdk buildNumber product;
|
||||
productShort = "MPS";
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
homepage = "https://www.jetbrains.com/mps/";
|
||||
inherit license description platforms;
|
||||
longDescription = ''
|
||||
A metaprogramming system which uses projectional editing
|
||||
which allows users to overcome the limits of language
|
||||
parsers, and build DSL editors, such as ones with tables and
|
||||
diagrams.
|
||||
'';
|
||||
maintainers = with maintainers; [ rasendubi ];
|
||||
};
|
||||
});
|
||||
|
||||
buildPhpStorm = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "PhpStorm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/phpstorm/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
PhpStorm provides an editor for PHP, HTML and JavaScript
|
||||
with on-the-fly code analysis, error prevention and
|
||||
automated refactorings for PHP and JavaScript code.
|
||||
'';
|
||||
maintainers = with maintainers; [ dritter tymscar ];
|
||||
};
|
||||
});
|
||||
|
||||
buildPycharm = { pname, version, src, license, description, wmClass, buildNumber, product, cythonSpeedup ? stdenv.isLinux, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber product;
|
||||
productShort = "PyCharm";
|
||||
meta = with lib; {
|
||||
broken = (stdenv.isLinux && stdenv.isAarch64);
|
||||
homepage = "https://www.jetbrains.com/pycharm/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
Python IDE with complete set of tools for productive
|
||||
development with Python programming language. In addition, the
|
||||
IDE provides high-class capabilities for professional Web
|
||||
development with Django framework and Google App Engine. It
|
||||
has powerful coding assistance, navigation, a lot of
|
||||
refactoring features, tight integration with various Version
|
||||
Control Systems, Unit testing, powerful all-singing
|
||||
all-dancing Debugger and entire customization. PyCharm is
|
||||
developer driven IDE. It was developed with the aim of
|
||||
providing you almost everything you need for your comfortable
|
||||
and productive development!
|
||||
'';
|
||||
maintainers = with maintainers; [ genericnerdyusername tymscar ];
|
||||
};
|
||||
}).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs cythonSpeedup {
|
||||
buildInputs = with python3.pkgs; [ python3 setuptools ];
|
||||
buildPycharm = args:
|
||||
(mkJetBrainsProduct args).overrideAttrs (finalAttrs: previousAttrs: lib.optionalAttrs stdenv.isLinux {
|
||||
buildInputs = with python3.pkgs; (previousAttrs.buildInputs or []) ++ [ python3 setuptools ];
|
||||
preInstall = ''
|
||||
echo "compiling cython debug speedups"
|
||||
if [[ -d plugins/python-ce ]]; then
|
||||
@ -252,43 +93,112 @@ let
|
||||
# See https://www.jetbrains.com/help/pycharm/2022.1/cython-speedups.html
|
||||
});
|
||||
|
||||
buildRider = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "Rider";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/rider/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
JetBrains Rider is a new .NET IDE based on the IntelliJ
|
||||
platform and ReSharper. Rider supports .NET Core,
|
||||
.NET Framework and Mono based projects. This lets you
|
||||
develop a wide array of applications including .NET desktop
|
||||
apps, services and libraries, Unity games, ASP.NET and
|
||||
ASP.NET Core web applications.
|
||||
'';
|
||||
maintainers = with maintainers; [ raphaelr ];
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||
autoPatchelfHook
|
||||
];
|
||||
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||
in
|
||||
rec {
|
||||
# Sorted alphabetically
|
||||
|
||||
clion = (mkJetBrainsProduct {
|
||||
pname = "clion";
|
||||
extraBuildInputs = lib.optionals (stdenv.isLinux) [
|
||||
python3
|
||||
stdenv.cc.cc
|
||||
openssl
|
||||
libxcrypt-legacy
|
||||
musl
|
||||
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||
expat
|
||||
libxml2
|
||||
xz
|
||||
];
|
||||
}).overrideAttrs (attrs: {
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||
(
|
||||
cd $out/clion
|
||||
|
||||
# I think the included gdb has a couple of patches, so we patch it instead of replacing
|
||||
ls -d $PWD/bin/gdb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
ls -d $PWD/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
)
|
||||
'';
|
||||
});
|
||||
|
||||
datagrip = mkJetBrainsProduct { pname = "datagrip"; };
|
||||
|
||||
dataspell = let
|
||||
libr = runCommand "libR" {} ''
|
||||
mkdir -p $out/lib
|
||||
ln -s ${R}/lib/R/lib/libR.so $out/lib/libR.so
|
||||
'';
|
||||
in mkJetBrainsProduct {
|
||||
pname = "dataspell";
|
||||
extraBuildInputs = [ libgcc libr stdenv.cc.cc ];
|
||||
};
|
||||
|
||||
gateway = mkJetBrainsProduct { pname = "gateway"; };
|
||||
|
||||
goland = (mkJetBrainsProduct {
|
||||
pname = "goland";
|
||||
extraWrapperArgs = [
|
||||
# fortify source breaks build since delve compiles with -O0
|
||||
''--prefix CGO_CPPFLAGS " " "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"''
|
||||
];
|
||||
extraBuildInputs = [ libgcc ];
|
||||
}).overrideAttrs
|
||||
(attrs: {
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString stdenv.isLinux ''
|
||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||
patchelf --set-interpreter $interp $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
|
||||
chmod +x $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
|
||||
'';
|
||||
});
|
||||
|
||||
idea-community-bin = buildIdea { pname = "idea-community"; extraBuildInputs = [ stdenv.cc.cc ]; };
|
||||
|
||||
idea-community-src = buildIdea { pname = "idea-community"; extraBuildInputs = [ stdenv.cc.cc ]; fromSource = true; };
|
||||
|
||||
idea-community = if stdenv.isDarwin || stdenv.isAarch64 then idea-community-bin else idea-community-src;
|
||||
|
||||
idea-ultimate = buildIdea { pname = "idea-ultimate"; extraBuildInputs = [ stdenv.cc.cc lldb musl ]; };
|
||||
|
||||
mps = mkJetBrainsProduct { pname = "mps"; };
|
||||
|
||||
phpstorm = mkJetBrainsProduct { pname = "phpstorm"; extraBuildInputs = [ stdenv.cc.cc musl ]; };
|
||||
|
||||
pycharm-community-bin = buildPycharm { pname = "pycharm-community"; };
|
||||
|
||||
pycharm-community-src = buildPycharm { pname = "pycharm-community"; fromSource = true; };
|
||||
|
||||
pycharm-community = if stdenv.isDarwin then pycharm-community-bin else pycharm-community-src;
|
||||
|
||||
pycharm-professional = buildPycharm { pname = "pycharm-professional"; extraBuildInputs = [ musl ]; };
|
||||
|
||||
rider = (mkJetBrainsProduct {
|
||||
pname = "rider";
|
||||
extraBuildInputs = [
|
||||
fontconfig
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
fontconfig # plugins/dotTrace/DotFiles/linux-*/libSkiaSharp.so
|
||||
openssl
|
||||
libxcrypt
|
||||
lttng-ust_2_12
|
||||
musl
|
||||
];
|
||||
dontAutoPatchelf = true;
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||
}).overrideAttrs (attrs: {
|
||||
postInstall = (attrs.postInstall or "") + lib.optionalString (stdenv.isLinux) ''
|
||||
(
|
||||
cd $out/rider
|
||||
|
||||
# Remove dotnet copy first so it's not considered by autoPatchElf
|
||||
rm -rf lib/ReSharperHost/linux-*/dotnet
|
||||
autoPatchelf \
|
||||
lib/ReSharperHost/linux-*/ \
|
||||
plugins/dotCommon/DotFiles/linux-*/ \
|
||||
plugins/dotTrace/DotFiles/linux-*/
|
||||
ls -d $PWD/plugins/cidr-debugger-plugin/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so \
|
||||
--replace-needed libcrypt.so.1 libcrypt.so
|
||||
|
||||
for dir in lib/ReSharperHost/linux-*; do
|
||||
ln -s ${dotnet-sdk_7} $dir/dotnet
|
||||
@ -297,303 +207,43 @@ let
|
||||
'';
|
||||
});
|
||||
|
||||
buildRubyMine = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "RubyMine";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/ruby/";
|
||||
inherit description license platforms;
|
||||
longDescription = description;
|
||||
maintainers = with maintainers; [ edwtjo tymscar ];
|
||||
};
|
||||
});
|
||||
ruby-mine = mkJetBrainsProduct { pname = "ruby-mine"; extraBuildInputs = [ stdenv.cc.cc musl ]; };
|
||||
|
||||
buildRustRover = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "RustRover";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/rust/";
|
||||
inherit description license platforms;
|
||||
longDescription = description;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||
autoPatchelfHook
|
||||
];
|
||||
buildInputs = (attrs.buildInputs or [ ]) ++ lib.optionals (stdenv.isLinux) [
|
||||
python3
|
||||
stdenv.cc.cc
|
||||
libdbusmenu
|
||||
openssl.out
|
||||
libxcrypt-legacy
|
||||
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||
expat
|
||||
libxml2
|
||||
xz
|
||||
];
|
||||
dontAutoPatchelf = true;
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||
(
|
||||
cd $out/rust-rover
|
||||
|
||||
# Copied over from clion (gdb seems to have a couple of patches)
|
||||
ls -d $PWD/bin/gdb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
ls -d $PWD/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
autoPatchelf $PWD/bin
|
||||
|
||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||
patchelf --set-interpreter $interp $PWD/plugins/intellij-rust/bin/linux/*/intellij-rust-native-helper
|
||||
chmod +x $PWD/plugins/intellij-rust/bin/linux/*/intellij-rust-native-helper
|
||||
)
|
||||
'';
|
||||
});
|
||||
|
||||
buildWebStorm = { pname, version, src, license, description, wmClass, buildNumber, ... }:
|
||||
(mkJetBrainsProduct {
|
||||
inherit pname version src wmClass jdk buildNumber;
|
||||
product = "WebStorm";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.jetbrains.com/webstorm/";
|
||||
inherit description license platforms;
|
||||
longDescription = ''
|
||||
WebStorm provides an editor for HTML, JavaScript (incl. Node.js),
|
||||
and CSS with on-the-fly code analysis, error prevention and
|
||||
automated refactorings for JavaScript code.
|
||||
'';
|
||||
maintainers = with maintainers; [ abaldeau tymscar ];
|
||||
};
|
||||
});
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
# Sorted alphabetically
|
||||
|
||||
clion = buildClion rec {
|
||||
pname = "clion";
|
||||
version = products.clion.version;
|
||||
buildNumber = products.clion.build_number;
|
||||
description = "C/C++ IDE. New. Intelligent. Cross-platform";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.clion.url;
|
||||
sha256 = products.clion.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-clion";
|
||||
update-channel = products.clion.update-channel;
|
||||
};
|
||||
|
||||
datagrip = buildDataGrip rec {
|
||||
pname = "datagrip";
|
||||
version = products.datagrip.version;
|
||||
buildNumber = products.datagrip.build_number;
|
||||
description = "Your Swiss Army Knife for Databases and SQL";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.datagrip.url;
|
||||
sha256 = products.datagrip.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-datagrip";
|
||||
update-channel = products.datagrip.update-channel;
|
||||
};
|
||||
|
||||
dataspell = buildDataSpell rec {
|
||||
pname = "dataspell";
|
||||
version = products.dataspell.version;
|
||||
buildNumber = products.dataspell.build_number;
|
||||
description = "The IDE for Professional Data Scientists";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.dataspell.url;
|
||||
sha256 = products.dataspell.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-dataspell";
|
||||
update-channel = products.dataspell.update-channel;
|
||||
};
|
||||
|
||||
gateway = buildGateway rec {
|
||||
pname = "gateway";
|
||||
product = "JetBrains Gateway";
|
||||
version = products.gateway.version;
|
||||
buildNumber = products.gateway.build_number;
|
||||
description = "Your single entry point to all remote development environments";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.gateway.url;
|
||||
sha256 = products.gateway.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-gateway";
|
||||
update-channel = products.gateway.update-channel;
|
||||
};
|
||||
|
||||
goland = buildGoland rec {
|
||||
pname = "goland";
|
||||
version = products.goland.version;
|
||||
buildNumber = products.goland.build_number;
|
||||
description = "Up and Coming Go IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.goland.url;
|
||||
sha256 = products.goland.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-goland";
|
||||
update-channel = products.goland.update-channel;
|
||||
};
|
||||
|
||||
idea-community = buildIdea rec {
|
||||
pname = "idea-community";
|
||||
product = "IntelliJ IDEA CE";
|
||||
version = products.idea-community.version;
|
||||
buildNumber = products.idea-community.build_number;
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = products.idea-community.url;
|
||||
sha256 = products.idea-community.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-idea-ce";
|
||||
update-channel = products.idea-community.update-channel;
|
||||
};
|
||||
|
||||
idea-ultimate = buildIdea rec {
|
||||
pname = "idea-ultimate";
|
||||
product = "IntelliJ IDEA";
|
||||
version = products.idea-ultimate.version;
|
||||
buildNumber = products.idea-ultimate.build_number;
|
||||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.idea-ultimate.url;
|
||||
sha256 = products.idea-ultimate.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-idea";
|
||||
update-channel = products.idea-ultimate.update-channel;
|
||||
};
|
||||
|
||||
mps = buildMps rec {
|
||||
pname = "mps";
|
||||
product = "MPS ${products.mps.version}";
|
||||
version = products.mps.version;
|
||||
buildNumber = products.mps.build_number;
|
||||
description = "Create your own domain-specific language";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = products.mps.url;
|
||||
sha256 = products.mps.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-mps";
|
||||
update-channel = products.mps.update-channel;
|
||||
};
|
||||
|
||||
phpstorm = buildPhpStorm rec {
|
||||
pname = "phpstorm";
|
||||
version = products.phpstorm.version;
|
||||
buildNumber = products.phpstorm.build_number;
|
||||
description = "Professional IDE for Web and PHP developers";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.phpstorm.url;
|
||||
sha256 = products.phpstorm.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-phpstorm";
|
||||
update-channel = products.phpstorm.update-channel;
|
||||
};
|
||||
|
||||
pycharm-community = buildPycharm rec {
|
||||
pname = "pycharm-community";
|
||||
product = "PyCharm CE";
|
||||
version = products.pycharm-community.version;
|
||||
buildNumber = products.pycharm-community.build_number;
|
||||
description = "PyCharm Community Edition";
|
||||
license = lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = products.pycharm-community.url;
|
||||
sha256 = products.pycharm-community.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-pycharm-ce";
|
||||
update-channel = products.pycharm-community.update-channel;
|
||||
};
|
||||
|
||||
pycharm-professional = buildPycharm rec {
|
||||
pname = "pycharm-professional";
|
||||
product = "PyCharm";
|
||||
version = products.pycharm-professional.version;
|
||||
buildNumber = products.pycharm-community.build_number;
|
||||
description = "PyCharm Professional Edition";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.pycharm-professional.url;
|
||||
sha256 = products.pycharm-professional.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-pycharm";
|
||||
update-channel = products.pycharm-professional.update-channel;
|
||||
};
|
||||
|
||||
rider = buildRider rec {
|
||||
pname = "rider";
|
||||
version = products.rider.version;
|
||||
buildNumber = products.rider.build_number;
|
||||
description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.rider.url;
|
||||
sha256 = products.rider.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rider";
|
||||
update-channel = products.rider.update-channel;
|
||||
};
|
||||
|
||||
ruby-mine = buildRubyMine rec {
|
||||
pname = "ruby-mine";
|
||||
version = products.ruby-mine.version;
|
||||
buildNumber = products.ruby-mine.build_number;
|
||||
description = "The Most Intelligent Ruby and Rails IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.ruby-mine.url;
|
||||
sha256 = products.ruby-mine.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rubymine";
|
||||
update-channel = products.ruby-mine.update-channel;
|
||||
};
|
||||
|
||||
rust-rover = buildRustRover rec {
|
||||
rust-rover = (mkJetBrainsProduct {
|
||||
pname = "rust-rover";
|
||||
version = products.rust-rover.version;
|
||||
buildNumber = products.rust-rover.build_number;
|
||||
description = "Rust IDE";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.rust-rover.url;
|
||||
sha256 = products.rust-rover.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-rustrover";
|
||||
update-channel = products.rust-rover.update-channel;
|
||||
};
|
||||
extraBuildInputs = lib.optionals (stdenv.isLinux) [
|
||||
python3
|
||||
openssl
|
||||
libxcrypt-legacy
|
||||
] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
|
||||
expat
|
||||
libxml2
|
||||
xz
|
||||
];
|
||||
}).overrideAttrs (attrs: {
|
||||
postFixup = (attrs.postFixup or "") + lib.optionalString (stdenv.isLinux) ''
|
||||
(
|
||||
cd $out/rust-rover
|
||||
|
||||
webstorm = buildWebStorm rec {
|
||||
pname = "webstorm";
|
||||
version = products.webstorm.version;
|
||||
buildNumber = products.webstorm.build_number;
|
||||
description = "Professional IDE for Web and JavaScript development";
|
||||
license = lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = products.webstorm.url;
|
||||
sha256 = products.webstorm.sha256;
|
||||
};
|
||||
wmClass = "jetbrains-webstorm";
|
||||
update-channel = products.webstorm.update-channel;
|
||||
};
|
||||
# Copied over from clion (gdb seems to have a couple of patches)
|
||||
ls -d $PWD/bin/gdb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
ls -d $PWD/bin/lldb/linux/*/lib/python3.8/lib-dynload/* |
|
||||
xargs patchelf \
|
||||
--replace-needed libssl.so.10 libssl.so \
|
||||
--replace-needed libcrypto.so.10 libcrypto.so
|
||||
|
||||
interp="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
||||
patchelf --set-interpreter $interp $PWD/plugins/intellij-rust/bin/linux/*/intellij-rust-native-helper
|
||||
chmod +x $PWD/plugins/intellij-rust/bin/linux/*/intellij-rust-native-helper
|
||||
)
|
||||
'';
|
||||
});
|
||||
|
||||
webstorm = mkJetBrainsProduct { pname = "webstorm"; extraBuildInputs = [ stdenv.cc.cc musl ]; };
|
||||
|
||||
plugins = callPackage ./plugins { };
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
--- a/src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt
|
||||
+++ b/src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt
|
||||
@@ -14,19 +14,7 @@
|
||||
"https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies"
|
||||
|
||||
fun downloadAndExtractKotlinCompiler(communityRoot: BuildDependenciesCommunityRoot): Path {
|
||||
- // We already have kotlin JPS in the classpath, fetch version from it
|
||||
- val kotlincVersion = javaClass.classLoader.getResourceAsStream("META-INF/compiler.version")
|
||||
- .use { inputStream -> inputStream!!.readAllBytes().decodeToString() }
|
||||
- info("Kotlin compiler version is $kotlincVersion")
|
||||
-
|
||||
- val kotlincUrl = getUriForMavenArtifact(
|
||||
- KOTLIN_IDE_MAVEN_REPOSITORY_URL,
|
||||
- "org.jetbrains.kotlin",
|
||||
- "kotlin-dist-for-ide",
|
||||
- kotlincVersion,
|
||||
- "jar")
|
||||
- val kotlincDist = downloadFileToCacheLocation(communityRoot, kotlincUrl)
|
||||
- val kotlinc = extractFileToCacheLocation(communityRoot, kotlincDist)
|
||||
+ val kotlinc = Path.of("KOTLIN_PATH_HERE")
|
||||
verbose("Kotlin compiler is at $kotlinc")
|
||||
return kotlinc
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@
|
||||
project(dbm)
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
-include (CheckCXXCompilerFlag)
|
||||
+include(CheckCXXCompilerFlag)
|
||||
|
||||
check_cxx_compiler_flag(-fvisibility=hidden __DBUSMENU_HAVE_GCC_VISIBILITY)
|
||||
if (__DBUSMENU_HAVE_GCC_VISIBILITY AND NOT WIN32)
|
||||
@@ -19,27 +19,13 @@
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
endif (__DBUSMENU_HAVE_W_ALL)
|
||||
|
||||
-
|
||||
-find_library(LIB_GLIB NAMES glib libglib libglib-2.0.so.0)
|
||||
-MESSAGE("LIB_GLIB: " ${LIB_GLIB})
|
||||
-
|
||||
-find_library(LIB_GIO NAMES libgio-2.0.so.0)
|
||||
-MESSAGE("LIB_GIO: " ${LIB_GIO})
|
||||
-
|
||||
-find_library(LIB_GOBJ NAMES libgobject-2.0.so.0)
|
||||
-MESSAGE("LIB_GOBJ: " ${LIB_GOBJ})
|
||||
+find_package(PkgConfig REQUIRED)
|
||||
+pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
+pkg_search_module(LIBDBUSMENU REQUIRED dbusmenu-glib-0.4)
|
||||
|
||||
# use patched library, you may build it from https://github.com/JetBrains/libdbusmenu
|
||||
set(LIB_DBUSMENU "${PROJECT_SOURCE_DIR}/libdbusmenu-glib.a")
|
||||
|
||||
-set(GLIB_INCLUDE_DIRS /usr/include/glib-2.0 /usr/lib64/glib-2.0/include)
|
||||
-set(DBUSMENU_GLIB_INCLUDE_DIRS /usr/include/libdbusmenu-glib-0.4)
|
||||
-
|
||||
-include_directories(
|
||||
- ${GLIB_INCLUDE_DIRS}
|
||||
- ${DBUSMENU_GLIB_INCLUDE_DIRS}
|
||||
-)
|
||||
-
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
@@ -47,7 +33,8 @@
|
||||
set(SOURCE_FILES DbusMenuWrapper.c)
|
||||
|
||||
add_library(dbm SHARED ${SOURCE_FILES})
|
||||
-target_link_libraries(dbm ${LIB_GLIB} ${LIB_GIO} ${LIB_DBUSMENU} ${LIB_GOBJ})
|
||||
+target_link_libraries(dbm ${LIB_DBUSMENU} ${GLIB_LDFLAGS})
|
||||
+include_directories(dbm ${GLIB_INCLUDE_DIRS} ${LIBDBUSMENU_INCLUDE_DIRS})
|
||||
|
||||
if (TESTS_ENABLED)
|
||||
find_library(LIB_GTK NAMES libgtk-3.so)
|
128
pkgs/applications/editors/jetbrains/patches/no-download.patch
Normal file
128
pkgs/applications/editors/jetbrains/patches/no-download.patch
Normal file
@ -0,0 +1,128 @@
|
||||
--- a/build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
|
||||
+++ b/build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
|
||||
@@ -87,13 +87,13 @@
|
||||
}
|
||||
val targetFile = root.resolve("${split[1]}-${split[2]}.jar")
|
||||
val uri = BuildDependenciesDownloader.getUriForMavenArtifact(
|
||||
- mavenRepository = BuildDependenciesConstants.MAVEN_CENTRAL_URL,
|
||||
+ mavenRepository = "MAVEN_REPO_HERE",
|
||||
groupId = split[0],
|
||||
artifactId = split[1],
|
||||
version = split[2],
|
||||
packaging = "jar"
|
||||
)
|
||||
- targetFile to downloadFileToCacheLocation(uri.toString(), communityRoot)
|
||||
+ targetFile to Path.of(uri.toString())
|
||||
}
|
||||
}
|
||||
}.asSequence().map { it.getCompleted() }.toMap()
|
||||
@@ -133,21 +133,6 @@
|
||||
}
|
||||
|
||||
suspend fun downloadMavenDistribution(communityRoot: BuildDependenciesCommunityRoot): Path {
|
||||
- val extractDir = communityRoot.communityRoot.resolve("plugins/maven/maven36-server-impl/lib/maven3")
|
||||
- val properties = BuildDependenciesDownloader.getDependenciesProperties(communityRoot)
|
||||
- val bundledMavenVersion = properties.property("bundledMavenVersion")
|
||||
- mutex.withLock {
|
||||
- val uri = BuildDependenciesDownloader.getUriForMavenArtifact(
|
||||
- mavenRepository = BuildDependenciesConstants.MAVEN_CENTRAL_URL,
|
||||
- groupId = "org.apache.maven",
|
||||
- artifactId = "apache-maven",
|
||||
- version = bundledMavenVersion,
|
||||
- classifier = "bin",
|
||||
- packaging = "zip"
|
||||
- )
|
||||
- val zipPath = downloadFileToCacheLocation(uri.toString(), communityRoot)
|
||||
- BuildDependenciesDownloader.extractFile(zipPath, extractDir, communityRoot, BuildDependenciesExtractOptions.STRIP_ROOT)
|
||||
- }
|
||||
- return extractDir
|
||||
+ return Path.of("MAVEN_PATH_HERE")
|
||||
}
|
||||
}
|
||||
--- a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
|
||||
+++ b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
|
||||
@@ -25,11 +25,7 @@
|
||||
}
|
||||
|
||||
fun getJdkHome(communityRoot: BuildDependenciesCommunityRoot, os: OS, arch: Arch, infoLog: (String) -> Unit): Path {
|
||||
- val jdkUrl = getUrl(communityRoot, os, arch)
|
||||
- val jdkArchive = BuildDependenciesDownloader.downloadFileToCacheLocation(communityRoot, jdkUrl)
|
||||
- val jdkExtracted = BuildDependenciesDownloader.extractFileToCacheLocation(
|
||||
- communityRoot, jdkArchive, BuildDependenciesExtractOptions.STRIP_ROOT)
|
||||
- infoLog("jps-bootstrap JDK is at $jdkExtracted")
|
||||
+ val jdkExtracted = Path.of("JDK_PATH_HERE")
|
||||
|
||||
val jdkHome: Path = if (os == OS.MACOSX) {
|
||||
jdkExtracted.resolve("Contents").resolve("Home")
|
||||
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt
|
||||
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt
|
||||
@@ -43,12 +43,12 @@
|
||||
/**
|
||||
* If `true` a separate *-no-jbr.tar.gz artifact without runtime will be produced.
|
||||
*/
|
||||
- var buildTarGzWithoutBundledRuntime = false
|
||||
+ var buildTarGzWithoutBundledRuntime = true
|
||||
|
||||
/**
|
||||
* If `true`, the only *-no-jbr.tar.gz will be produced, no other binaries for Linux will be built.
|
||||
*/
|
||||
- var buildOnlyBareTarGz = false
|
||||
+ var buildOnlyBareTarGz = true
|
||||
|
||||
/**
|
||||
* Set both properties if a .snap package should be produced.
|
||||
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
|
||||
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
|
||||
@@ -11,6 +11,7 @@
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Path
|
||||
import java.util.*
|
||||
+import kotlin.io.path.readText
|
||||
|
||||
private const val MARKETPLACE_BROKEN_PLUGINS_URL = "https://plugins.jetbrains.com/files/brokenPlugins.json"
|
||||
|
||||
@@ -22,7 +23,7 @@
|
||||
|
||||
val allBrokenPlugins = try {
|
||||
val jsonFormat = Json { ignoreUnknownKeys = true }
|
||||
- val content = downloadAsText(MARKETPLACE_BROKEN_PLUGINS_URL)
|
||||
+ val content = Path.of("BROKEN_PLUGINS_HERE").readText()
|
||||
jsonFormat.decodeFromString(ListSerializer(MarketplaceBrokenPlugin.serializer()), content)
|
||||
}
|
||||
catch (e: Exception) {
|
||||
--- a/platform/build-scripts/src/org/jetbrains/intellij/build/kotlin/KotlinCompilerDependencyDownloader.kt
|
||||
+++ b/platform/build-scripts/src/org/jetbrains/intellij/build/kotlin/KotlinCompilerDependencyDownloader.kt
|
||||
@@ -23,31 +23,11 @@
|
||||
|
||||
object KotlinCompilerDependencyDownloader {
|
||||
fun downloadAndExtractKotlinCompiler(communityRoot: BuildDependenciesCommunityRoot): Path {
|
||||
- val kotlinJpsPluginVersion = getKotlinJpsPluginVersion(communityRoot)
|
||||
- val kotlinDistUrl = getUriForMavenArtifact(MAVEN_REPOSITORY_URL, ARTIFACT_GROUP_ID, "kotlin-dist-for-ide", kotlinJpsPluginVersion, "jar")
|
||||
- val kotlinDistJar = downloadFileToCacheLocation(communityRoot, kotlinDistUrl)
|
||||
- return extractFileToCacheLocation(communityRoot, kotlinDistJar)
|
||||
+ return Path.of("KOTLIN_PATH_HERE")
|
||||
}
|
||||
|
||||
suspend fun downloadKotlinJpsPlugin(communityRoot: BuildDependenciesCommunityRoot): Path = withContext(Dispatchers.IO) {
|
||||
- val kotlinJpsPluginVersion = getKotlinJpsPluginVersion(communityRoot)
|
||||
- val kotlinJpsPluginUrl = getUriForMavenArtifact(MAVEN_REPOSITORY_URL, ARTIFACT_GROUP_ID, "kotlin-jps-plugin-classpath", kotlinJpsPluginVersion, "jar")
|
||||
-
|
||||
- val cacheLocation = getTargetFile(communityRoot, kotlinJpsPluginUrl.toString())
|
||||
- if (cacheLocation.exists()) {
|
||||
- return@withContext cacheLocation
|
||||
- }
|
||||
-
|
||||
- // Download file by hand since calling entire ktor/cio/coroutines stuff *before* loading JPS plugin into classpath
|
||||
- // leads to funny kotlin-reflect failures later in Kotlin JPS plugin
|
||||
- // Ideal solution would be to move compilation to other process altogether and do not modify current process classpath
|
||||
- println(" * Downloading $kotlinJpsPluginUrl")
|
||||
- val tmpLocation = Files.createTempFile(cacheLocation.parent, cacheLocation.name, ".tmp")
|
||||
- suspendingRetryWithExponentialBackOff {
|
||||
- FileUtils.copyURLToFile(kotlinJpsPluginUrl.toURL(), tmpLocation.toFile())
|
||||
- }
|
||||
- Files.move(tmpLocation, cacheLocation, StandardCopyOption.ATOMIC_MOVE)
|
||||
- return@withContext cacheLocation
|
||||
+ return@withContext Path.of("JPS_PLUGIN_CLASSPATH_HERE")
|
||||
}
|
||||
|
||||
fun getKotlinJpsPluginVersion(communityRoot: BuildDependenciesCommunityRoot): String {
|
@ -0,0 +1,41 @@
|
||||
--- a/python/build/src/PyCharmCommunityInstallersBuildTarget.kt
|
||||
+++ b/python/build/src/PyCharmCommunityInstallersBuildTarget.kt
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runBlocking
|
||||
+import org.jetbrains.intellij.build.BuildOptions
|
||||
import org.jetbrains.intellij.build.BuildTasks
|
||||
import org.jetbrains.intellij.build.IdeaProjectLoaderUtil
|
||||
import org.jetbrains.intellij.build.impl.BuildContextImpl
|
||||
+import org.jetbrains.intellij.build.pycharm.PyCharmBuildUtils
|
||||
import org.jetbrains.intellij.build.pycharm.PyCharmCommunityProperties
|
||||
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
@@ -12,13 +14,26 @@
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
runBlocking(Dispatchers.Default) {
|
||||
+ val options = BuildOptions().apply {
|
||||
+ // we cannot provide consistent build number for PyCharm Community if it's built separately so use *.SNAPSHOT number to avoid confusion
|
||||
+ buildNumber = null
|
||||
+
|
||||
+ // do not bother external users about clean/incremental
|
||||
+ // just remove out/ directory for clean build
|
||||
+ incrementalCompilation = true
|
||||
+ useCompiledClassesFromProjectOutput = false
|
||||
+ buildStepsToSkip.addAll(listOf(
|
||||
+ BuildOptions.MAC_SIGN_STEP,
|
||||
+ ))
|
||||
+ }
|
||||
val communityHome = IdeaProjectLoaderUtil.guessCommunityHome(javaClass)
|
||||
val context = BuildContextImpl.createContext(
|
||||
communityHome = communityHome,
|
||||
projectHome = communityHome.communityRoot,
|
||||
productProperties = PyCharmCommunityProperties(communityHome.communityRoot),
|
||||
+ options = options,
|
||||
)
|
||||
BuildTasks.create(context).buildDistributions()
|
||||
}
|
||||
}
|
||||
}
|
@ -112,7 +112,7 @@ rec {
|
||||
sed "s|${ide.outPath}|$out|" \
|
||||
-i $(realpath $out/bin/${meta.mainProgram}) \
|
||||
-i $(realpath $out/bin/${meta.mainProgram}-remote-dev-server)
|
||||
autoPatchelf $out/${meta.mainProgram}/bin
|
||||
autoPatchelf $out
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -24,4 +24,6 @@
|
||||
paths = builtins.concatStringsSep " " ides;
|
||||
in
|
||||
writeText "jb-ides" paths;
|
||||
|
||||
clion-with-vim = jetbrains.plugins.addPlugins jetbrains.clion [ "ideavim" ];
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ TOKENS = {
|
||||
}
|
||||
SNAPSHOT_VALUE = 99999
|
||||
PLUGINS_FILE = Path(__file__).parent.joinpath("plugins.json").resolve()
|
||||
IDES_FILE = Path(__file__).parent.joinpath("../versions.json").resolve()
|
||||
IDES_FILE = Path(__file__).parent.joinpath("../bin/versions.json").resolve()
|
||||
# The plugin compatibility system uses a different naming scheme to the ide update system.
|
||||
# These dicts convert between them
|
||||
FRIENDLY_TO_PLUGIN = {
|
||||
|
65
pkgs/applications/editors/jetbrains/readme.md
Normal file
65
pkgs/applications/editors/jetbrains/readme.md
Normal file
@ -0,0 +1,65 @@
|
||||
This directory contains the build expressions needed to build any of the jetbrains IDEs.
|
||||
The jdk is in `pkgs/development/compilers/jetbrains-jdk`.
|
||||
To test the build process of every IDE (as well as the process for adding plugins), build `jetbrains.plugins.tests.default`.
|
||||
|
||||
## How to use plugins:
|
||||
- Get the ide you want and call `jetbrains.plugins.addPlugins` with a list of plugins you want to add.
|
||||
- The list of plugins can be a list of ids or names (as in `plugins/plugins.json`)
|
||||
- Example: `jetbrains.plugins.addPlugins jetbrains.pycharm-professional [ "nixidea" ]`
|
||||
- The list can also contain a drv giving a `.jar` or `.zip` (this is how you use a plugin not added to nixpkgs)
|
||||
|
||||
### How to add a new plugin to nixpkgs
|
||||
- Find the page for the plugin on https://plugins.jetbrains.com
|
||||
- Find the id (it's the number after https://plugins.jetbrains.com/plugin/)
|
||||
- Run `plugins/update_plugins.py` add (plugin id)
|
||||
- If binaries need patch or some other special treatment, add an entry to `plugins/specialPlugins.nix`
|
||||
|
||||
## How to update stuff:
|
||||
- Run ./bin/update_bin.py
|
||||
- This will update binary IDEs and plugins, and automatically commit them
|
||||
- Source builds need a bit more effort, as they aren't automated at the moment:
|
||||
- Find the build of the stable release you want to target (usually different for pycharm and idea, should have three components)
|
||||
- I find this at https://jetbrains.com/updates/updates.xml (search for `fullNumber`)
|
||||
- Update the `buildVer` field in source/default.nix
|
||||
- Empty the `ideaHash`, `androidHash` and `jpsHash` (only `ideaHash` changes on a regular basis) fields and try to build to get the new hashes
|
||||
- Run `nix build .#jetbrains.(idea/pycharm)-community-source.src`, then `./source/build_maven.py source/idea_maven_artefacts.json result/`
|
||||
- Update `source/brokenPlugins.json` (from https://plugins.jetbrains.com/files/brokenPlugins.json)
|
||||
- Do a test build
|
||||
- If it succeeds, make a PR/merge
|
||||
- If it fails, ping/message GenericNerdyUsername
|
||||
|
||||
## How to add an IDE:
|
||||
- Make dummy entries in `bin/versions.json` (make sure to set the version to something older than the real one)
|
||||
- Run `bin/update_bin.py`
|
||||
- Add an entry in `bin/ides.json`
|
||||
- Add an entry in `default.nix`
|
||||
|
||||
### TODO:
|
||||
- move/copy plugin docs to nixpkgs manual
|
||||
- replace `libxcrypt-legacy` with `libxcrypt` when supported
|
||||
- make `jetbrains-remote-dev.patch` cleaner
|
||||
- is extraLdPath needed for IDEA?
|
||||
- set meta.sourceProvenance for everything
|
||||
- from source builds:
|
||||
- remove timestamps in output `.jar` of `jps-bootstrap`
|
||||
- automated update scripts
|
||||
- fetch `.jar` s from stuff built in nixpkgs when available
|
||||
- what stuff built in nixpkgs provides `.jar`s we care about?
|
||||
- kotlin
|
||||
- make `configurePhase` respect `$NIX_BUILD_CORES`
|
||||
- make the subdir of the resulting tar.gz always have a release number (2023.2.2) instead of a build number (232.9921.89)
|
||||
- jdk:
|
||||
- build on darwin
|
||||
- use chromium stuff built by nixpkgs for jcef?
|
||||
- make `buildPhase` respect `$NIX_BUILD_CORES`
|
||||
- automated update script?
|
||||
- on `aarch64-linux`:
|
||||
- test plugins
|
||||
- from source build
|
||||
- see if build (binary or source) works without expat
|
||||
- on `x86_64-darwin`:
|
||||
- test plugins
|
||||
- from source build
|
||||
- on `aarch64-darwin`:
|
||||
- test plugins
|
||||
- from source build
|
File diff suppressed because one or more lines are too long
264
pkgs/applications/editors/jetbrains/source/build.nix
Normal file
264
pkgs/applications/editors/jetbrains/source/build.nix
Normal file
@ -0,0 +1,264 @@
|
||||
{ fetchFromGitHub
|
||||
, fetchurl
|
||||
, lib
|
||||
, linkFarm
|
||||
, makeWrapper
|
||||
, runCommand
|
||||
, stdenv
|
||||
, stdenvNoCC
|
||||
|
||||
, ant
|
||||
, cmake
|
||||
, glib
|
||||
, jetbrains
|
||||
, kotlin
|
||||
, libdbusmenu
|
||||
, maven
|
||||
, p7zip
|
||||
, pkg-config
|
||||
, xorg
|
||||
|
||||
, buildVer
|
||||
, buildType
|
||||
, ideaHash
|
||||
, androidHash
|
||||
, jpsHash
|
||||
, mvnDeps
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
jbr = jetbrains.jdk-no-jcef;
|
||||
|
||||
ideaSrc = fetchFromGitHub {
|
||||
owner = "jetbrains";
|
||||
repo = "intellij-community";
|
||||
rev = "${buildType}/${buildVer}";
|
||||
hash = ideaHash;
|
||||
};
|
||||
|
||||
androidSrc = fetchFromGitHub {
|
||||
owner = "jetbrains";
|
||||
repo = "android";
|
||||
rev = "${buildType}/${buildVer}";
|
||||
hash = androidHash;
|
||||
};
|
||||
|
||||
src = runCommand "source" { } ''
|
||||
cp -r ${ideaSrc} $out
|
||||
chmod +w -R $out
|
||||
cp -r ${androidSrc} $out/android
|
||||
'';
|
||||
|
||||
libdbusmenu-jb = libdbusmenu.overrideAttrs (old: {
|
||||
version = "jetbrains-fork";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jetbrains";
|
||||
repo = "libdbusmenu";
|
||||
rev = "d8a49303f908a272e6670b7cee65a2ba7c447875";
|
||||
hash = "sha256-u87ZgbfeCPJ0qG8gsom3gFaZxbS5NcHEodb0EVakk60=";
|
||||
};
|
||||
configureFlags = old.configureFlags ++ [
|
||||
"--enable-static"
|
||||
];
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp libdbusmenu-glib/.libs/libdbusmenu-glib.a $out/lib
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
|
||||
libdbm = stdenv.mkDerivation {
|
||||
pname = "libdbm";
|
||||
version = buildVer;
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ glib xorg.libX11 libdbusmenu ];
|
||||
inherit src;
|
||||
sourceRoot = "source/native/LinuxGlobalMenu";
|
||||
patches = [ ../patches/libdbm-headers.patch ];
|
||||
postPatch = "cp ${libdbusmenu-jb}/lib/libdbusmenu-glib.a libdbusmenu-glib.a";
|
||||
passthru.patched-libdbusmenu = libdbusmenu-jb;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
mv libdbm.so $out/lib/libdbm.so
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
fsnotifier = stdenv.mkDerivation {
|
||||
pname = "fsnotifier";
|
||||
version = buildVer;
|
||||
inherit src;
|
||||
sourceRoot = "source/native/fsNotifier/linux";
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
cc -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"${buildVer}\"" -std=c11 main.c inotify.c util.c -o fsnotifier
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
mv fsnotifier $out/bin
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
jpsRepo = runCommand "jps-bootstrap-repository"
|
||||
{
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = jpsHash;
|
||||
nativeBuildInputs = [ ant jbr ];
|
||||
} ''
|
||||
ant -Duser.home=$out -Dbuild.dir=/build/tmp -f ${src}/platform/jps-bootstrap/jps-bootstrap-classpath.xml
|
||||
find $out -type f \( \
|
||||
-name \*.lastUpdated \
|
||||
-o -name resolver-status.properties \
|
||||
-o -name _remote.repositories \) \
|
||||
-delete
|
||||
'';
|
||||
|
||||
jps-bootstrap = stdenvNoCC.mkDerivation {
|
||||
pname = "jps-bootstrap";
|
||||
version = buildVer;
|
||||
inherit src;
|
||||
sourceRoot = "source/platform/jps-bootstrap";
|
||||
nativeBuildInputs = [ ant makeWrapper jbr ];
|
||||
patches = [ ../patches/kotlinc-path.patch ];
|
||||
postPatch = "sed -i 's|KOTLIN_PATH_HERE|${kotlin}|' src/main/java/org/jetbrains/jpsBootstrap/KotlinCompiler.kt";
|
||||
buildPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
ant -Duser.home=${jpsRepo} -Dbuild.dir=/build/out -f jps-bootstrap-classpath.xml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/java/
|
||||
cp /build/out/jps-bootstrap.classes.jar $out/share/java/jps-bootstrap.jar
|
||||
cp -r /build/out/jps-bootstrap.out.lib $out/share/java/jps-bootstrap-classpath
|
||||
makeWrapper ${jbr}/bin/java $out/bin/jps-bootstrap \
|
||||
--add-flags "-cp $out/share/java/jps-bootstrap-classpath/'*' org.jetbrains.jpsBootstrap.JpsBootstrapMain"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
artefactsJson = lib.importJSON mvnDeps;
|
||||
mkRepoEntry = entry: {
|
||||
name = ".m2/repository/" + entry.path;
|
||||
path = fetchurl {
|
||||
urls = [
|
||||
"https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/${entry.url}"
|
||||
"https://cache-redirector.jetbrains.com/packages.jetbrains.team/maven/p/ij/intellij-dependencies/${entry.url}"
|
||||
"https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies/${entry.url}"
|
||||
"https://cache-redirector.jetbrains.com/packages.jetbrains.team/maven/p/grazi/grazie-platform-public/${entry.url}"
|
||||
"https://cache-redirector.jetbrains.com/dl.google.com/dl/android/maven2/${entry.url}"
|
||||
"https://packages.jetbrains.team/maven/p/kpm/public/${entry.url}"
|
||||
"https://packages.jetbrains.team/maven/p/dpgpv/maven/${entry.url}"
|
||||
"https://cache-redirector.jetbrains.com/download.jetbrains.com/teamcity-repository/${entry.url}"
|
||||
];
|
||||
sha256 = entry.hash;
|
||||
};
|
||||
};
|
||||
mvnRepo = linkFarm "intellij-deps" (map mkRepoEntry artefactsJson);
|
||||
|
||||
kotlin-jps-plugin-classpath =
|
||||
let
|
||||
repoUrl = "https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies";
|
||||
groupId = builtins.replaceStrings [ "." ] [ "/" ] "org.jetbrains.kotlin";
|
||||
artefactId = "kotlin-jps-plugin-classpath";
|
||||
version = "1.8.20";
|
||||
in
|
||||
fetchurl {
|
||||
url = repoUrl + "/" + groupId + "/" + artefactId + "/" + version + "/" + artefactId + "-" + version + ".jar";
|
||||
hash = "sha256-w+vmEBSXGcyvxHB3byIOFjTeCIC7tkWh9rvOoP0//9A=";
|
||||
};
|
||||
|
||||
targetClass = if buildType == "pycharm" then "intellij.pycharm.community.build" else "intellij.idea.community.build";
|
||||
targetName = if buildType == "pycharm" then "PyCharmCommunityInstallersBuildTarget" else "OpenSourceCommunityInstallersBuildTarget";
|
||||
|
||||
in
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "${buildType}-community";
|
||||
version = buildVer;
|
||||
name = "${pname}-${version}.tar.gz";
|
||||
inherit src;
|
||||
nativeBuildInputs = [ p7zip jbr jps-bootstrap ];
|
||||
repo = mvnRepo;
|
||||
|
||||
patches = [
|
||||
../patches/no-download.patch
|
||||
../patches/pycharm-build-fix.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
cp ${fsnotifier}/bin/fsnotifier bin/linux/amd64/fsnotifier
|
||||
cp ${libdbm}/lib/libdbm.so bin/linux/amd64/libdbm.so
|
||||
|
||||
sed \
|
||||
-e 's|JPS_PLUGIN_CLASSPATH_HERE|${kotlin-jps-plugin-classpath}|' \
|
||||
-e 's|KOTLIN_PATH_HERE|${kotlin}|' \
|
||||
-i platform/build-scripts/src/org/jetbrains/intellij/build/kotlin/KotlinCompilerDependencyDownloader.kt
|
||||
sed \
|
||||
-e 's|JDK_PATH_HERE|${jbr}/lib/openjdk|' \
|
||||
-i platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
|
||||
sed \
|
||||
-e 's|BROKEN_PLUGINS_HERE|${./brokenPlugins.json}|' \
|
||||
-i platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
|
||||
sed \
|
||||
-e 's|MAVEN_REPO_HERE|${mvnRepo}/.m2/repository/|' \
|
||||
-e 's|MAVEN_PATH_HERE|${maven}/maven|' \
|
||||
-i build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
|
||||
echo '${buildVer}' > build.txt
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
||||
# Will need removing after update
|
||||
cp plugins/devkit/devkit-core/src/run/OpenedPackages.txt platform/platform-impl/resources/META-INF/OpenedPackages.txt
|
||||
|
||||
ln -s "$repo"/.m2 /build/.m2
|
||||
export JPS_BOOTSTRAP_COMMUNITY_HOME=/build/source
|
||||
jps-bootstrap \
|
||||
-Dbuild.number=${buildVer} \
|
||||
-Djps.kotlin.home=${kotlin} \
|
||||
-Dintellij.build.target.os=linux \
|
||||
-Dintellij.build.target.arch=x64 \
|
||||
-Dintellij.build.skip.build.steps=mac_artifacts,mac_dmg,mac_sit,windows_exe_installer,windows_sign,repair_utility_bundle_step \
|
||||
-Dintellij.build.unix.snaps=false \
|
||||
--java-argfile-target=java_argfile \
|
||||
/build/source \
|
||||
${targetClass} \
|
||||
${targetName}
|
||||
|
||||
runHook postConfigure
|
||||
'';
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
java \
|
||||
-Djps.kotlin.home=${kotlin} \
|
||||
"@java_argfile"
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mv out/*/artifacts/*-no-jbr.tar.gz $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit libdbm fsnotifier jps-bootstrap;
|
||||
};
|
||||
}
|
94
pkgs/applications/editors/jetbrains/source/build_maven.py
Executable file
94
pkgs/applications/editors/jetbrains/source/build_maven.py
Executable file
@ -0,0 +1,94 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
# ! nix-shell -i python3 -p python3 python3.pkgs.xmltodict
|
||||
import os
|
||||
from argparse import ArgumentParser
|
||||
from xmltodict import parse
|
||||
from json import dump
|
||||
from sys import stdout
|
||||
|
||||
def get_args() -> (str, list[str]):
|
||||
parser = ArgumentParser(
|
||||
description="Given the path of a intellij source tree, make a list of urls and hashes of maven artefacts required to build"
|
||||
)
|
||||
parser.add_argument("out", help="File to output json to")
|
||||
parser.add_argument("path", help="Path to the intellij-community source dir")
|
||||
args = parser.parse_args()
|
||||
return args.path, args.out
|
||||
|
||||
|
||||
def ensure_is_list(x):
|
||||
if type(x) != list:
|
||||
return [x]
|
||||
return x
|
||||
|
||||
def add_entries(sources, targets, hashes):
|
||||
for num, artefact in enumerate(sources):
|
||||
hashes.append({
|
||||
"url": artefact["@url"][26:],
|
||||
"hash": artefact["sha256sum"],
|
||||
"path": targets[num]["@url"][25:-2]
|
||||
})
|
||||
|
||||
|
||||
def add_libraries(root_path: str, hashes: list[dict[str, str]], projects_to_process: list[str]):
|
||||
library_paths = os.listdir(root_path + "/libraries/")
|
||||
for path in library_paths:
|
||||
file_contents = parse(open(root_path + "/libraries/" + path).read())
|
||||
if "properties" not in file_contents["component"]["library"]:
|
||||
continue
|
||||
sources = ensure_is_list(file_contents["component"]["library"]["properties"]["verification"]["artifact"])
|
||||
targets = ensure_is_list(file_contents["component"]["library"]["CLASSES"]["root"])
|
||||
add_entries(sources, targets, hashes)
|
||||
|
||||
modules_xml = parse(open(root_path+"/modules.xml").read())
|
||||
for entry in modules_xml["project"]["component"]:
|
||||
if entry["@name"] != "ProjectModuleManager":
|
||||
continue
|
||||
for module in entry["modules"]["module"]:
|
||||
projects_to_process.append(module["@filepath"])
|
||||
|
||||
|
||||
def add_iml(path: str, hashes: list[dict[str, str]], projects_to_process: list[str]):
|
||||
try:
|
||||
contents = parse(open(path).read())
|
||||
except FileNotFoundError:
|
||||
print(f"Warning: path {path} does not exist (did you forget the android directory?)")
|
||||
return
|
||||
for manager in ensure_is_list(contents["module"]["component"]):
|
||||
if manager["@name"] != "NewModuleRootManager":
|
||||
continue
|
||||
|
||||
for entry in manager["orderEntry"]:
|
||||
if type(entry) != dict or \
|
||||
entry["@type"] != "module-library" or \
|
||||
"properties" not in entry["library"]:
|
||||
continue
|
||||
|
||||
sources = ensure_is_list(entry["library"]["properties"]["verification"]["artifact"])
|
||||
targets = ensure_is_list(entry["library"]["CLASSES"]["root"])
|
||||
add_entries(sources, targets, hashes)
|
||||
|
||||
|
||||
def main():
|
||||
root_path, out = get_args()
|
||||
file_hashes = []
|
||||
projects_to_process: list[str] = [root_path+"/.idea"]
|
||||
|
||||
while projects_to_process:
|
||||
elem = projects_to_process.pop()
|
||||
elem = elem.replace("$PROJECT_DIR$", root_path)
|
||||
if elem.endswith(".iml"):
|
||||
add_iml(elem, file_hashes, projects_to_process)
|
||||
else:
|
||||
add_libraries(elem, file_hashes, projects_to_process)
|
||||
|
||||
if out == "stdout":
|
||||
dump(file_hashes, stdout, indent=4)
|
||||
else:
|
||||
file = open(out, "w")
|
||||
dump(file_hashes, file, indent=4)
|
||||
file.write("\n")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
21
pkgs/applications/editors/jetbrains/source/default.nix
Normal file
21
pkgs/applications/editors/jetbrains/source/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ callPackage
|
||||
}:
|
||||
|
||||
{
|
||||
idea-community = callPackage ./build.nix {
|
||||
buildVer = "232.9921.47";
|
||||
buildType = "idea";
|
||||
ideaHash = "sha256-sibp2Pa+NNHEeHMDRol45XOK0JzEhIZeI7TY04SkIx4=";
|
||||
androidHash = "sha256-bc/UlR0DJQiQ3mdscucHkvzkSQxD0KnDFIM9UIb7Inw=";
|
||||
jpsHash = "sha256-dBz64oATg45BMwd6etncQm84eHQSfSE9kDbuU9IVpmo=";
|
||||
mvnDeps = ./idea_maven_artefacts.json;
|
||||
};
|
||||
pycharm-community = callPackage ./build.nix {
|
||||
buildVer = "232.10072.31";
|
||||
buildType = "pycharm";
|
||||
ideaHash = "sha256-NTQGz5HViQlJQaxcAnsliZS4NCKScVqx25FMILkBjpk=";
|
||||
androidHash = "sha256-bc/UlR0DJQiQ3mdscucHkvzkSQxD0KnDFIM9UIb7Inw=";
|
||||
jpsHash = "sha256-dBz64oATg45BMwd6etncQm84eHQSfSE9kDbuU9IVpmo=";
|
||||
mvnDeps = ./idea_maven_artefacts.json;
|
||||
};
|
||||
}
|
7107
pkgs/applications/editors/jetbrains/source/idea_maven_artefacts.json
Normal file
7107
pkgs/applications/editors/jetbrains/source/idea_maven_artefacts.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -19,13 +19,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xed-editor";
|
||||
version = "3.4.3";
|
||||
version = "3.4.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = "xed";
|
||||
rev = version;
|
||||
sha256 = "sha256-nc8YS1PcmtM37TJpGl691SlxJliyI2gSGJtNzkWbk9A=";
|
||||
sha256 = "sha256-IpUBB7Viwc/nRfwzFllRiWoOmUxRZzS2BcxyM7W3oHI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://www.gaia-gis.it/fossil/spatialite_gui";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
maintainers = teams.geospatial.members;
|
||||
mainProgram = "spatialite_gui";
|
||||
};
|
||||
}
|
||||
|
@ -4,11 +4,11 @@
|
||||
lib,
|
||||
}: let
|
||||
pname = "upscayl";
|
||||
version = "2.9.4";
|
||||
version = "2.9.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/upscayl/upscayl/releases/download/v${version}/upscayl-${version}-linux.AppImage";
|
||||
hash = "sha256-H9/z0NIqGGJPipioWvv67vIFQ46RZr5+ycm3NQrO9ZE=";
|
||||
hash = "sha256-zEqdHWfMbxdOoZ3NfvOPZL0osrFVMxFN32gXfEjbKLs=";
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
|
@ -101,6 +101,7 @@ let
|
||||
kaccounts-providers = callPackage ./kaccounts-providers.nix {};
|
||||
kaddressbook = callPackage ./kaddressbook.nix {};
|
||||
kalarm = callPackage ./kalarm.nix {};
|
||||
kalgebra = callPackage ./kalgebra.nix {};
|
||||
merkuro = callPackage ./merkuro.nix {};
|
||||
kalzium = callPackage ./kalzium.nix {};
|
||||
kamoso = callPackage ./kamoso.nix {};
|
||||
|
46
pkgs/applications/kde/kalgebra.nix
Normal file
46
pkgs/applications/kde/kalgebra.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ mkDerivation
|
||||
, lib
|
||||
, extra-cmake-modules
|
||||
, kdoctools
|
||||
, analitza
|
||||
, ki18n
|
||||
, kinit
|
||||
, kirigami2
|
||||
, kconfigwidgets
|
||||
, kwidgetsaddons
|
||||
, kio
|
||||
, kxmlgui
|
||||
, qtwebengine
|
||||
, plasma-framework
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
pname = "kalgebra";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
extra-cmake-modules
|
||||
kdoctools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ki18n
|
||||
analitza
|
||||
kinit
|
||||
kirigami2
|
||||
kconfigwidgets
|
||||
kwidgetsaddons
|
||||
kio
|
||||
kxmlgui
|
||||
qtwebengine
|
||||
plasma-framework
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://apps.kde.org/kalgebra/";
|
||||
description = "A 2D and 3D Graph Calculator";
|
||||
license = with lib.licenses; [ gpl2Plus ];
|
||||
maintainers = with lib.maintainers; [ ninjafb ];
|
||||
};
|
||||
}
|
@ -52,7 +52,10 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
nativeBuildInputs =
|
||||
[ cmake makeWrapper python310Packages.wrapPython llvmPackages.llvm.dev
|
||||
]
|
||||
++ lib.optionals cudaSupport [ addOpenGLRunpath ]
|
||||
++ lib.optionals cudaSupport [
|
||||
addOpenGLRunpath
|
||||
cudaPackages.cuda_nvcc
|
||||
]
|
||||
++ lib.optionals waylandSupport [ pkg-config ];
|
||||
buildInputs =
|
||||
[ boost ffmpeg gettext glew ilmbase
|
||||
@ -87,7 +90,7 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
llvmPackages.openmp SDL Cocoa CoreGraphics ForceFeedback OpenAL OpenGL
|
||||
])
|
||||
++ lib.optional jackaudioSupport libjack2
|
||||
++ lib.optional cudaSupport cudaPackages.cudatoolkit
|
||||
++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ]
|
||||
++ lib.optional colladaSupport opencollada
|
||||
++ lib.optional spaceNavSupport libspnav;
|
||||
pythonPath = with python310Packages; [ numpy requests zstandard ];
|
||||
|
@ -14,11 +14,11 @@ stdenv.mkDerivation (finalAttrs: let
|
||||
|
||||
in {
|
||||
pname = "logseq";
|
||||
version = "0.9.20";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage";
|
||||
hash = "sha256-iT0Gc/ePx1tUNTPoE2Ol+dHUmbS4CkneZbyraRBx5Ak=";
|
||||
hash = "sha256-igZM+kNe1GDPYckXU6fOjyovHe9gwyBWr7Mc3BxAzOA=";
|
||||
name = "${pname}-${version}.AppImage";
|
||||
};
|
||||
|
||||
|
@ -24,13 +24,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mediaelch";
|
||||
version = "2.10.4";
|
||||
version = "2.10.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Komet";
|
||||
repo = "MediaElch";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gNpnmyUKDXf40+1JmJzNyEPIv/DO8b3CdJAphheEvTU=";
|
||||
hash = "sha256-qc7HaCMAmALY9MoIKmaCWF0cnwBBFDAXwqiBzwzu2bU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -7,19 +7,19 @@
|
||||
|
||||
((buildMozillaMach rec {
|
||||
pname = "floorp";
|
||||
packageVersion = "11.6.0";
|
||||
packageVersion = "11.6.1";
|
||||
applicationName = "Floorp";
|
||||
binaryName = "floorp";
|
||||
|
||||
# Must match the contents of `browser/config/version.txt` in the source tree
|
||||
version = "155.5.0";
|
||||
version = "115.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Floorp-Projects";
|
||||
repo = "Floorp";
|
||||
fetchSubmodules = true;
|
||||
rev = "v${packageVersion}";
|
||||
hash = "sha256-5OQZckST6l9OZ7jnj52nuALCWiH1hVdDoDHSpqwUUfA=";
|
||||
hash = "sha256-pxKzRS7uTFMxJ1F1CMRHdyU/zcqGDjLWMWZCmoT/eh8=";
|
||||
};
|
||||
|
||||
extraConfigureFlags = [
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "acorn";
|
||||
version = "0.8.0";
|
||||
version = "0.9.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "acorn-io";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ZS3YxXgMSu8+eRnpqrtaBTQIlSY3cscudcTbztiRsbM=";
|
||||
hash = "sha256-l9V6URc5wY30z6W76n3xrGMHC43kDWfx0+1eznmcVi4=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-jkkzlMc2y8HvPZjpmRIQz64JK5yjhdoJevE0dclBHvA=";
|
||||
vendorHash = "sha256-EJ66rX0Pv6KG9wiEZq1POf6CODbENP/LbS6qZkn3XWs=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cni-plugins";
|
||||
version = "1.3.0";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "containernetworking";
|
||||
repo = "plugins";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-cbmG9wK3yd79jCiNAKcSSx0COyh6CxR1bgIiCO3i++g=";
|
||||
hash = "sha256-goXpNpb5tVOHeskRLw3CivYett3RxYBREAI+S74CMFQ=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
|
@ -7,7 +7,7 @@ index d85a17491..90ea5e387 100644
|
||||
|
||||
require 'rails/all'
|
||||
+require 'nulldb'
|
||||
require_relative 'issue_2656_workaround_for_rails_issue_33600'
|
||||
require_relative '../lib/zammad/safe_mode'
|
||||
|
||||
# DO NOT REMOVE THIS LINE - see issue #2037
|
||||
diff --git a/db/schema.rb b/db/schema.rb
|
||||
|
@ -19,11 +19,12 @@
|
||||
, yarn2nix-moretea
|
||||
, v8
|
||||
, cacert
|
||||
, redis
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "zammad";
|
||||
version = "5.4.1";
|
||||
version = "6.1.0";
|
||||
|
||||
src = applyPatches {
|
||||
|
||||
@ -100,7 +101,7 @@ let
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-HI4RR4/ll/zNBNtDCb8OvEsG/BMVYacM0CcYqbkNHEY=";
|
||||
hash = "sha256-PVQ2L+Io6Ct9UHvfoQmxV01ECG8fj0+xKwpMfAvD7q0=";
|
||||
};
|
||||
|
||||
yarnPreBuild = ''
|
||||
@ -124,13 +125,26 @@ stdenv.mkDerivation {
|
||||
cacert
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
redis
|
||||
];
|
||||
|
||||
RAILS_ENV = "production";
|
||||
|
||||
buildPhase = ''
|
||||
node_modules=${yarnEnv}/libexec/Zammad/node_modules
|
||||
${yarn2nix-moretea.linkNodeModulesHook}
|
||||
|
||||
mkdir redis-work
|
||||
pushd redis-work
|
||||
redis-server &
|
||||
REDIS_PID=$!
|
||||
popd
|
||||
|
||||
rake DATABASE_URL="nulldb://user:pass@127.0.0.1/dbname" assets:precompile
|
||||
|
||||
kill $REDIS_PID
|
||||
rm -r redis-work
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
@ -151,6 +165,6 @@ stdenv.mkDerivation {
|
||||
homepage = "https://zammad.org";
|
||||
license = licenses.agpl3Plus;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ n0emis garbas taeer ];
|
||||
maintainers = with maintainers; [ n0emis taeer netali ];
|
||||
};
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,12 @@
|
||||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"generate-graphql-api": "RAILS_ENV=development bundle exec rails generate zammad:graphql_introspection > tmp/graphql_introspection.json && npx graphql-codegen -c .graphql_code_generator.yml && rm tmp/graphql_introspection.json",
|
||||
"generate-graphql-api": "RAILS_ENV=development bundle exec rails generate zammad:graphql_introspection > app/graphql/graphql_introspection.json && npx graphql-codegen -c .graphql_code_generator.yml",
|
||||
"generate-setting-types": "RAILS_ENV=development bundle exec rails generate zammad:setting_types",
|
||||
"dev": "RAILS_ENV=development forego start -f Procfile.dev",
|
||||
"dev:https": "VITE_RUBY_HTTPS=true RAILS_ENV=development forego start -f Procfile.dev-https",
|
||||
"https:generate": "sh contrib/ssl/generate-ssl.sh",
|
||||
"dev:https": "VITE_RUBY_HOST=0.0.0.0 VITE_RUBY_HTTPS=true RAILS_ENV=development forego start -f Procfile.dev-https",
|
||||
"i18n": "rails generate zammad:translation_catalog",
|
||||
"lint": "vue-tsc --noEmit && eslint --cache --cache-location ./tmp/eslintcache.js -c .eslintrc.js --ext .js,.ts,.vue app/frontend/ .eslint-plugin-zammad/",
|
||||
"lint": "vue-tsc --noEmit && eslint --cache --cache-location ./tmp/eslintcache.js --cache-strategy content -c .eslintrc.js --ext .js,.ts,.vue app/frontend/ .eslint-plugin-zammad/",
|
||||
"lint:fix": "yarn lint -- --fix",
|
||||
"lint:css": "stylelint **/*.{css,vue,scss}",
|
||||
"lint:css:fix": "stylelint **/*.{css,vue,scss} --fix",
|
||||
@ -24,129 +24,134 @@
|
||||
},
|
||||
"packageManager": "yarn@1.22.19",
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/cli": "^3.0.0",
|
||||
"@graphql-codegen/introspection": "^3.0.0",
|
||||
"@faker-js/faker": "^8.0.2",
|
||||
"@graphql-codegen/cli": "^5.0.0",
|
||||
"@graphql-codegen/introspection": "^4.0.0",
|
||||
"@graphql-codegen/near-operation-file-preset": "^2.5.0",
|
||||
"@graphql-codegen/typescript": "^3.0.0",
|
||||
"@graphql-codegen/typescript-operations": "^3.0.0",
|
||||
"@graphql-codegen/typescript": "^4.0.1",
|
||||
"@graphql-codegen/typescript-operations": "^4.0.1",
|
||||
"@graphql-codegen/typescript-vue-apollo": "^3.3.7",
|
||||
"@histoire/plugin-vue": "^0.14.2",
|
||||
"@pinia/testing": "^0.0.14",
|
||||
"@tailwindcss/line-clamp": "^0.4.2",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@histoire/plugin-vue": "^0.17.1",
|
||||
"@pinia/testing": "^0.1.3",
|
||||
"@testing-library/jest-dom": "^5.17.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@testing-library/vue": "^6.6.1",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@testing-library/vue": "^7.0.0",
|
||||
"@types/lodash-es": "^4.17.8",
|
||||
"@types/rails__actioncable": "^6.1.6",
|
||||
"@types/ua-parser-js": "^0.7.36",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
||||
"@typescript-eslint/parser": "^5.51.0",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/eslint-config-prettier": "^7.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.2",
|
||||
"@vue/test-utils": "^2.2.10",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"eslint": "^8.33.0",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
||||
"@typescript-eslint/parser": "^5.62.0",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vue/eslint-config-prettier": "^8.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.3",
|
||||
"@vue/test-utils": "^2.4.1",
|
||||
"autoprefixer": "^10.4.15",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-import-resolver-alias": "^1.1.2",
|
||||
"eslint-import-resolver-typescript": "^3.5.5",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-prettier-vue": "^4.2.0",
|
||||
"eslint-plugin-security": "^1.7.1",
|
||||
"eslint-plugin-sonarjs": "^0.18.0",
|
||||
"eslint-plugin-vue": "^9.9.0",
|
||||
"eslint-plugin-sonarjs": "^0.19.0",
|
||||
"eslint-plugin-vue": "^9.15.1",
|
||||
"eslint-plugin-zammad": "file:.eslint-plugin-zammad",
|
||||
"histoire": "^0.14.2",
|
||||
"jsdom": "^21.1.0",
|
||||
"histoire": "^0.17.0",
|
||||
"jsdom": "^22.1.0",
|
||||
"mock-apollo-client": "^1.2.1",
|
||||
"postcss": "^8.4.21",
|
||||
"postcss": "^8.4.28",
|
||||
"postcss-html": "^1.5.0",
|
||||
"prettier": "2.8.4",
|
||||
"prettier-plugin-tailwindcss": "^0.2.2",
|
||||
"regenerator-runtime": "^0.13.11",
|
||||
"sass": "^1.58.0",
|
||||
"stylelint": "^14.16.1",
|
||||
"prettier": "3.0.2",
|
||||
"prettier-plugin-tailwindcss": "^0.5.3",
|
||||
"regenerator-runtime": "^0.14.0",
|
||||
"sass": "^1.65.1",
|
||||
"stylelint": "^15.10.3",
|
||||
"stylelint-config-prettier": "^9.0.5",
|
||||
"stylelint-config-recommended-vue": "^1.4.0",
|
||||
"stylelint-config-standard": "^29.0.0",
|
||||
"stylelint-config-standard-scss": "^6.1.0",
|
||||
"stylelint-prettier": "^2.0.0",
|
||||
"stylelint-scss": "^4.4.0",
|
||||
"tailwindcss": "^3.2.6",
|
||||
"stylelint-config-recommended-vue": "^1.5.0",
|
||||
"stylelint-config-standard": "^34.0.0",
|
||||
"stylelint-config-standard-scss": "^10.0.0",
|
||||
"stylelint-prettier": "^4.0.2",
|
||||
"stylelint-scss": "^5.1.0",
|
||||
"svg-baker": "^1.7.0",
|
||||
"svgo": "^3.0.2",
|
||||
"tailwindcss": "^3.3.3",
|
||||
"timezone-mock": "^1.3.6",
|
||||
"ts-node": "^10.9.1",
|
||||
"type-fest": "^3.5.7",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^4.0.4",
|
||||
"vite-plugin-pwa": "^0.14.1",
|
||||
"vite-plugin-ruby": "^3.1.3",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vitest": "^0.28.4",
|
||||
"type-fest": "^3.13.1",
|
||||
"typescript": "^5.1.6",
|
||||
"vite": "^4.4.9",
|
||||
"vite-plugin-pwa": "^0.16.4",
|
||||
"vite-plugin-ruby": "^3.2.2",
|
||||
"vitest": "^0.34.3",
|
||||
"vitest-axe": "^0.1.0",
|
||||
"vue-tsc": "^1.0.24"
|
||||
"vue-tsc": "^1.8.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.7.7",
|
||||
"@formkit/core": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/dev": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/i18n": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/inputs": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/rules": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/tailwindcss": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/themes": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/utils": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/validation": "^1.0.0-beta.13-c578106",
|
||||
"@formkit/vue": "^1.0.0-beta.13-c578106",
|
||||
"@apollo/client": "^3.7.17",
|
||||
"@formkit/core": "^0.17.4",
|
||||
"@formkit/dev": "^0.17.4",
|
||||
"@formkit/i18n": "^0.17.4",
|
||||
"@formkit/inputs": "^0.17.4",
|
||||
"@formkit/rules": "^0.17.4",
|
||||
"@formkit/tailwindcss": "^0.17.4",
|
||||
"@formkit/themes": "^0.17.4",
|
||||
"@formkit/utils": "^0.17.4",
|
||||
"@formkit/validation": "^0.17.4",
|
||||
"@formkit/vue": "^0.17.4",
|
||||
"@github/webauthn-json": "^2.1.1",
|
||||
"@rails/actioncable": "6.1.7",
|
||||
"@tiptap/core": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-blockquote": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-character-count": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-image": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-link": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-list-item": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-mention": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-ordered-list": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-paragraph": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-strike": "^2.0.0-beta.217",
|
||||
"@tiptap/extension-underline": "^2.0.0-beta.217",
|
||||
"@tiptap/pm": "^2.0.0-beta.217",
|
||||
"@tiptap/starter-kit": "^2.0.0-beta.217",
|
||||
"@tiptap/suggestion": "^2.0.0-beta.217",
|
||||
"@tiptap/vue-3": "^2.0.0-beta.217",
|
||||
"@vue/apollo-composable": "^4.0.0-beta.2",
|
||||
"@vueuse/core": "^9.12.0",
|
||||
"@vueuse/router": "^9.12.0",
|
||||
"@vueuse/shared": "^9.12.0",
|
||||
"@tiptap/core": "^2.0.4",
|
||||
"@tiptap/extension-blockquote": "^2.0.4",
|
||||
"@tiptap/extension-character-count": "^2.0.4",
|
||||
"@tiptap/extension-hard-break": "^2.0.4",
|
||||
"@tiptap/extension-image": "^2.0.4",
|
||||
"@tiptap/extension-link": "^2.0.4",
|
||||
"@tiptap/extension-list-item": "^2.0.4",
|
||||
"@tiptap/extension-mention": "^2.0.4",
|
||||
"@tiptap/extension-ordered-list": "^2.0.4",
|
||||
"@tiptap/extension-paragraph": "^2.0.4",
|
||||
"@tiptap/extension-strike": "^2.0.4",
|
||||
"@tiptap/extension-underline": "^2.0.4",
|
||||
"@tiptap/pm": "^2.0.4",
|
||||
"@tiptap/starter-kit": "^2.0.4",
|
||||
"@tiptap/suggestion": "^2.0.4",
|
||||
"@tiptap/vue-3": "^2.0.4",
|
||||
"@vue/apollo-composable": "4.0.0-beta.5",
|
||||
"@vueuse/core": "^10.4.0",
|
||||
"@vueuse/router": "^10.4.0",
|
||||
"@vueuse/shared": "^10.4.0",
|
||||
"async-mutex": "^0.4.0",
|
||||
"flatpickr": "^4.6.13",
|
||||
"graphql": "^16.6.0",
|
||||
"graphql-ruby-client": "^1.11.5",
|
||||
"graphql": "^16.7.1",
|
||||
"graphql-ruby-client": "^1.11.8",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"linkify-string": "^4.1.0",
|
||||
"linkifyjs": "^4.1.0",
|
||||
"linkify-string": "^4.1.1",
|
||||
"linkifyjs": "^4.1.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
"loglevel": "^1.8.1",
|
||||
"mitt": "^3.0.0",
|
||||
"pinia": "^2.0.30",
|
||||
"mitt": "^3.0.1",
|
||||
"pinia": "^2.1.6",
|
||||
"tippy.js": "^6.3.7",
|
||||
"ua-parser-js": "^1.0.33",
|
||||
"tiptap-text-direction": "^0.3.0",
|
||||
"ua-parser-js": "^1.0.35",
|
||||
"uuid": "^9.0.0",
|
||||
"vue": "^3.2.47",
|
||||
"vue": "^3.3.4",
|
||||
"vue-advanced-cropper": "^2.8.8",
|
||||
"vue-easy-lightbox": "1.12.0",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-easy-lightbox": "1.16.0",
|
||||
"vue-router": "^4.2.4",
|
||||
"vue3-draggable-resizable": "^1.6.5",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"workbox-core": "^6.5.4",
|
||||
"workbox-precaching": "^6.5.4",
|
||||
"workbox-window": "^6.5.4"
|
||||
"workbox-core": "^7.0.0",
|
||||
"workbox-precaching": "^7.0.0",
|
||||
"workbox-window": "^7.0.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"loader-utils": "^3.2.1",
|
||||
"postcss": "^8.4.21"
|
||||
"postcss": "^8.4.28",
|
||||
"stylelint-config-recommended": "^13.0.0"
|
||||
},
|
||||
"name": "Zammad",
|
||||
"version": "5.4.1"
|
||||
"version": "6.1.0"
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"owner": "zammad",
|
||||
"repo": "zammad",
|
||||
"rev": "643aba6ba4ba66c6127038c8cc2cc7a20b912678",
|
||||
"hash": "sha256-vLLn989M5ZN+jTh60BopEKbuaxOBfDsk6PiM+gHFClo=",
|
||||
"rev": "ec4ddb8ae6a55d1c8e64ab5ddda9ff3e9d4f45c8",
|
||||
"hash": "sha256-+AphZ0pKlXFdcncnDxeLdDL3OH2dyF0nb69+/W2dLgc=",
|
||||
"fetchSubmodules": true
|
||||
}
|
||||
|
||||
|
@ -55,11 +55,6 @@ pushd $SOURCE_DIR
|
||||
echo ":: Creating gemset.nix"
|
||||
bundix --lockfile=./Gemfile.lock --gemfile=./Gemfile --gemset=$TARGET_DIR/gemset.nix
|
||||
|
||||
echo ":: Creating yarn.nix"
|
||||
yarn install
|
||||
cp yarn.lock $TARGET_DIR
|
||||
yarn2nix > $TARGET_DIR/yarn.nix
|
||||
|
||||
# needed to avoid import from derivation
|
||||
jq --arg VERSION "$VERSION" '. += {name: "Zammad", version: $VERSION}' package.json > $TARGET_DIR/package.json
|
||||
|
||||
|
@ -21,14 +21,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "warp";
|
||||
version = "0.6.1";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "World";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-Uc9N2kRTpi9cCFskngkiclLpEcp4dtI2mhldG4s/GFY=";
|
||||
hash = "sha256-pntHIY0cScDKhWR6kXp6YrEbBQiQjUId3MrJzy5l+K8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-GN9TjsGBU3D/mc6/XtRAk5pliKRPTQ9f3fMdS6weCaE=";
|
||||
hash = "sha256-Go/a7aVHF1Yt3yIccKJIVeFy5rckXhSKfd13hdhlLUQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
description = "Fast and secure file transfer";
|
||||
homepage = "https://apps.gnome.org/app/app.drey.Warp";
|
||||
homepage = "https://apps.gnome.org/Warp/";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ dotlambda foo-dogsquared ];
|
||||
platforms = lib.platforms.all;
|
||||
|
@ -9,13 +9,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "last";
|
||||
version = "1499";
|
||||
version = "1518";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "mcfrith";
|
||||
repo = "last";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-uofXtGGDloM1FxW0PYKKwfDOPlAJiapGVKwd1clFzp8=";
|
||||
hash = "sha256-a6i5BfJhVHkXTLd7SVFxISEB+Kwl7BhjUUkF8ItMOak=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -1,41 +1,119 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, git
|
||||
, cmake
|
||||
, gnum4
|
||||
, gfortran
|
||||
, pkg-config
|
||||
, fftw
|
||||
, blas
|
||||
, lapack
|
||||
, useMpi ? false
|
||||
, scalapack
|
||||
, wannier90
|
||||
, hdf5
|
||||
, libmbd
|
||||
, libxc
|
||||
, enableMpi ? true
|
||||
, mpi
|
||||
}:
|
||||
|
||||
assert ! blas.isILP64;
|
||||
assert ! lapack.isILP64;
|
||||
|
||||
let
|
||||
# "rev"s must exactly match the git submodule commits in the QE repo
|
||||
gitSubmodules = {
|
||||
devxlib = fetchFromGitLab {
|
||||
group = "max-centre";
|
||||
owner = "components";
|
||||
repo = "devicexlib";
|
||||
rev = "a6b89ef77b1ceda48e967921f1f5488d2df9226d";
|
||||
hash = "sha256-p3fRplVG4YSN6ILNlOwf+aSEhpTJPXqiS1+wnzWVA2U=";
|
||||
};
|
||||
|
||||
pw2qmcpack = fetchFromGitHub {
|
||||
owner = "QMCPACK";
|
||||
repo = "pw2qmcpack";
|
||||
rev = "f72ab25fa4ea755c1b4b230ae8074b47d5509c70";
|
||||
hash = "sha256-K1Z90xexsUvk4SdEb8FGryRal0GAFoLz3j1h/RT2nYw=";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "6.6";
|
||||
version = "7.2";
|
||||
pname = "quantum-espresso";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "QEF";
|
||||
repo = "q-e";
|
||||
rev = "qe-${version}";
|
||||
sha256 = "1mkfmw0fq1dabplzdn6v1abhw0ds55gzlvbx3a9brv493whk21yp";
|
||||
hash = "sha256-0q0QWX4BVjVHjcbKOBpjbBADuL+2S5LAALyrxmjVs4c=";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
inherit mpi;
|
||||
};
|
||||
# add git submodules manually and fix pkg-config file
|
||||
prePatch = ''
|
||||
chmod -R +rwx external/
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs configure
|
||||
substituteInPlace external/devxlib.cmake \
|
||||
--replace "qe_git_submodule_update(external/devxlib)" ""
|
||||
substituteInPlace external/CMakeLists.txt \
|
||||
--replace "qe_git_submodule_update(external/pw2qmcpack)" "" \
|
||||
--replace "qe_git_submodule_update(external/d3q)" "" \
|
||||
--replace "qe_git_submodule_update(external/qe-gipaw)" ""
|
||||
|
||||
${builtins.toString (builtins.attrValues
|
||||
(builtins.mapAttrs
|
||||
(name: val: ''
|
||||
cp -r ${val}/* external/${name}/.
|
||||
chmod -R +rwx external/${name}
|
||||
'')
|
||||
gitSubmodules
|
||||
)
|
||||
)}
|
||||
|
||||
substituteInPlace cmake/quantum_espresso.pc.in \
|
||||
--replace 'libdir="''${prefix}/@CMAKE_INSTALL_LIBDIR@"' 'libdir="@CMAKE_INSTALL_FULL_LIBDIR@"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
passthru = { inherit mpi; };
|
||||
|
||||
buildInputs = [ fftw blas lapack ]
|
||||
++ (lib.optionals useMpi [ mpi ]);
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gfortran
|
||||
git
|
||||
pkg-config
|
||||
];
|
||||
|
||||
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
|
||||
buildInputs = [
|
||||
fftw
|
||||
blas
|
||||
lapack
|
||||
wannier90
|
||||
libmbd
|
||||
libxc
|
||||
hdf5
|
||||
] ++ lib.optional enableMpi scalapack;
|
||||
|
||||
makeFlags = [ "all" ];
|
||||
propagatedBuildInputs = lib.optional enableMpi mpi;
|
||||
propagatedUserEnvPkgs = lib.optional enableMpi mpi;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DWANNIER90_ROOT=${wannier90}"
|
||||
"-DMBD_ROOT=${libmbd}"
|
||||
"-DQE_ENABLE_OPENMP=ON"
|
||||
"-DQE_ENABLE_LIBXC=ON"
|
||||
"-DQE_ENABLE_HDF5=ON"
|
||||
"-DQE_ENABLE_PLUGINS=pw2qmcpack"
|
||||
] ++ lib.optionals enableMpi [
|
||||
"-DQE_ENABLE_MPI=ON"
|
||||
"-DQE_ENABLE_MPI_MODULE=ON"
|
||||
"-DQE_ENABLE_SCALAPACK=ON"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Electronic-structure calculations and materials modeling at the nanoscale";
|
||||
|
@ -13,13 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "csxcad";
|
||||
version = "unstable-2022-05-18";
|
||||
version = "0.6.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thliebig";
|
||||
repo = "CSXCAD";
|
||||
rev = "cd9decb4d9cebe3c8bf115e2c0ee73f730f22da1";
|
||||
sha256 = "1604amhvp7dm8ych7gwzxwawqvb9hpjglk5ffd4qm0y3k6r89arn";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-SSV5ulx3rCJg99I/oOQbqe+gOSs+BfcCo6UkWHVhnSs=";
|
||||
};
|
||||
|
||||
patches = [./searchPath.patch ];
|
||||
|
@ -18,15 +18,15 @@
|
||||
, hyp2mat
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openems";
|
||||
version = "unstable-2020-02-15";
|
||||
version = "0.0.36";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thliebig";
|
||||
repo = "openEMS";
|
||||
rev = "ba793ac84e2f78f254d6d690bb5a4c626326bbfd";
|
||||
sha256 = "1dca6b6ccy771irxzsj075zvpa3dlzv4mjb8xyg9d889dqlgyl45";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-wdH+Zw7G2ZigzBMX8p3GKdFVx/AhbTNL+P3w+YjI/dc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -8,13 +8,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cryptominisat";
|
||||
version = "5.11.14";
|
||||
version = "5.11.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "msoos";
|
||||
repo = "cryptominisat";
|
||||
rev = version;
|
||||
hash = "sha256-p/sVinjEh078PGtJ6JBRA8EmrJVcchBs9L3bRZvCHuo=";
|
||||
hash = "sha256-OenuIPo5U0+egWMpxfaKWPLbO5YRQJSXLYptih+ZQQ0=";
|
||||
};
|
||||
|
||||
buildInputs = [ python3 boost ];
|
||||
|
@ -13,7 +13,8 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# or-tools has a hard dependency on Cbc static libraries, so we build both
|
||||
configureFlags = [ "-C" "--enable-static" ];
|
||||
configureFlags = [ "-C" "--enable-static" ]
|
||||
++ lib.optionals stdenv.cc.isClang [ "CXXFLAGS=-std=c++14" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.epl20;
|
||||
homepage = "https://github.com/coin-or/Clp";
|
||||
description = "An open-source linear programming solver written in C++";
|
||||
platforms = platforms.darwin ++ [ "x86_64-linux" ];
|
||||
platforms = platforms.darwin ++ platforms.linux;
|
||||
maintainers = [ maintainers.vbgl ];
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +1,11 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildFHSEnv
|
||||
, fetchFromGitHub
|
||||
, scons
|
||||
, ocl-icd
|
||||
, openssl
|
||||
, scons
|
||||
, stdenv
|
||||
, extraPkgs ? [ ]
|
||||
}:
|
||||
let
|
||||
version = "8.1.18";
|
||||
@ -14,57 +17,64 @@ let
|
||||
hash = "sha256-G0rknVmZiyC4sRTOowFjf7EQ5peGf+HLPPcLWXXFlX4=";
|
||||
};
|
||||
|
||||
fah-web-client-bastetSrc = fetchFromGitHub {
|
||||
owner = "foldingathome";
|
||||
repo = "fah-web-client-bastet";
|
||||
rev = "v${version}";
|
||||
hash = lib.fakeHash;
|
||||
fah-client = stdenv.mkDerivation {
|
||||
pname = "fah-client";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FoldingAtHome";
|
||||
repo = "fah-client-bastet";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-IgT/5NqCwN8N8OObjtASuT4IRb2EN4bdixxUdjiyddI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ scons ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
postUnpack = ''
|
||||
export CBANG_HOME=$NIX_BUILD_TOP/cbang
|
||||
|
||||
cp -r --no-preserve=mode ${cbangSrc} $CBANG_HOME
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
scons -C $CBANG_HOME
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/{bin,share/applications,share/feh-client}
|
||||
|
||||
cp fah-client $out/bin/fah-client
|
||||
|
||||
cp install/lin/fah-client.desktop $out/share/applications/
|
||||
cp -r images $out/share/feh-client/
|
||||
|
||||
sed -e "s|Icon=.*|Icon=$out/share/feh-client/images/fahlogo.png|g" -i $out/share/applications/fah-client.desktop
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "fah-client";
|
||||
inherit version;
|
||||
buildFHSEnv {
|
||||
name = fah-client.name;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FoldingAtHome";
|
||||
repo = "fah-client-bastet";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-IgT/5NqCwN8N8OObjtASuT4IRb2EN4bdixxUdjiyddI=";
|
||||
};
|
||||
targetPkgs = _: [ fah-client ocl-icd ] ++ extraPkgs;
|
||||
|
||||
nativeBuildInputs = [ scons ];
|
||||
runScript = "/bin/fah-client";
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
postUnpack = ''
|
||||
export CBANG_HOME=$NIX_BUILD_TOP/cbang
|
||||
|
||||
cp -r --no-preserve=mode ${cbangSrc} $CBANG_HOME
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
scons -C $CBANG_HOME
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/{bin,share/applications,share/feh-client}
|
||||
|
||||
cp fah-client $out/bin/fah-client
|
||||
|
||||
cp install/lin/fah-client.desktop $out/share/applications/
|
||||
cp -r images $out/share/feh-client/
|
||||
|
||||
sed -e "s|Icon=.*|Icon=$out/share/feh-client/images/fahlogo.png|g" -i $out/share/applications/fah-client.desktop
|
||||
|
||||
runHook postInstall
|
||||
extraInstallCommands = ''
|
||||
mv $out/bin/$name $out/bin/fah-client
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Folding@home client";
|
||||
homepage = "https://foldingathome.org/";
|
||||
license = lib.licenses.gpl3;
|
||||
mainProgram = "fah-client";
|
||||
maintainers = [ lib.maintainers.zimbatm ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
|
@ -1,4 +1,14 @@
|
||||
{ lib, stdenv, fetchurl, cmake, hwloc, fftw, perl, blas, lapack, mpi, cudatoolkit
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, cmake
|
||||
, hwloc
|
||||
, fftw
|
||||
, perl
|
||||
, blas
|
||||
, lapack
|
||||
, mpi
|
||||
, cudaPackages
|
||||
, plumed
|
||||
, singlePrec ? true
|
||||
, config
|
||||
@ -9,6 +19,8 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (cudaPackages.cudaFlags) cudaCapabilities dropDot;
|
||||
|
||||
# Select reasonable defaults for all major platforms
|
||||
# The possible values are defined in CMakeLists.txt:
|
||||
# AUTO None SSE2 SSE4.1 AVX_128_FMA AVX_256 AVX2_256
|
||||
@ -52,7 +64,7 @@ in stdenv.mkDerivation rec {
|
||||
nativeBuildInputs =
|
||||
[ cmake ]
|
||||
++ lib.optional enablePlumed plumed
|
||||
;
|
||||
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
|
||||
|
||||
buildInputs = [
|
||||
fftw
|
||||
@ -61,13 +73,17 @@ in stdenv.mkDerivation rec {
|
||||
blas
|
||||
lapack
|
||||
] ++ lib.optional enableMpi mpi
|
||||
++ lib.optional enableCuda cudatoolkit
|
||||
;
|
||||
++ lib.optionals enableCuda [
|
||||
cudaPackages.cuda_cudart
|
||||
cudaPackages.libcufft
|
||||
cudaPackages.cuda_profiler_api
|
||||
];
|
||||
|
||||
propagatedBuildInputs = lib.optional enableMpi mpi;
|
||||
propagatedUserEnvPkgs = lib.optional enableMpi mpi;
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "GMX_HWLOC" true)
|
||||
"-DGMX_SIMD:STRING=${SIMD cpuAcceleration}"
|
||||
"-DGMX_OPENMP:BOOL=TRUE"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
@ -87,7 +103,13 @@ in stdenv.mkDerivation rec {
|
||||
else [
|
||||
"-DGMX_MPI:BOOL=FALSE"
|
||||
]
|
||||
) ++ lib.optional enableCuda "-DGMX_GPU=CUDA";
|
||||
) ++ lib.optionals enableCuda [
|
||||
"-DGMX_GPU=CUDA"
|
||||
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
|
||||
|
||||
# Gromacs seems to ignore and override the normal variables, so we add this ad hoc:
|
||||
(lib.cmakeFeature "GMX_CUDA_TARGET_COMPUTE" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
moveToOutput share/cmake $dev
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "git-town";
|
||||
version = "9.0.1";
|
||||
version = "10.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "git-town";
|
||||
repo = "git-town";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-JvN7te59uRMC0TOWsBUYNEPLIn4nLlIvXI5gOQfQaCU=";
|
||||
hash = "sha256-b4NwimMHF5023I0NvfYMlYIJA9Tj6wPwfKDI4Fmo3lg=";
|
||||
};
|
||||
|
||||
vendorHash = null;
|
||||
@ -55,7 +55,7 @@ buildGoModule rec {
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = git-town;
|
||||
command = "git-town version";
|
||||
command = "git-town --version";
|
||||
version = "v${version}";
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
, gtk4
|
||||
, libadwaita
|
||||
, gst_all_1
|
||||
, ffmpeg-full
|
||||
, ffmpeg-headless
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH : "${lib.makeBinPath [ ffmpeg-full ]}"
|
||||
--prefix PATH : "${lib.makeBinPath [ ffmpeg-headless ]}"
|
||||
)
|
||||
'';
|
||||
|
||||
|
@ -5,16 +5,14 @@ npmInstallHook() {
|
||||
|
||||
runHook preInstall
|
||||
|
||||
# `npm pack` writes to cache
|
||||
npm config delete cache
|
||||
|
||||
local -r packageOut="$out/lib/node_modules/$(@jq@ --raw-output '.name' package.json)"
|
||||
|
||||
# `npm pack` writes to cache so temporarily override it
|
||||
while IFS= read -r file; do
|
||||
local dest="$packageOut/$(dirname "$file")"
|
||||
mkdir -p "$dest"
|
||||
cp "${npmWorkspace-.}/$file" "$dest"
|
||||
done < <(@jq@ --raw-output '.[0].files | map(.path) | join("\n")' <<< "$(npm pack --json --dry-run --loglevel=warn --no-foreground-scripts ${npmWorkspace+--workspace=$npmWorkspace} $npmPackFlags "${npmPackFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}")")
|
||||
done < <(@jq@ --raw-output '.[0].files | map(.path) | join("\n")' <<< "$(npm_config_cache="$HOME/.npm" npm pack --json --dry-run --loglevel=warn --no-foreground-scripts ${npmWorkspace+--workspace=$npmWorkspace} $npmPackFlags "${npmPackFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}")")
|
||||
|
||||
# Based on code from Python's buildPythonPackage wrap.sh script, for
|
||||
# supporting both the case when makeWrapperArgs is an array and a
|
||||
|
@ -246,7 +246,9 @@ fn main() -> anyhow::Result<()> {
|
||||
packages.into_par_iter().try_for_each(|package| {
|
||||
eprintln!("{}", package.name);
|
||||
|
||||
let tarball = package.tarball()?;
|
||||
let tarball = package
|
||||
.tarball()
|
||||
.map_err(|e| anyhow!("couldn't fetch {} at {}: {e:?}", package.name, package.url))?;
|
||||
let integrity = package.integrity().map(ToString::to_string);
|
||||
|
||||
cache
|
||||
|
@ -214,29 +214,35 @@ fn to_new_packages(
|
||||
}
|
||||
|
||||
if let UrlOrString::Url(v) = &package.version {
|
||||
for (scheme, host) in [
|
||||
("github", "github.com"),
|
||||
("bitbucket", "bitbucket.org"),
|
||||
("gitlab", "gitlab.com"),
|
||||
] {
|
||||
if v.scheme() == scheme {
|
||||
package.version = {
|
||||
let mut new_url = initial_url.clone();
|
||||
if v.scheme() == "npm" {
|
||||
if let Some(UrlOrString::Url(ref url)) = &package.resolved {
|
||||
package.version = UrlOrString::Url(url.clone());
|
||||
}
|
||||
} else {
|
||||
for (scheme, host) in [
|
||||
("github", "github.com"),
|
||||
("bitbucket", "bitbucket.org"),
|
||||
("gitlab", "gitlab.com"),
|
||||
] {
|
||||
if v.scheme() == scheme {
|
||||
package.version = {
|
||||
let mut new_url = initial_url.clone();
|
||||
|
||||
new_url.set_host(Some(host))?;
|
||||
new_url.set_host(Some(host))?;
|
||||
|
||||
if v.path().ends_with(".git") {
|
||||
new_url.set_path(v.path());
|
||||
} else {
|
||||
new_url.set_path(&format!("{}.git", v.path()));
|
||||
}
|
||||
if v.path().ends_with(".git") {
|
||||
new_url.set_path(v.path());
|
||||
} else {
|
||||
new_url.set_path(&format!("{}.git", v.path()));
|
||||
}
|
||||
|
||||
new_url.set_fragment(v.fragment());
|
||||
new_url.set_fragment(v.fragment());
|
||||
|
||||
UrlOrString::Url(new_url)
|
||||
};
|
||||
UrlOrString::Url(new_url)
|
||||
};
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -266,7 +272,8 @@ fn get_initial_url() -> anyhow::Result<Url> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{
|
||||
get_initial_url, to_new_packages, Hash, HashCollection, OldPackage, Package, UrlOrString,
|
||||
get_initial_url, packages, to_new_packages, Hash, HashCollection, OldPackage, Package,
|
||||
UrlOrString,
|
||||
};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
@ -328,4 +335,36 @@ mod tests {
|
||||
Some(Hash(String::from("sha512-foo")))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_lockfile_correctly() {
|
||||
let packages = packages(
|
||||
r#"{
|
||||
"name": "node-ddr",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"string-width-cjs": {
|
||||
"version": "npm:string-width@4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
}"#).unwrap();
|
||||
|
||||
assert_eq!(packages.len(), 1);
|
||||
assert_eq!(
|
||||
packages[0].resolved,
|
||||
Some(UrlOrString::Url(
|
||||
Url::parse("https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz")
|
||||
.unwrap()
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
{lib, stdenv, makeWrapper, python, toposort, rpm}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "nix-template-rpm";
|
||||
version = "0.1";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ python toposort rpm ];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${./nix-template-rpm.py} $out/bin/nix-template-rpm
|
||||
wrapProgram $out/bin/nix-template-rpm \
|
||||
--set PYTHONPATH "${rpm}/lib/${python.libPrefix}/site-packages":"${toposort}/lib/${python.libPrefix}/site-packages"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Create templates of nix expressions from RPM .spec files";
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.unix;
|
||||
hydraPlatforms = [];
|
||||
};
|
||||
}
|
@ -1,518 +0,0 @@
|
||||
#!/bin/env python
|
||||
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
import argparse
|
||||
import re
|
||||
import shutil
|
||||
import rpm
|
||||
import urlparse
|
||||
import traceback
|
||||
import toposort
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class SPECTemplate(object):
|
||||
def __init__(self, specFilename, outputDir, inputDir=None, buildRootInclude=None, translateTable=None, repositoryDir=None, allPackagesDir=None, maintainer="MAINTAINER"):
|
||||
rpm.addMacro("buildroot","$out")
|
||||
rpm.addMacro("_libdir","lib")
|
||||
rpm.addMacro("_libexecdir","libexec")
|
||||
rpm.addMacro("_sbindir","sbin")
|
||||
rpm.addMacro("_sysconfdir","etc")
|
||||
rpm.addMacro("_topdir","SPACER_DIR_FOR_REMOVAL")
|
||||
rpm.addMacro("_sourcedir","SOURCE_DIR_SPACER")
|
||||
|
||||
self.packageGroups = [ "ocaml", "python" ]
|
||||
|
||||
ts = rpm.TransactionSet()
|
||||
|
||||
self.specFilename = specFilename
|
||||
self.spec = ts.parseSpec(specFilename)
|
||||
|
||||
self.inputDir = inputDir
|
||||
self.buildRootInclude = buildRootInclude
|
||||
self.repositoryDir = repositoryDir
|
||||
self.allPackagesDir = allPackagesDir
|
||||
self.maintainer = maintainer
|
||||
|
||||
self.translateTable = translateTable
|
||||
|
||||
self.facts = self.getFacts()
|
||||
self.key = self.getSelfKey()
|
||||
|
||||
tmpDir = os.path.join(outputDir, self.rewriteName(self.spec.sourceHeader['name']))
|
||||
if self.translateTable is not None:
|
||||
self.relOutputDir = self.translateTable.path(self.key,tmpDir)
|
||||
else:
|
||||
self.relOutputDir = tmpDir
|
||||
|
||||
self.final_output_dir = os.path.normpath( self.relOutputDir )
|
||||
|
||||
if self.repositoryDir is not None:
|
||||
self.potential_repository_dir = os.path.normpath( os.path.join(self.repositoryDir,self.relOutputDir) )
|
||||
|
||||
|
||||
|
||||
def rewriteCommands(self, string):
|
||||
string = string.replace('SPACER_DIR_FOR_REMOVAL/','')
|
||||
string = string.replace('SPACER_DIR_FOR_REMOVAL','')
|
||||
string = '\n'.join(map(lambda line: ' '.join(map(lambda x: x.replace('SOURCE_DIR_SPACER/',('${./' if (self.buildRootInclude is None) else '${buildRoot}/usr/share/buildroot/SOURCES/'))+('}' if (self.buildRootInclude is None) else '') if x.startswith('SOURCE_DIR_SPACER/') else x, line.split(' '))), string.split('\n')))
|
||||
string = string.replace('\n','\n ')
|
||||
string = string.rstrip()
|
||||
return string
|
||||
|
||||
|
||||
def rewriteName(self, string):
|
||||
parts = string.split('-')
|
||||
parts = filter(lambda x: not x == "devel", parts)
|
||||
parts = filter(lambda x: not x == "doc", parts)
|
||||
if len(parts) > 1 and parts[0] in self.packageGroups:
|
||||
return parts[0] + '-' + ''.join(parts[1:2] + map(lambda x: x.capitalize(), parts[2:]))
|
||||
else:
|
||||
return ''.join(parts[:1] + map(lambda x: x.capitalize(), parts[1:]))
|
||||
|
||||
|
||||
def rewriteInputs(self,target,inputs):
|
||||
camelcase = lambda l: l[:1] + map(lambda x: x.capitalize(), l[1:])
|
||||
filterDevel = lambda l: filter(lambda x: not x == "devel", l)
|
||||
filterDoc = lambda l: filter(lambda x: not x == "doc", l)
|
||||
rewrite = lambda l: ''.join(camelcase(filterDoc(filterDevel(l))))
|
||||
|
||||
def filterPackageGroup(target):
|
||||
if target is None:
|
||||
return [ rewrite(x.split('-')) for x in inputs if (not x.split('-')[0] in self.packageGroups) or (len(x.split('-')) == 1) ]
|
||||
elif target in self.packageGroups:
|
||||
return [ target + '_' + rewrite(x.split('-')[1:]) for x in inputs if (x.split('-')[0] == target) and (len(x.split('-')) > 1)]
|
||||
else:
|
||||
raise Exception("Unknown target")
|
||||
return []
|
||||
|
||||
if target is None:
|
||||
packages = filterPackageGroup(None)
|
||||
packages.sort()
|
||||
elif target in self.packageGroups:
|
||||
packages = filterPackageGroup(target)
|
||||
packages.sort()
|
||||
elif target == "ALL":
|
||||
packages = []
|
||||
for t in [None] + self.packageGroups:
|
||||
tmp = filterPackageGroup(t)
|
||||
tmp.sort()
|
||||
packages += tmp
|
||||
else:
|
||||
raise Exception("Unknown target")
|
||||
packages = []
|
||||
|
||||
return packages
|
||||
|
||||
|
||||
def getBuildInputs(self,target=None):
|
||||
inputs = self.rewriteInputs(target,self.spec.sourceHeader['requires'])
|
||||
if self.translateTable is not None:
|
||||
return map(lambda x: self.translateTable.name(x), inputs)
|
||||
else:
|
||||
return inputs
|
||||
|
||||
def getSelfKey(self):
|
||||
name = self.spec.sourceHeader['name']
|
||||
if len(name.split('-')) > 1 and name.split('-')[0] in self.packageGroups:
|
||||
key = self.rewriteInputs(name.split('-')[0], [self.spec.sourceHeader['name']])[0]
|
||||
else:
|
||||
key = self.rewriteInputs(None, [self.spec.sourceHeader['name']])[0]
|
||||
return key
|
||||
|
||||
def getSelf(self):
|
||||
if self.translateTable is not None:
|
||||
return self.translateTable.name(self.key)
|
||||
else:
|
||||
return self.key
|
||||
|
||||
|
||||
|
||||
|
||||
def copyPatches(self, input_dir, output_dir):
|
||||
patches = [source for (source, _, flag) in self.spec.sources if flag==2]
|
||||
for filename in patches:
|
||||
shutil.copyfile(os.path.join(input_dir, filename), os.path.join(output_dir, filename))
|
||||
|
||||
|
||||
def copySources(self, input_dir, output_dir):
|
||||
filenames = [source for (source, _, flag) in self.spec.sources if flag==1 if not urlparse.urlparse(source).scheme in ["http", "https"] ]
|
||||
for filename in filenames:
|
||||
shutil.copyfile(os.path.join(input_dir, filename), os.path.join(output_dir, filename))
|
||||
|
||||
|
||||
def getFacts(self):
|
||||
facts = {}
|
||||
facts["name"] = self.rewriteName(self.spec.sourceHeader['name'])
|
||||
facts["version"] = self.spec.sourceHeader['version']
|
||||
|
||||
facts["url"] = []
|
||||
facts["sha256"] = []
|
||||
sources = [source for (source, _, flag) in self.spec.sources if flag==1 if urlparse.urlparse(source).scheme in ["http", "https"] ]
|
||||
for url in sources:
|
||||
p = subprocess.Popen(['nix-prefetch-url', url], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
output, err = p.communicate()
|
||||
sha256 = output[:-1] #remove new line
|
||||
facts["url"].append(url)
|
||||
facts["sha256"].append(sha256)
|
||||
|
||||
patches = [source for (source, _, flag) in self.spec.sources if flag==2]
|
||||
if self.buildRootInclude is None:
|
||||
facts["patches"] = map(lambda x: './'+x, patches)
|
||||
else:
|
||||
facts["patches"] = map(lambda x: '"${buildRoot}/usr/share/buildroot/SOURCES/'+x+'"', reversed(patches))
|
||||
|
||||
return facts
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
out = ' name = "' + self.facts["name"] + '-' + self.facts["version"] + '";\n'
|
||||
out += ' version = "' + self.facts['version'] + '";\n'
|
||||
return out
|
||||
|
||||
|
||||
@property
|
||||
def src(self):
|
||||
sources = [source for (source, _, flag) in self.spec.sources if flag==1 if urlparse.urlparse(source).scheme in ["http", "https"] ]
|
||||
out = ''
|
||||
for (url,sha256) in zip(self.facts['url'],self.facts['sha256']):
|
||||
out += ' src = fetchurl {\n'
|
||||
out += ' url = "' + url + '";\n'
|
||||
out += ' sha256 = "' + sha256 + '";\n'
|
||||
out += ' };\n'
|
||||
return out
|
||||
|
||||
|
||||
@property
|
||||
def patch(self):
|
||||
out = ' patches = [ ' + ' '.join(self.facts['patches']) + ' ];\n'
|
||||
return out
|
||||
|
||||
|
||||
@property
|
||||
def buildInputs(self):
|
||||
out = ' buildInputs = [ '
|
||||
out += ' '.join(self.getBuildInputs("ALL"))
|
||||
out += ' ];\n'
|
||||
return out
|
||||
|
||||
|
||||
@property
|
||||
def configure(self):
|
||||
out = ' configurePhase = \'\'\n ' + self.rewriteCommands(self.spec.prep) + '\n \'\';\n';
|
||||
return out
|
||||
|
||||
|
||||
@property
|
||||
def build(self):
|
||||
out = ' buildPhase = \'\'\n ' + self.rewriteCommands(self.spec.build) + '\n \'\';\n';
|
||||
return out
|
||||
|
||||
|
||||
@property
|
||||
def install(self):
|
||||
out = ' installPhase = \'\'\n ' + self.rewriteCommands(self.spec.install) + '\n \'\';\n';
|
||||
return out
|
||||
|
||||
@property
|
||||
def ocamlExtra(self):
|
||||
if "ocaml" in self.getBuildInputs("ALL"):
|
||||
return ' createFindlibDestdir = true;\n'
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
||||
@property
|
||||
def meta(self):
|
||||
out = ' meta = with lib; {\n'
|
||||
out += ' homepage = ' + self.spec.sourceHeader['url'] + ';\n'
|
||||
out += ' description = "' + self.spec.sourceHeader['summary'] + '";\n'
|
||||
out += ' license = lib.licenses.' + self.spec.sourceHeader['license'] + ';\n'
|
||||
out += ' platforms = [ "i686-linux" "x86_64-linux" ];\n'
|
||||
out += ' maintainers = with lib.maintainers; [ ' + self.maintainer + ' ];\n'
|
||||
out += ' };\n'
|
||||
out += '}\n'
|
||||
return out
|
||||
|
||||
|
||||
def __str__(self):
|
||||
head = '{lib, stdenv, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
|
||||
head += 'stdenv.mkDerivation {\n'
|
||||
body = [ self.name, self.src, self.patch, self.buildInputs, self.configure, self.build, self.ocamlExtra, self.install, self.meta ]
|
||||
return head + '\n'.join(body)
|
||||
|
||||
|
||||
def getTemplate(self):
|
||||
head = '{lib, stdenv, buildRoot, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
|
||||
head += 'let\n'
|
||||
head += ' buildRootInput = (import "${buildRoot}/usr/share/buildroot/buildRootInput.nix") { fetchurl=fetchurl; buildRoot=buildRoot; };\n'
|
||||
head += 'in\n\n'
|
||||
head += 'stdenv.mkDerivation {\n'
|
||||
head += ' inherit (buildRootInput.'+self.rewriteName(self.spec.sourceHeader['name'])+') name version src;\n'
|
||||
head += ' patches = buildRootInput.'+self.rewriteName(self.spec.sourceHeader['name'])+'.patches ++ [];\n\n'
|
||||
body = [ self.buildInputs, self.configure, self.build, self.ocamlExtra, self.install, self.meta ]
|
||||
return head + '\n'.join(body)
|
||||
|
||||
|
||||
def getInclude(self):
|
||||
head = self.rewriteName(self.spec.sourceHeader['name']) + ' = {\n'
|
||||
body = [ self.name, self.src, self.patch ]
|
||||
return head + '\n'.join(body) + '};\n'
|
||||
|
||||
|
||||
def __cmp__(self,other):
|
||||
if self.getSelf() in other.getBuildInputs("ALL"):
|
||||
return 1
|
||||
else:
|
||||
return -1
|
||||
|
||||
|
||||
def callPackage(self):
|
||||
callPackage = ' ' + self.getSelf() + ' = callPackage ' + os.path.relpath(self.final_output_dir, self.allPackagesDir) + ' {'
|
||||
newline = False;
|
||||
for target in self.packageGroups:
|
||||
tmp = self.getBuildInputs(target)
|
||||
if len(tmp) > 0:
|
||||
newline = True;
|
||||
callPackage += '\n ' + 'inherit (' + target + 'Packages) ' + ' '.join(tmp) + ';'
|
||||
if newline:
|
||||
callPackage += '\n };'
|
||||
else:
|
||||
callPackage += ' };'
|
||||
return callPackage
|
||||
|
||||
|
||||
|
||||
def generateCombined(self):
|
||||
if not os.path.exists(self.final_output_dir):
|
||||
os.makedirs(self.final_output_dir)
|
||||
|
||||
if self.inputDir is not None:
|
||||
self.copySources(self.inputDir, self.final_output_dir)
|
||||
self.copyPatches(self.inputDir, self.final_output_dir)
|
||||
|
||||
nixfile = open(os.path.join(self.final_output_dir,'default.nix'), 'w')
|
||||
nixfile.write(str(self))
|
||||
nixfile.close()
|
||||
|
||||
shutil.copyfile(self.specFilename, os.path.join(self.final_output_dir, os.path.basename(self.specFilename)))
|
||||
|
||||
|
||||
|
||||
def generateSplit(self):
|
||||
if not os.path.exists(self.final_output_dir):
|
||||
os.makedirs(self.final_output_dir)
|
||||
|
||||
nixfile = open(os.path.join(self.final_output_dir,'default.nix'), 'w')
|
||||
nixfile.write(self.getTemplate())
|
||||
nixfile.close()
|
||||
|
||||
return self.getInclude()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class NixTemplate(object):
|
||||
def __init__(self, nixfile):
|
||||
self.nixfile = nixfile
|
||||
self.original = { "name":None, "version":None, "url":None, "sha256":None, "patches":None }
|
||||
self.update = { "name":None, "version":None, "url":None, "sha256":None, "patches":None }
|
||||
self.matchedLines = {}
|
||||
|
||||
if os.path.isfile(nixfile):
|
||||
with file(nixfile, 'r') as infile:
|
||||
for (n,line) in enumerate(infile):
|
||||
name = re.match(r'^\s*name\s*=\s*"(.*?)"\s*;\s*$', line)
|
||||
version = re.match(r'^\s*version\s*=\s*"(.*?)"\s*;\s*$', line)
|
||||
url = re.match(r'^\s*url\s*=\s*"?(.*?)"?\s*;\s*$', line)
|
||||
sha256 = re.match(r'^\s*sha256\s*=\s*"(.*?)"\s*;\s*$', line)
|
||||
patches = re.match(r'^\s*patches\s*=\s*(\[.*?\])\s*;\s*$', line)
|
||||
if name is not None and self.original["name"] is None:
|
||||
self.original["name"] = name.group(1)
|
||||
self.matchedLines[n] = "name"
|
||||
if version is not None and self.original["version"] is None:
|
||||
self.original["version"] = version.group(1)
|
||||
self.matchedLines[n] = "version"
|
||||
if url is not None and self.original["url"] is None:
|
||||
self.original["url"] = url.group(1)
|
||||
self.matchedLines[n] = "url"
|
||||
if sha256 is not None and self.original["sha256"] is None:
|
||||
self.original["sha256"] = sha256.group(1)
|
||||
self.matchedLines[n] = "sha256"
|
||||
if patches is not None and self.original["patches"] is None:
|
||||
self.original["patches"] = patches.group(1)
|
||||
self.matchedLines[n] = "patches"
|
||||
|
||||
|
||||
def generateUpdated(self, nixOut):
|
||||
nixTemplateFile = open(os.path.normpath(self.nixfile),'r')
|
||||
nixOutFile = open(os.path.normpath(nixOut),'w')
|
||||
for (n,line) in enumerate(nixTemplateFile):
|
||||
if self.matchedLines.has_key(n) and self.update[self.matchedLines[n]] is not None:
|
||||
nixOutFile.write(line.replace(self.original[self.matchedLines[n]], self.update[self.matchedLines[n]], 1))
|
||||
else:
|
||||
nixOutFile.write(line)
|
||||
nixTemplateFile.close()
|
||||
nixOutFile.close()
|
||||
|
||||
|
||||
def loadUpdate(self,orig):
|
||||
if orig.has_key("name") and orig.has_key("version"):
|
||||
self.update["name"] = orig["name"] + '-' + orig["version"]
|
||||
self.update["version"] = orig["version"]
|
||||
if orig.has_key("url") and orig.has_key("sha256") and len(orig["url"])>0:
|
||||
self.update["url"] = orig["url"][0]
|
||||
self.update["sha256"] = orig["sha256"][0]
|
||||
for url in orig["url"][1:-1]:
|
||||
sys.stderr.write("WARNING: URL has been dropped: %s\n" % url)
|
||||
if orig.has_key("patches"):
|
||||
self.update["patches"] = '[ ' + ' '.join(orig['patches']) + ' ]'
|
||||
|
||||
|
||||
class TranslationTable(object):
|
||||
def __init__(self):
|
||||
self.tablePath = {}
|
||||
self.tableName = {}
|
||||
|
||||
def update(self, key, path, name=None):
|
||||
self.tablePath[key] = path
|
||||
if name is not None:
|
||||
self.tableName[key] = name
|
||||
|
||||
def readTable(self, tableFile):
|
||||
with file(tableFile, 'r') as infile:
|
||||
for line in infile:
|
||||
match = re.match(r'^(.+?)\s+(.+?)\s+(.+?)\s*$', line)
|
||||
if match is not None:
|
||||
if not self.tablePath.has_key(match.group(1)):
|
||||
self.tablePath[match.group(1)] = match.group(2)
|
||||
if not self.tableName.has_key(match.group(1)):
|
||||
self.tableName[match.group(1)] = match.group(3)
|
||||
else:
|
||||
match = re.match(r'^(.+?)\s+(.+?)\s*$', line)
|
||||
if not self.tablePath.has_key(match.group(1)):
|
||||
self.tablePath[match.group(1)] = match.group(2)
|
||||
|
||||
def writeTable(self, tableFile):
|
||||
outFile = open(os.path.normpath(tableFile),'w')
|
||||
keys = self.tablePath.keys()
|
||||
keys.sort()
|
||||
for k in keys:
|
||||
if self.tableName.has_key(k):
|
||||
outFile.write( k + " " + self.tablePath[k] + " " + self.tableName[k] + "\n" )
|
||||
else:
|
||||
outFile.write( k + " " + self.tablePath[k] + "\n" )
|
||||
outFile.close()
|
||||
|
||||
def name(self, key):
|
||||
if self.tableName.has_key(key):
|
||||
return self.tableName[key]
|
||||
else:
|
||||
return key
|
||||
|
||||
def path(self, key, orig):
|
||||
if self.tablePath.has_key(key):
|
||||
return self.tablePath[key]
|
||||
else:
|
||||
return orig
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#Parse command line options
|
||||
parser = argparse.ArgumentParser(description="Generate .nix templates from RPM spec files")
|
||||
parser.add_argument("specs", metavar="SPEC", nargs="+", help="spec file")
|
||||
parser.add_argument("-o", "--output", metavar="OUT_DIR", required=True, help="output directory")
|
||||
parser.add_argument("-b", "--buildRoot", metavar="BUILDROOT_DIR", default=None, help="buildroot output directory")
|
||||
parser.add_argument("-i", "--inputSources", metavar="IN_DIR", default=None, help="sources input directory")
|
||||
parser.add_argument("-m", "--maintainer", metavar="MAINTAINER", default="__NIX_MAINTAINER__", help="package maintainer")
|
||||
parser.add_argument("-r", "--repository", metavar="REP_DIR", default=None, help="nix repository to compare output against")
|
||||
parser.add_argument("-t", "--translate", metavar="TRANSLATE_TABLE", default=None, help="path of translation table for name and path")
|
||||
parser.add_argument("-u", "--translateOut", metavar="TRANSLATE_OUT", default=None, help="output path for updated translation table")
|
||||
parser.add_argument("-a", "--allPackages", metavar="ALL_PACKAGES", default=None, help="top level dir to call packages from")
|
||||
args = parser.parse_args()
|
||||
|
||||
allPackagesDir = os.path.normpath( os.path.dirname(args.allPackages) )
|
||||
if not os.path.exists(allPackagesDir):
|
||||
os.makedirs(allPackagesDir)
|
||||
|
||||
buildRootContent = {}
|
||||
nameMap = {}
|
||||
|
||||
newTable = TranslationTable()
|
||||
if args.translate is not None:
|
||||
table = TranslationTable()
|
||||
table.readTable(args.translate)
|
||||
newTable.readTable(args.translate)
|
||||
else:
|
||||
table = None
|
||||
|
||||
for specPath in args.specs:
|
||||
try:
|
||||
sys.stderr.write("INFO: generate nix file from: %s\n" % specPath)
|
||||
|
||||
spec = SPECTemplate(specPath, args.output, args.inputSources, args.buildRoot, table, args.repository, allPackagesDir, args.maintainer)
|
||||
if args.repository is not None:
|
||||
if os.path.exists(os.path.join(spec.potential_repository_dir,'default.nix')):
|
||||
nixTemplate = NixTemplate(os.path.join(spec.potential_repository_dir,'default.nix'))
|
||||
nixTemplate.loadUpdate(spec.facts)
|
||||
if not os.path.exists(spec.final_output_dir):
|
||||
os.makedirs(spec.final_output_dir)
|
||||
nixTemplate.generateUpdated(os.path.join(spec.final_output_dir,'default.nix'))
|
||||
else:
|
||||
sys.stderr.write("WARNING: Repository does not contain template: %s\n" % os.path.join(spec.potential_repository_dir,'default.nix'))
|
||||
if args.buildRoot is None:
|
||||
spec.generateCombined()
|
||||
else:
|
||||
buildRootContent[spec.key] = spec.generateSplit()
|
||||
else:
|
||||
if args.buildRoot is None:
|
||||
spec.generateCombined()
|
||||
else:
|
||||
buildRootContent[spec.key] = spec.generateSplit()
|
||||
|
||||
newTable.update(spec.key,spec.relOutputDir,spec.getSelf())
|
||||
nameMap[spec.getSelf()] = spec
|
||||
|
||||
except Exception, e:
|
||||
sys.stderr.write("ERROR: %s failed with:\n%s\n%s\n" % (specPath,e.message,traceback.format_exc()))
|
||||
|
||||
if args.translateOut is not None:
|
||||
if not os.path.exists(os.path.dirname(os.path.normpath(args.translateOut))):
|
||||
os.makedirs(os.path.dirname(os.path.normpath(args.translateOut)))
|
||||
newTable.writeTable(args.translateOut)
|
||||
|
||||
graph = {}
|
||||
for k, v in nameMap.items():
|
||||
graph[k] = set(v.getBuildInputs("ALL"))
|
||||
|
||||
sortedSpecs = toposort.toposort_flatten(graph)
|
||||
sortedSpecs = filter( lambda x: x in nameMap.keys(), sortedSpecs)
|
||||
|
||||
allPackagesFile = open(os.path.normpath( args.allPackages ), 'w')
|
||||
allPackagesFile.write( '\n\n'.join(map(lambda x: x.callPackage(), map(lambda x: nameMap[x], sortedSpecs))) )
|
||||
allPackagesFile.close()
|
||||
|
||||
if args.buildRoot is not None:
|
||||
buildRootFilename = os.path.normpath( args.buildRoot )
|
||||
if not os.path.exists(os.path.dirname(buildRootFilename)):
|
||||
os.makedirs(os.path.dirname(buildRootFilename))
|
||||
buildRootFile = open(buildRootFilename, 'w')
|
||||
buildRootFile.write( "{ fetchurl, buildRoot }: {\n\n" )
|
||||
keys = buildRootContent.keys()
|
||||
keys.sort()
|
||||
for k in keys:
|
||||
buildRootFile.write( buildRootContent[k] + '\n' )
|
||||
buildRootFile.write( "}\n" )
|
||||
buildRootFile.close()
|
||||
|
||||
|
38
pkgs/by-name/cg/cgl/package.nix
Normal file
38
pkgs/by-name/cg/cgl/package.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, clp
|
||||
, coin-utils
|
||||
, osi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cgl";
|
||||
version = "0.60.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "coin-or";
|
||||
repo = "Cgl";
|
||||
rev = "releases/${finalAttrs.version}";
|
||||
hash = "sha256-nyqrHC6UOKp1wn6Yvk+53oBn60wUqSWEPUrcNTuPN04=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
clp
|
||||
coin-utils
|
||||
osi
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Cut Generator Library";
|
||||
homepage = "https://github.com/coin-or/Cgl";
|
||||
license = licenses.epl20;
|
||||
maintainers = with maintainers; [ wegank ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
})
|
@ -13,10 +13,10 @@ let
|
||||
}.${system} or throwSystem;
|
||||
|
||||
hash = {
|
||||
x86_64-linux = "sha256-6dbgmYyXOUuWGOFXcO9eEZVoRjRLWK906SJh27wZ+PY=";
|
||||
aarch64-linux = "sha256-cO1+ZVXC25zO5msU6Nbp29vkkNFRQ2jKSxtCZw1H104=";
|
||||
x86_64-darwin = "sha256-3KMSoFQz7kYinD4QbS82dIq6UDetfdky6ClIfP83ISg=";
|
||||
aarch64-darwin = "sha256-bj8PVJ4pfrNXo1yn5UbkHflskZMS61+LM9hi9mtdXtk=";
|
||||
x86_64-linux = "sha256-/6ss/VRH4ehEgC0DCMoGHxnJzD7zNJXWZ0ZAE5odyig=";
|
||||
aarch64-linux = "sha256-vIAy/2FNIZINyfYedvAsvmXntcvzeCilDsoLtTDDE8c=";
|
||||
x86_64-darwin = "sha256-1nqAaU6zQ4cMmYBDffNpeO6cPQqwx4efZGSPX6fRRZA=";
|
||||
aarch64-darwin = "sha256-TjPOr7+GbEyE8s3XZNczkjAzlEhz9Gd47nhU6rQiga4=";
|
||||
}.${system} or throwSystem;
|
||||
|
||||
bin = "$out/bin/codeium_language_server";
|
||||
@ -24,7 +24,7 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "codeium";
|
||||
version = "1.4.16";
|
||||
version = "1.4.26";
|
||||
src = fetchurl {
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}.gz";
|
||||
url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${finalAttrs.version}/language_server_${plat}.gz";
|
||||
|
@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# pkg-config output patching hook expects prefix variable here
|
||||
substituteInPlace data/dbus-cpp.pc.in \
|
||||
--replace 'includedir=''${exec_prefix}' 'includedir=''${prefix}'
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
|
||||
'';
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
, php
|
||||
, testers
|
||||
, frankenphp
|
||||
, darwin
|
||||
, pkg-config
|
||||
, runCommand
|
||||
, writeText
|
||||
}:
|
||||
@ -13,6 +15,9 @@ let
|
||||
phpEmbedWithZts = php.override {
|
||||
embedSupport = true;
|
||||
ztsSupport = true;
|
||||
staticSupport = stdenv.isDarwin;
|
||||
zendSignalsSupport = false;
|
||||
zendMaxExecutionTimersSupport = stdenv.isLinux;
|
||||
};
|
||||
phpUnwrapped = phpEmbedWithZts.unwrapped;
|
||||
phpConfig = "${phpUnwrapped.dev}/bin/php-config";
|
||||
@ -36,6 +41,7 @@ in buildGoModule rec {
|
||||
vendorHash = "sha256-Lgj/pFtSQIgjrycajJ1zNY3ytvArmuk0E3IjsAzsNdM=";
|
||||
|
||||
buildInputs = [ phpUnwrapped ] ++ phpUnwrapped.buildInputs;
|
||||
nativeBuildInputs = lib.optionals stdenv.isDarwin [ pkg-config darwin.cctools darwin.autoSignDarwinBinariesHook ];
|
||||
|
||||
subPackages = [ "frankenphp" ];
|
||||
|
||||
@ -52,7 +58,15 @@ in buildGoModule rec {
|
||||
export CGO_CFLAGS="$(${phpConfig} --includes)"
|
||||
export CGO_LDFLAGS="-DFRANKENPHP_VERSION=${version} \
|
||||
$(${phpConfig} --ldflags) \
|
||||
-Wl,--start-group $(${phpConfig} --libs) -Wl,--end-group"
|
||||
$(${phpConfig} --libs)"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# replace hard-code homebrew path
|
||||
substituteInPlace ../frankenphp.go \
|
||||
--replace "-L/opt/homebrew/opt/libiconv/lib" "-L${darwin.libiconv}/lib"
|
||||
|
||||
# remove when https://github.com/dunglas/frankenphp/pull/331 is merged and released
|
||||
substituteInPlace ../frankenphp.go \
|
||||
--replace "darwin pkg-config: libxml-2.0 sqlite3" "darwin pkg-config: libxml-2.0"
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
@ -82,7 +96,7 @@ in buildGoModule rec {
|
||||
homepage = "https://github.com/dunglas/frankenphp";
|
||||
license = licenses.mit;
|
||||
mainProgram = "frankenphp";
|
||||
maintainers = with maintainers; [ gaelreyrol ];
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ gaelreyrol shyim ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gickup";
|
||||
version = "0.10.22";
|
||||
version = "0.10.23";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cooperspencer";
|
||||
repo = "gickup";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-pF8sckOSmih5rkDv7kvSL9gU4XwBrEIycjzEce01i64=";
|
||||
hash = "sha256-IiiYmzFr4EVBIFr0tZRRq/FPVSE3goA1XiSPJS0QkJM=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-kEy6Per8YibUHRp7E4jzkOgATq3Ub5WCNIe0WiHo2Ro=";
|
||||
|
45
pkgs/by-name/li/libmbd/package.nix
Normal file
45
pkgs/by-name/li/libmbd/package.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, cmake
|
||||
, mpi
|
||||
, blas
|
||||
, lapack
|
||||
, scalapack
|
||||
, gfortran
|
||||
} :
|
||||
|
||||
assert !blas.isILP64;
|
||||
assert !lapack.isILP64;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libMBD";
|
||||
version = "0.12.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libmbd";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-39cvOUTAuuWLGOLdapR5trmCttCnijOWvPhSBTeTxTA=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
cat > cmake/libMBDVersionTag.cmake << EOF
|
||||
set(VERSION_TAG "${version}")
|
||||
EOF
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake gfortran ];
|
||||
|
||||
buildInputs = [ blas lapack scalapack ];
|
||||
|
||||
propagatedBuildInputs = [ mpi ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Many-body dispersion library";
|
||||
homepage = "https://github.com/libmbd/libmbd";
|
||||
license = licenses.mpl20;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
};
|
||||
}
|
3
pkgs/by-name/ma/maid/Gemfile
Normal file
3
pkgs/by-name/ma/maid/Gemfile
Normal file
@ -0,0 +1,3 @@
|
||||
source 'https://rubygems.org'
|
||||
gem 'maid', '~> 0.10.0'
|
||||
gem 'rake'
|
55
pkgs/by-name/ma/maid/Gemfile.lock
Normal file
55
pkgs/by-name/ma/maid/Gemfile.lock
Normal file
@ -0,0 +1,55 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
concurrent-ruby (1.2.2)
|
||||
deprecated (3.0.1)
|
||||
dimensions (1.3.0)
|
||||
escape (0.0.4)
|
||||
et-orbi (1.2.7)
|
||||
tzinfo
|
||||
exifr (1.3.10)
|
||||
ffi (1.15.5)
|
||||
fugit (1.8.1)
|
||||
et-orbi (~> 1, >= 1.2.7)
|
||||
raabro (~> 1.4)
|
||||
geocoder (1.8.2)
|
||||
listen (3.8.0)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
maid (0.10.0)
|
||||
deprecated (~> 3.0.0)
|
||||
dimensions (>= 1.0.0, < 2.0)
|
||||
escape (>= 0.0.1, < 0.1.0)
|
||||
exifr (~> 1.3.10)
|
||||
geocoder (~> 1.8.1)
|
||||
listen (~> 3.8.0)
|
||||
mime-types (~> 3.0, < 4.0)
|
||||
rubyzip (~> 2.3.2)
|
||||
rufus-scheduler (~> 3.8.2)
|
||||
thor (~> 1.2.1)
|
||||
xdg (~> 2.2.3)
|
||||
mime-types (3.5.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2023.0808)
|
||||
raabro (1.4.0)
|
||||
rake (13.0.6)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rubyzip (2.3.2)
|
||||
rufus-scheduler (3.8.2)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
thor (1.2.2)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
xdg (2.2.5)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
maid (~> 0.10.0)
|
||||
rake
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.26
|
230
pkgs/by-name/ma/maid/gemset.nix
Normal file
230
pkgs/by-name/ma/maid/gemset.nix
Normal file
@ -0,0 +1,230 @@
|
||||
{
|
||||
concurrent-ruby = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0krcwb6mn0iklajwngwsg850nk8k9b35dhmc2qkbdqvmifdi2y9q";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.2";
|
||||
};
|
||||
deprecated = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1ky20wy29jdhfy4xdw1lgxggciq4ywizmh265fyvwxbj6svw6b03";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.1";
|
||||
};
|
||||
dimensions = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1jlkyfqk14291wbw8ly46jvp8vrcvswlns4078y1m44bb3rgm123";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.0";
|
||||
};
|
||||
escape = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0sa1xkfc9jvkwyw1jbz3jhkq0ms1zrvswi6mmfiwcisg5fp497z4";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.0.4";
|
||||
};
|
||||
et-orbi = {
|
||||
dependencies = ["tzinfo"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1d2z4ky2v15dpcz672i2p7lb2nc793dasq3yq3660h2az53kss9v";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.7";
|
||||
};
|
||||
exifr = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "08fmmswa9fwymwsa2gzlm856ak3y9kjxdzm4zdrcrfyxs2p8yqwc";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.10";
|
||||
};
|
||||
ffi = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1862ydmclzy1a0cjbvm8dz7847d9rch495ib0zb64y84d3xd4bkg";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.15.5";
|
||||
};
|
||||
fugit = {
|
||||
dependencies = ["et-orbi" "raabro"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1cm2lrvhrpqq19hbdsxf4lq2nkb2qdldbdxh3gvi15l62dlb5zqq";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.8.1";
|
||||
};
|
||||
geocoder = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "120lqyq308q8hg8ykawd7cp3k2ck8z9g5f9ffijp8dn2k9f21fjc";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.8.2";
|
||||
};
|
||||
listen = {
|
||||
dependencies = ["rb-fsevent" "rb-inotify"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "13rgkfar8pp31z1aamxf5y7cfq88wv6rxxcwy7cmm177qq508ycn";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.8.0";
|
||||
};
|
||||
maid = {
|
||||
dependencies = ["deprecated" "dimensions" "escape" "exifr" "geocoder" "listen" "mime-types" "rubyzip" "rufus-scheduler" "thor" "xdg"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0v1lhwgxyli10rinw6h33ikhskx9j3b20h7plrx8c69z05sfsdd9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.10.0";
|
||||
};
|
||||
mime-types = {
|
||||
dependencies = ["mime-types-data"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0q8d881k1b3rbsfcdi3fx0b5vpdr5wcrhn88r2d9j7zjdkxp5mw5";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.5.1";
|
||||
};
|
||||
mime-types-data = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "17zdim7kzrh5j8c97vjqp4xp78wbyz7smdp4hi5iyzk0s9imdn5a";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.2023.0808";
|
||||
};
|
||||
raabro = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "10m8bln9d00dwzjil1k42i5r7l82x25ysbi45fwyv4932zsrzynl";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.4.0";
|
||||
};
|
||||
rake = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15whn7p9nrkxangbs9hh75q585yfn66lv0v2mhj6q6dl6x8bzr2w";
|
||||
type = "gem";
|
||||
};
|
||||
version = "13.0.6";
|
||||
};
|
||||
rb-fsevent = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1zmf31rnpm8553lqwibvv3kkx0v7majm1f341xbxc0bk5sbhp423";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.11.2";
|
||||
};
|
||||
rb-inotify = {
|
||||
dependencies = ["ffi"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.10.1";
|
||||
};
|
||||
rubyzip = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0grps9197qyxakbpw02pda59v45lfgbgiyw48i0mq9f2bn9y6mrz";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.3.2";
|
||||
};
|
||||
rufus-scheduler = {
|
||||
dependencies = ["fugit"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1as4yrb8y5lq49div8p3vqgwrrhdgwnvx4m73y3712nmnlpx6cws";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.8.2";
|
||||
};
|
||||
thor = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0k7j2wn14h1pl4smibasw0bp66kg626drxb59z7rzflch99cd4rg";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.2";
|
||||
};
|
||||
tzinfo = {
|
||||
dependencies = ["concurrent-ruby"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "16w2g84dzaf3z13gxyzlzbf748kylk5bdgg3n1ipvkvvqy685bwd";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.0.6";
|
||||
};
|
||||
xdg = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "04xr4cavnzxlk926pkji7b5yiqy4qsd3gdvv8mg6jliq6sczg9gk";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.2.5";
|
||||
};
|
||||
}
|
23
pkgs/by-name/ma/maid/package.nix
Normal file
23
pkgs/by-name/ma/maid/package.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ bundlerApp
|
||||
, bundlerUpdateScript
|
||||
, callPackage
|
||||
, lib
|
||||
}:
|
||||
|
||||
bundlerApp {
|
||||
pname = "maid";
|
||||
gemdir = ./.;
|
||||
exes = [ "maid" ];
|
||||
|
||||
passthru.updateScript = bundlerUpdateScript "maid";
|
||||
|
||||
passthru.tests.run = callPackage ./test.nix { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Rule-based file mover and cleaner in Ruby";
|
||||
homepage = "https://github.com/maid/maid";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ alanpearce ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
20
pkgs/by-name/ma/maid/test.nix
Normal file
20
pkgs/by-name/ma/maid/test.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ runCommandLocal, maid }:
|
||||
|
||||
runCommandLocal "test-maid-run" {
|
||||
nativeBuildInputs = [ maid ];
|
||||
}
|
||||
''
|
||||
mkdir -p $out/test
|
||||
export HOME=$out
|
||||
cd $out
|
||||
touch test/a.iso test/b.txt
|
||||
cat > rules.rb <<EOF
|
||||
Maid.rules do
|
||||
rule 'ISO' do
|
||||
trash(dir('test/*.iso'))
|
||||
end
|
||||
end
|
||||
EOF
|
||||
maid clean --rules rules.rb --force
|
||||
[ -f test/b.txt ] && [ ! -f test/a.iso ]
|
||||
''
|
@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString finalAttrs.doCheck ''
|
||||
postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
# Use wrapped python. Removing just the /usr/bin doesn't seem to work?
|
||||
substituteInPlace tests/httpbin.h.in \
|
||||
--replace '/usr/bin/python3' '${lib.getExe pythonEnv}'
|
||||
|
59
pkgs/by-name/nh/nh/package.nix
Normal file
59
pkgs/by-name/nh/nh/package.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, installShellFiles
|
||||
, makeWrapper
|
||||
, fetchFromGitHub
|
||||
, nvd
|
||||
, use-nom ? true
|
||||
, nix-output-monitor ? null
|
||||
}:
|
||||
|
||||
assert use-nom -> nix-output-monitor != null;
|
||||
|
||||
let
|
||||
version = "3.4.12";
|
||||
runtimeDeps = [ nvd ] ++ lib.optionals use-nom [ nix-output-monitor ];
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit version;
|
||||
pname = "nh";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ViperML";
|
||||
repo = "nh";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-V5TQ/1loQnegDjfLh61DxBWEQZivYEBq2kQpT0fn2cQ=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
mkdir completions
|
||||
$out/bin/nh completions --shell bash > completions/nh.bash
|
||||
$out/bin/nh completions --shell zsh > completions/nh.zsh
|
||||
$out/bin/nh completions --shell fish > completions/nh.fish
|
||||
|
||||
installShellCompletion completions/*
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/nh \
|
||||
--prefix PATH : ${lib.makeBinPath runtimeDeps} \
|
||||
${lib.optionalString use-nom "--set-default NH_NOM 1"}
|
||||
'';
|
||||
|
||||
cargoHash = "sha256-Ul4DM8WmKvKG32zBXzpdzHZknpTQAVvrxFcEd/C1buA=";
|
||||
|
||||
meta = {
|
||||
description = "Yet another nix cli helper";
|
||||
homepage = "https://github.com/ViperML/nh";
|
||||
license = lib.licenses.eupl12;
|
||||
mainProgram = "nh";
|
||||
maintainers = with lib.maintainers; [ drupol viperML ];
|
||||
};
|
||||
}
|
45
pkgs/by-name/pe/perl-debug-adapter/package.nix
Normal file
45
pkgs/by-name/pe/perl-debug-adapter/package.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ lib
|
||||
, buildNpmPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, makeWrapper
|
||||
, perl
|
||||
# Needed if you want to use it for a perl script with dependencies.
|
||||
, extraPerlPackages ? []
|
||||
}:
|
||||
|
||||
let
|
||||
perlInterpreter = perl.withPackages(ps: [
|
||||
ps.PadWalker
|
||||
] ++ extraPerlPackages);
|
||||
in buildNpmPackage rec {
|
||||
pname = "perl-debug-adapter";
|
||||
version = "1.0.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Nihilus118";
|
||||
repo = "perl-debug-adapter";
|
||||
rev = version;
|
||||
hash = "sha256-IXXKhk4rzsWSPA0RT0L3CZuKlgTWtweZ4dQtruTigRs=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-iw7+YC4qkrTVEJuZ9lnjNlUopTCp+fMNoIjFLutmrMw=";
|
||||
|
||||
npmBuildScript = "compile";
|
||||
|
||||
makeWrapperArgs = [
|
||||
"--prefix" "PATH" ":" (lib.makeBinPath [ perlInterpreter ])
|
||||
];
|
||||
passthru = {
|
||||
inherit perlInterpreter;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Debug adapter, invokes perl -d and handles communication with VS Code or other editors";
|
||||
homepage = "https://github.com/Nihilus118/perl-debug-adapter";
|
||||
changelog = "https://github.com/Nihilus118/perl-debug-adapter/blob/${version}/CHANGELOG.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ doronbehar ];
|
||||
mainProgram = "perl-debug-adapter";
|
||||
};
|
||||
}
|
@ -18,6 +18,7 @@ php.buildComposerProject (finalAttrs: {
|
||||
description = "PHP Unit Testing framework";
|
||||
homepage = "https://phpunit.de";
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "phpunit";
|
||||
maintainers = [ lib.maintainers.onny ] ++ lib.teams.php.members;
|
||||
};
|
||||
})
|
||||
|
471
pkgs/by-name/pr/prettypst/Cargo.lock
generated
Normal file
471
pkgs/by-name/pr/prettypst/Cargo.lock
generated
Normal file
@ -0,0 +1,471 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "anstream"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"anstyle-parse",
|
||||
"anstyle-query",
|
||||
"anstyle-wincon",
|
||||
"colorchoice",
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87"
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-parse"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140"
|
||||
dependencies = [
|
||||
"utf8parse",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-query"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
|
||||
dependencies = [
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anstyle-wincon"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
"clap_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
"strsim",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.4.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_lex"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
|
||||
|
||||
[[package]]
|
||||
name = "colorchoice"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
|
||||
|
||||
[[package]]
|
||||
name = "comemo"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "28a097f142aeb5b03af73595536cd55f5d649fca4d656379aac86b3af133cf92"
|
||||
dependencies = [
|
||||
"comemo-macros",
|
||||
"siphasher",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "comemo-macros"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "168cc09917f6a014a4cf6ed166d1b541a20a768c60f9cc348f25203ee8312940"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ecow"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6ea5e3f9cda726431da9d1a8d5a29785d544b31e98e1ca7a210906244002e02"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156"
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
|
||||
|
||||
[[package]]
|
||||
name = "prettypst"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"toml",
|
||||
"typst-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.69"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.33"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.193"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.193"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_spanned"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12022b835073e5b11e90a14f86838ceb1c8fb0325b72416845c487ac0fa95e80"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "siphasher"
|
||||
version = "0.3.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.109"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.50"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "1.0.50"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.8.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"toml_edit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"serde",
|
||||
"serde_spanned",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.39",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typst-syntax"
|
||||
version = "0.9.0"
|
||||
source = "git+https://github.com/typst/typst.git?tag=v0.9.0#7bb4f6df44086b4c1120b227f7ae963e6c2ad5ab"
|
||||
dependencies = [
|
||||
"comemo",
|
||||
"ecow",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"tracing",
|
||||
"unicode-ident",
|
||||
"unicode-math-class",
|
||||
"unicode-segmentation",
|
||||
"unscanny",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-math-class"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d246cf599d5fae3c8d56e04b20eb519adb89a8af8d0b0fbcded369aa3647d65"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
||||
version = "1.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
|
||||
|
||||
[[package]]
|
||||
name = "unscanny"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9df2af067a7953e9c3831320f35c1cc0600c30d44d9f7a12b01db1cd88d6b47"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
|
||||
|
||||
[[package]]
|
||||
name = "windows-sys"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
||||
dependencies = [
|
||||
"windows-targets",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm",
|
||||
"windows_aarch64_msvc",
|
||||
"windows_i686_gnu",
|
||||
"windows_i686_msvc",
|
||||
"windows_x86_64_gnu",
|
||||
"windows_x86_64_gnullvm",
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.5.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
31
pkgs/by-name/pr/prettypst/package.nix
Normal file
31
pkgs/by-name/pr/prettypst/package.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "prettypst";
|
||||
version = "unstable-2023-11-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "antonWetzel";
|
||||
repo = "prettypst";
|
||||
rev = "0bf6aa013efa2b059d8c7dcae3441a6004b02fa1";
|
||||
hash = "sha256-8rAF7tzs+0qGphmanTvx6MXhYOSG6igAMY4ZLkljRp8=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"typst-syntax-0.9.0" = "sha256-LwRB/AQE8TZZyHEQ7kKB10itzEgYjg4R/k+YFqmutDc=";
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Formatter for Typst";
|
||||
homepage = "https://github.com/antonWetzel/prettypst";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "prettypst";
|
||||
maintainers = with lib.maintainers; [ drupol ];
|
||||
};
|
||||
}
|
@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "simdutf";
|
||||
version = "4.0.5";
|
||||
version = "4.0.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "simdutf";
|
||||
repo = "simdutf";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-HNTVo/uB7UTCy5VVdmf6vka9T+htra7Vk7NF4hByGP4=";
|
||||
hash = "sha256-QZH21dFUX3NVpk1zyS/zSV+uOJYV3+V6XmuKeOvfc6c=";
|
||||
};
|
||||
|
||||
# Fix build on darwin
|
||||
|
1813
pkgs/by-name/sp/spade/Cargo.lock
generated
Normal file
1813
pkgs/by-name/sp/spade/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
44
pkgs/by-name/sp/spade/package.nix
Normal file
44
pkgs/by-name/sp/spade/package.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitLab
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "spade";
|
||||
version = "0.5.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "spade-lang";
|
||||
repo = "spade";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-PvheMYpsDWAXPf8K3K8yloCH0UTjzzVPuMBlcGC1xKU=";
|
||||
# only needed for vatch, which contains test data
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"codespan-0.12.0" = "sha256-3F2006BR3hyhxcUTaQiOjzTEuRECKJKjIDyXonS/lrE=";
|
||||
"local-impl-0.1.0" = "sha256-w6kQ4wM/ZQJmOqmAAq9FFDzyt9xHOY14av5dsSIFRU0=";
|
||||
"tracing-tree-0.2.0" = "sha256-/JNeAKjAXmKPh0et8958yS7joORDbid9dhFB0VUAhZc=";
|
||||
};
|
||||
};
|
||||
|
||||
# Cargo.lock is outdated
|
||||
postConfigure = ''
|
||||
cargo metadata --offline
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A better hardware description language";
|
||||
homepage = "https://gitlab.com/spade-lang/spade";
|
||||
changelog = "https://gitlab.com/spade-lang/spade/-/blob/${src.rev}/CHANGELOG.md";
|
||||
# compiler is eupl12, spade-lang stdlib is both asl20 and mit
|
||||
license = with licenses; [ eupl12 asl20 mit ];
|
||||
maintainers = with maintainers; [ pbsds ];
|
||||
mainProgram = "spade";
|
||||
broken = stdenv.isDarwin; # ld: symbol(s) not found for architecture ${system}
|
||||
};
|
||||
}
|
@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optional enableSSL openssl
|
||||
++ lib.optional (lineEditingLibrary == "readline") readline;
|
||||
|
||||
nativeCheckInputs = lib.optionals finalAttrs.doCheck [ valgrind ];
|
||||
nativeCheckInputs = lib.optionals finalAttrs.finalPackage.doCheck [ valgrind ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,21 +8,19 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "typst";
|
||||
version = "0.9.0";
|
||||
version = "0.10.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "typst";
|
||||
repo = "typst";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-LwRB/AQE8TZZyHEQ7kKB10itzEgYjg4R/k+YFqmutDc=";
|
||||
hash = "sha256-qiskc0G/ZdLRZjTicoKIOztRFem59TM4ki23Rl55y9s=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"iai-0.1.1" = "sha256-EdNzCPht5chg7uF9O8CtPWR/bzSYyfYIXNdLltqdlR0=";
|
||||
"oxipng-8.0.0" = "sha256-KIbSsQEjwJ12DxYpBTUD1g9CqJqCfSAmnFcSTiGIoio=";
|
||||
"self-replace-1.3.5" = "sha256-N57nmLHgxhVR1CDtkgjYwpo1ypdGyVpjJY7vzuncxDc=";
|
||||
};
|
||||
};
|
||||
|
||||
@ -45,12 +43,12 @@ rustPlatform.buildRustPackage rec {
|
||||
--zsh crates/typst-cli/artifacts/_typst
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A new markup-based typesetting system that is powerful and easy to learn";
|
||||
homepage = "https://typst.app";
|
||||
meta = {
|
||||
changelog = "https://github.com/typst/typst/releases/tag/${src.rev}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ drupol figsoda kanashimia ];
|
||||
description = "A new markup-based typesetting system that is powerful and easy to learn";
|
||||
homepage = "https://github.com/typst/typst";
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "typst";
|
||||
maintainers = with lib.maintainers; [ drupol figsoda kanashimia ];
|
||||
};
|
||||
}
|
73
pkgs/by-name/wa/wannier90/package.nix
Normal file
73
pkgs/by-name/wa/wannier90/package.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, gfortran
|
||||
, blas
|
||||
, lapack
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
assert (!blas.isILP64);
|
||||
assert blas.isILP64 == lapack.isILP64;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wannier90";
|
||||
version = "3.1.0";
|
||||
|
||||
nativeBuildInputs = [ gfortran ];
|
||||
buildInputs = [
|
||||
blas
|
||||
lapack
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wannier-developers";
|
||||
repo = "wannier90";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-+Mq7lM6WuwAnK/2FlDz9gNRIg2sRazQRezb3BfD0veY=";
|
||||
};
|
||||
|
||||
# test cases are removed as error bounds of wannier90 are obviously to tight
|
||||
postPatch = ''
|
||||
rm -r test-suite/tests/testpostw90_{fe_kpathcurv,fe_kslicecurv,si_geninterp,si_geninterp_wsdistance}
|
||||
rm -r test-suite/tests/testw90_example26 # Fails without AVX optimizations
|
||||
patchShebangs test-suite/run_tests test-suite/testcode/bin/testcode.py
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cp config/make.inc.gfort make.inc
|
||||
'';
|
||||
|
||||
buildFlags = [ "all" "dynlib" ];
|
||||
|
||||
preInstall = ''
|
||||
installFlagsArray+=(
|
||||
PREFIX=$out
|
||||
)
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
cp libwannier.so $out/lib/libwannier.so
|
||||
|
||||
mkdir $out/include
|
||||
find ./src/obj/ -name "*.mod" -exec cp {} $out/include/. \;
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ python3 ];
|
||||
checkTarget = [ "test-serial" ];
|
||||
preCheck = ''
|
||||
export OMP_NUM_THREADS=4
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Calculation of maximally localised Wannier functions";
|
||||
homepage = "https://github.com/wannier-developers/wannier90";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ maintainers.sheepforce ];
|
||||
};
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -24,26 +24,25 @@
|
||||
|
||||
let
|
||||
pname = "windmill";
|
||||
version = "1.210.1";
|
||||
version = "1.219.1";
|
||||
|
||||
fullSrc = fetchFromGitHub {
|
||||
src = fetchFromGitHub {
|
||||
owner = "windmill-labs";
|
||||
repo = "windmill";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-ss3EsIqfuctPOEdI5IQtyFFcDzIqnFm6UUG1vA+OlkQ=";
|
||||
hash = "sha256-HGZuIun9PWi3Fv/kX95k4xnXu1L604teWUKXzjVXKF0=";
|
||||
};
|
||||
|
||||
pythonEnv = python3.withPackages (ps: [ ps.pip-tools ]);
|
||||
|
||||
frontend-build = buildNpmPackage {
|
||||
inherit version;
|
||||
inherit version src;
|
||||
|
||||
pname = "windmill-ui";
|
||||
src = fullSrc;
|
||||
|
||||
sourceRoot = "${fullSrc.name}/frontend";
|
||||
sourceRoot = "${src.name}/frontend";
|
||||
|
||||
npmDepsHash = "sha256-l9MRaa6TaBg9vFoVuIGZNC9jLS29TlWeSniIBRNDRgU=";
|
||||
npmDepsHash = "sha256-1uya/4FjMHTDW/KX1YinhTT/Mb7bJ9XVTWc6cU0oqJ8=";
|
||||
|
||||
# without these you get a
|
||||
# FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
|
||||
@ -64,7 +63,7 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit pname version;
|
||||
src = "${fullSrc}/backend";
|
||||
src = "${src}/backend";
|
||||
|
||||
env = {
|
||||
SQLX_OFFLINE = "true";
|
||||
@ -92,10 +91,10 @@ rustPlatform.buildRustPackage {
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"progenitor-0.3.0" = "sha256-F6XRZFVIN6/HfcM8yI/PyNke45FL7jbcznIiqj22eIQ=";
|
||||
"tinyvector-0.1.0" = "sha256-NYGhofU4rh+2IAM+zwe04YQdXY8Aa4gTmn2V2HtzRfI=";
|
||||
"archiver-rs-0.5.1" = "sha256-ZIik0mMABmhdx/ullgbOrKH5GAtqcOKq5A6vB7aBSjk=";
|
||||
"pg-embed-0.7.2" = "sha256-R/SrlzNK7aAOyXVTQ/WPkiQb6FyMg9tpsmPTsiossDY=";
|
||||
"progenitor-0.3.0" = "sha256-F6XRZFVIN6/HfcM8yI/PyNke45FL7jbcznIiqj22eIQ=";
|
||||
"tinyvector-0.1.0" = "sha256-NYGhofU4rh+2IAM+zwe04YQdXY8Aa4gTmn2V2HtzRfI=";
|
||||
};
|
||||
};
|
||||
|
||||
@ -115,6 +114,14 @@ rustPlatform.buildRustPackage {
|
||||
|
||||
substituteInPlace src/main.rs \
|
||||
--replace 'unknown-version' 'v${version}'
|
||||
|
||||
pushd ..
|
||||
|
||||
mkdir -p frontend/build
|
||||
cp -R ${frontend-build}/share/windmill-frontend/* frontend/build
|
||||
cp ${src}/openflow.openapi.yaml .
|
||||
|
||||
popd
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
@ -131,17 +138,6 @@ rustPlatform.buildRustPackage {
|
||||
cmake # for libz-ng-sys crate
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
pushd ..
|
||||
|
||||
mkdir -p frontend/build
|
||||
|
||||
cp -R ${frontend-build}/share/windmill-frontend/* frontend/build
|
||||
cp ${fullSrc}/openflow.openapi.yaml .
|
||||
|
||||
popd
|
||||
'';
|
||||
|
||||
# needs a postgres database running
|
||||
doCheck = false;
|
||||
|
||||
@ -150,7 +146,7 @@ rustPlatform.buildRustPackage {
|
||||
|
||||
wrapProgram "$out/bin/windmill" \
|
||||
--prefix PATH : ${lib.makeBinPath [go pythonEnv deno nsjail bash]} \
|
||||
--prefix LD_LIBRARY_PATH : "${stdenv.cc.cc.lib}/lib" \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [stdenv.cc.cc.lib]} \
|
||||
--set PYTHON_PATH "${pythonEnv}/bin/python3" \
|
||||
--set GO_PATH "${go}/bin/go" \
|
||||
--set DENO_PATH "${deno}/bin/deno" \
|
||||
@ -158,7 +154,7 @@ rustPlatform.buildRustPackage {
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/windmill-labs/windmill/blob/${fullSrc.rev}/CHANGELOG.md";
|
||||
changelog = "https://github.com/windmill-labs/windmill/blob/${src.rev}/CHANGELOG.md";
|
||||
description = "Open-source developer platform to turn scripts into workflows and UIs";
|
||||
homepage = "https://windmill.dev";
|
||||
license = lib.licenses.agpl3Only;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user