Merge master into staging-next
This commit is contained in:
commit
9497a77fed
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
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -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 = [
|
||||
|
@ -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 {
|
||||
|
@ -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";
|
||||
};
|
||||
|
||||
|
@ -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 = [
|
||||
|
@ -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";
|
||||
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
@ -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 ];
|
||||
};
|
||||
}
|
@ -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}'
|
||||
|
@ -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;
|
||||
|
||||
|
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 ];
|
||||
};
|
||||
}
|
@ -13,13 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bulky";
|
||||
version = "3.0";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = "bulky";
|
||||
rev = version;
|
||||
hash = "sha256-8/Q8ess+qF7kdjiS2y2alUSnjKlJ74yuSe4UTPVChNQ=";
|
||||
hash = "sha256-akEweZpnfNeLuiUK1peI83uYsjVrFeQ0Is/+bpdNwdU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cinnamon-translations";
|
||||
version = "6.0.0";
|
||||
version = "6.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-lbJ4Hhd+7Hd70ZrEw0Q7Yts9yciXzqSuNTerW6oY93A=";
|
||||
hash = "sha256-nzPveo48rLu5CFEXj1GV3cJG6DepAFosWBibxoiYvIs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -7,14 +7,14 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "folder-color-switcher";
|
||||
version = "1.5.9";
|
||||
version = "1.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = pname;
|
||||
# They don't really do tags, this is just a named commit.
|
||||
rev = "b735ed90b798eda541885735368930d045430e6e";
|
||||
sha256 = "sha256-acbBghi3LWpGH1dBF8icuTGgliA+NM+pE8YDN3WxOic=";
|
||||
rev = "826df0b71c7c3b686421437eac86883945dc5956";
|
||||
sha256 = "sha256-WdOTyladZ0U39wbhqsXzg9l3mJ5UGV99yVg1PWscP2w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -33,13 +33,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pix";
|
||||
version = "3.2.0";
|
||||
version = "3.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-hhtW2QyexGIyovhWOReeJ0bxgye8LJl1RrEs0/5+q24=";
|
||||
sha256 = "sha256-ufm8f0mR35fGFOAL89MH6z88n3ZHG0IcQzIFrUjSQ1c=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xapp";
|
||||
version = "2.8.0";
|
||||
version = "2.8.1";
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "linuxmint";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-kpVNzBvUo2Ktzln51xLbySeKutVeJaI57kL8cBZscTM=";
|
||||
hash = "sha256-JsaH74h36FTIYVKiULmisK/RFGMZ79rhr7sacFnpFas=";
|
||||
};
|
||||
|
||||
# Recommended by upstream, which enables the build of xapp-debug.
|
||||
|
@ -26,13 +26,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xreader";
|
||||
version = "3.8.3";
|
||||
version = "3.8.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-fLnpBJJzrsQSyN+Ok1u/+CwHzBg+bzFR2Jwkc5mpMPA=";
|
||||
sha256 = "sha256-eSMPXBJ+VIMrIy86mMbRtZ28DvX7aCzLAAQ+RWqlCpc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -27,13 +27,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xviewer";
|
||||
version = "3.4.2";
|
||||
version = "3.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linuxmint";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-bI0TFJYulj1XlgKU5YLrlYKnkHORVYz4TK9mhl9mGag=";
|
||||
sha256 = "sha256-q8Eg84mnsu+dJkF6K27HISfSF6OI3GcTdo0Fft50G9A=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DDISABLE_TESTS=${lib.boolToString (!finalAttrs.doCheck)}"
|
||||
"-DDISABLE_TESTS=${lib.boolToString (!finalAttrs.finalPackage.doCheck)}"
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
@ -73,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
# Tests need to be able to check locale
|
||||
LC_ALL = lib.optionalString finalAttrs.doCheck "en_US.UTF-8";
|
||||
LC_ALL = lib.optionalString finalAttrs.finalPackage.doCheck "en_US.UTF-8";
|
||||
nativeCheckInputs = [
|
||||
glibcLocales
|
||||
];
|
||||
@ -86,7 +86,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
"-DWANT_DOC=${lib.boolToString withDocumentation}"
|
||||
"-DWANT_DEMO=${lib.boolToString withExamples}"
|
||||
"-DWANT_TESTS=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DWANT_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
# Keeps finding & using glib-compile-resources from buildInputs otherwise
|
||||
"-DCMAKE_PROGRAM_PATH=${lib.makeBinPath [ buildPackages.glib.dev ]}"
|
||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
|
@ -61,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-Denable_tests=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-Denable_tests=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
substituteInPlace doc/CMakeLists.txt \
|
||||
--replace "\''${CMAKE_INSTALL_DATAROOTDIR}/doc/libusermetrics-doc" "\''${CMAKE_INSTALL_DOCDIR}"
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
# Only needed by tests
|
||||
sed -i -e '/QTDBUSTEST/d' CMakeLists.txt
|
||||
'';
|
||||
@ -93,7 +93,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
"-DGSETTINGS_LOCALINSTALL=ON"
|
||||
"-DGSETTINGS_COMPILE=ON"
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
@ -9,6 +9,8 @@
|
||||
, sha256
|
||||
, odd-unstable ? true
|
||||
, patchlevel-unstable ? true
|
||||
, passthru ? { }
|
||||
, meta ? { }
|
||||
, ...
|
||||
} @ args:
|
||||
|
||||
@ -22,9 +24,7 @@ let
|
||||
concatAttrLists = attrsets:
|
||||
zipAttrsWithNames (filterAttrNames isList (head attrsets)) (_: concatLists) attrsets;
|
||||
|
||||
template = rec {
|
||||
inherit pname version;
|
||||
|
||||
template = {
|
||||
nativeBuildInputs = [ pkg-config xfce4-dev-tools wrapGAppsHook ];
|
||||
buildInputs = [ hicolor-icon-theme ];
|
||||
configureFlags = [ "--enable-maintainer-mode" ];
|
||||
@ -41,19 +41,21 @@ let
|
||||
|
||||
pos = builtins.unsafeGetAttrPos "pname" args;
|
||||
|
||||
passthru.updateScript = gitUpdater {
|
||||
inherit rev-prefix odd-unstable patchlevel-unstable;
|
||||
};
|
||||
passthru = {
|
||||
updateScript = gitUpdater {
|
||||
inherit rev-prefix odd-unstable patchlevel-unstable;
|
||||
};
|
||||
} // passthru;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.xfce.org/${category}/${pname}";
|
||||
license = licenses.gpl2Plus; # some libraries are under LGPLv2+
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
} // meta;
|
||||
};
|
||||
|
||||
publicArgs = removeAttrs args [ "category" "pname" "sha256" ];
|
||||
publicArgs = removeAttrs args [ "category" "sha256" ];
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (recursiveUpdate template publicArgs // concatAttrLists [ template args ])
|
||||
stdenv.mkDerivation (publicArgs // template // concatAttrLists [ template args ])
|
||||
# TODO [ AndersonTorres ]: verify if it allows using hash attribute as an option to sha256
|
||||
|
@ -104,12 +104,14 @@ jdk.overrideAttrs (finalAttrs: oldAttrs: {
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
# Some of the OpenJDK derivation set their `pos` by hand. We need to
|
||||
# overwrite this in order to point to Corretto, not OpenJDK.
|
||||
pos = __curPos;
|
||||
meta = with lib; oldAttrs.meta // {
|
||||
homepage = "https://aws.amazon.com/corretto";
|
||||
license = licenses.gpl2Only;
|
||||
description = "Amazon's distribution of OpenJDK";
|
||||
platforms = jdk.meta.platforms;
|
||||
mainProgram = "java";
|
||||
maintainers = with maintainers; [ rollf ];
|
||||
};
|
||||
})
|
||||
|
@ -9,6 +9,7 @@
|
||||
, unzip
|
||||
, rsync
|
||||
, debugBuild ? false
|
||||
, withJcef ? true
|
||||
|
||||
, libXdamage
|
||||
, libXxf86vm
|
||||
@ -27,6 +28,8 @@
|
||||
, udev
|
||||
}:
|
||||
|
||||
assert debugBuild -> withJcef;
|
||||
|
||||
let
|
||||
arch = {
|
||||
"aarch64-linux" = "aarch64";
|
||||
@ -35,37 +38,36 @@ let
|
||||
cpu = stdenv.hostPlatform.parsed.cpu.name;
|
||||
in
|
||||
openjdk17.overrideAttrs (oldAttrs: rec {
|
||||
pname = "jetbrains-jdk-jcef";
|
||||
javaVersion = "17.0.7";
|
||||
build = "829.16";
|
||||
pname = "jetbrains-jdk" + lib.optionalString withJcef "-jcef";
|
||||
javaVersion = "17.0.8";
|
||||
build = "1000.8";
|
||||
# To get the new tag:
|
||||
# git clone https://github.com/jetbrains/jetbrainsruntime
|
||||
# cd jetbrainsruntime
|
||||
# git reset --hard [revision]
|
||||
# git log --simplify-by-decoration --decorate=short --pretty=short | grep "jdk-" | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1
|
||||
openjdkTag = "jdk-18+0";
|
||||
# git log --simplify-by-decoration --decorate=short --pretty=short | grep "jbr-" --color=never | cut -d "(" -f2 | cut -d ")" -f1 | awk '{print $2}' | sort -t "-" -k 2 -g | tail -n 1 | tr -d ","
|
||||
openjdkTag = "jbr-17.0.7+7";
|
||||
version = "${javaVersion}-b${build}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "JetBrains";
|
||||
repo = "JetBrainsRuntime";
|
||||
rev = "jb${version}";
|
||||
hash = "sha256-b3wW52knkYUeG8h4naTQLGUedhAMiPnUsn3zFAiJCwM=";
|
||||
hash = "sha256-PXS8wRF37D9vzeC4CvmB3szFMbt+NRqhQqtPZcbeAO8=";
|
||||
};
|
||||
|
||||
BOOT_JDK = openjdk17-bootstrap.home;
|
||||
SOURCE_DATE_EPOCH = 1666098567;
|
||||
# run `git log -1 --pretty=%ct` in jdk repo for new value on update
|
||||
SOURCE_DATE_EPOCH = 1691119859;
|
||||
|
||||
patches = [];
|
||||
patches = [ ];
|
||||
|
||||
# Configure is done in build phase
|
||||
configurePhase = "true";
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
mkdir -p jcef_linux_${arch}/jmods
|
||||
cp ${jetbrains.jcef}/* jcef_linux_${arch}/jmods
|
||||
${lib.optionalString withJcef "cp -r ${jetbrains.jcef} jcef_linux_${arch}"}
|
||||
|
||||
sed \
|
||||
-e "s/OPENJDK_TAG=.*/OPENJDK_TAG=${openjdkTag}/" \
|
||||
@ -79,64 +81,66 @@ openjdk17.overrideAttrs (oldAttrs: rec {
|
||||
-i jb/project/tools/linux/scripts/mkimages_${arch}.sh
|
||||
|
||||
patchShebangs .
|
||||
./jb/project/tools/linux/scripts/mkimages_${arch}.sh ${build} ${if debugBuild then "fd" else "jcef"}
|
||||
./jb/project/tools/linux/scripts/mkimages_${arch}.sh ${build} ${if debugBuild then "fd" else (if withJcef then "jcef" else "nomod")}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = let
|
||||
buildType = if debugBuild then "fastdebug" else "release";
|
||||
debugSuffix = lib.optionalString debugBuild "-fastdebug";
|
||||
jcefSuffix = lib.optionalString (!debugBuild) "_jcef";
|
||||
in ''
|
||||
runHook preInstall
|
||||
installPhase =
|
||||
let
|
||||
buildType = if debugBuild then "fastdebug" else "release";
|
||||
debugSuffix = if debugBuild then "-fastdebug" else "";
|
||||
jcefSuffix = if debugBuild || !withJcef then "" else "_jcef";
|
||||
jbrsdkDir = "jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build}";
|
||||
in
|
||||
''
|
||||
runHook preInstall
|
||||
|
||||
mv build/linux-${cpu}-server-${buildType}/images/jdk/man build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build}
|
||||
rm -rf build/linux-${cpu}-server-${buildType}/images/jdk
|
||||
mv build/linux-${cpu}-server-${buildType}/images/jbrsdk${jcefSuffix}-${javaVersion}-linux-${arch}${debugSuffix}-b${build} build/linux-${cpu}-server-${buildType}/images/jdk
|
||||
'' + oldAttrs.installPhase + "runHook postInstall";
|
||||
rm -rf build/linux-${cpu}-server-${buildType}/images/jdk
|
||||
mv build/linux-${cpu}-server-${buildType}/images/${jbrsdkDir} build/linux-${cpu}-server-${buildType}/images/jdk
|
||||
'' + oldAttrs.installPhase + "runHook postInstall";
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString withJcef ''
|
||||
chmod +x $out/lib/openjdk/lib/chrome-sandbox
|
||||
'';
|
||||
|
||||
dontStrip = debugBuild;
|
||||
|
||||
postFixup = ''
|
||||
# Build the set of output library directories to rpath against
|
||||
LIBDIRS="${lib.makeLibraryPath [
|
||||
libXdamage libXxf86vm libXrandr libXi libXcursor libXrender libX11 libXext libxcb
|
||||
nss nspr libdrm mesa wayland udev
|
||||
]}"
|
||||
for output in $outputs; do
|
||||
if [ "$output" = debug ]; then continue; fi
|
||||
LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
|
||||
# Build the set of output library directories to rpath against
|
||||
LIBDIRS="${lib.makeLibraryPath [
|
||||
libXdamage libXxf86vm libXrandr libXi libXcursor libXrender libX11 libXext libxcb
|
||||
nss nspr libdrm mesa wayland udev
|
||||
]}"
|
||||
for output in $outputs; do
|
||||
if [ "$output" = debug ]; then continue; fi
|
||||
LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort -u | tr '\n' ':'):$LIBDIRS"
|
||||
done
|
||||
# Add the local library paths to remove dependencies on the bootstrap
|
||||
for output in $outputs; do
|
||||
if [ "$output" = debug ]; then continue; fi
|
||||
OUTPUTDIR=$(eval echo \$$output)
|
||||
BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
|
||||
echo "$BINLIBS" | while read i; do
|
||||
patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
|
||||
patchelf --shrink-rpath "$i" || true
|
||||
done
|
||||
# Add the local library paths to remove dependencies on the bootstrap
|
||||
for output in $outputs; do
|
||||
if [ "$output" = debug ]; then continue; fi
|
||||
OUTPUTDIR=$(eval echo \$$output)
|
||||
BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
|
||||
echo "$BINLIBS" | while read i; do
|
||||
patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
|
||||
patchelf --shrink-rpath "$i" || true
|
||||
done
|
||||
done
|
||||
'';
|
||||
done
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ git autoconf unzip rsync ] ++ oldAttrs.nativeBuildInputs;
|
||||
|
||||
meta = with lib; {
|
||||
description = "An OpenJDK fork to better support Jetbrains's products.";
|
||||
longDescription = ''
|
||||
JetBrains Runtime is a runtime environment for running IntelliJ Platform
|
||||
based products on Windows, Mac OS X, and Linux. JetBrains Runtime is
|
||||
based on OpenJDK project with some modifications. These modifications
|
||||
include: Subpixel Anti-Aliasing, enhanced font rendering on Linux, HiDPI
|
||||
support, ligatures, some fixes for native crashes not presented in
|
||||
official build, and other small enhancements.
|
||||
JetBrains Runtime is not a certified build of OpenJDK. Please, use at
|
||||
your own risk.
|
||||
JetBrains Runtime is a runtime environment for running IntelliJ Platform
|
||||
based products on Windows, Mac OS X, and Linux. JetBrains Runtime is
|
||||
based on OpenJDK project with some modifications. These modifications
|
||||
include: Subpixel Anti-Aliasing, enhanced font rendering on Linux, HiDPI
|
||||
support, ligatures, some fixes for native crashes not presented in
|
||||
official build, and other small enhancements.
|
||||
JetBrains Runtime is not a certified build of OpenJDK. Please, use at
|
||||
your own risk.
|
||||
'';
|
||||
homepage = "https://confluence.jetbrains.com/display/JBR/JetBrains+Runtime";
|
||||
inherit (openjdk17.meta) license platforms mainProgram;
|
||||
|
@ -44,60 +44,62 @@
|
||||
assert !stdenv.isDarwin;
|
||||
# I can't test darwin
|
||||
|
||||
let rpath = lib.makeLibraryPath [
|
||||
glib
|
||||
nss
|
||||
nspr
|
||||
atk
|
||||
at-spi2-atk
|
||||
libdrm
|
||||
expat
|
||||
libxcb
|
||||
libxkbcommon
|
||||
libX11
|
||||
libXcomposite
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXrandr
|
||||
mesa
|
||||
gtk3
|
||||
pango
|
||||
cairo
|
||||
alsa-lib
|
||||
dbus
|
||||
at-spi2-core
|
||||
cups
|
||||
libxshmfence
|
||||
udev
|
||||
];
|
||||
let
|
||||
rpath = lib.makeLibraryPath [
|
||||
glib
|
||||
nss
|
||||
nspr
|
||||
atk
|
||||
at-spi2-atk
|
||||
libdrm
|
||||
expat
|
||||
libxcb
|
||||
libxkbcommon
|
||||
libX11
|
||||
libXcomposite
|
||||
libXdamage
|
||||
libXext
|
||||
libXfixes
|
||||
libXrandr
|
||||
mesa
|
||||
gtk3
|
||||
pango
|
||||
cairo
|
||||
alsa-lib
|
||||
dbus
|
||||
at-spi2-core
|
||||
cups
|
||||
libxshmfence
|
||||
udev
|
||||
];
|
||||
|
||||
buildType = if debugBuild then "Debug" else "Release";
|
||||
platform = {
|
||||
"aarch64-linux" = "linuxarm64";
|
||||
"x86_64-linux" = "linux64";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
arches = {
|
||||
"linuxarm64" = {
|
||||
depsArch = "arm64";
|
||||
projectArch = "arm64";
|
||||
targetArch = "arm64";
|
||||
};
|
||||
"linux64" = {
|
||||
depsArch = "amd64";
|
||||
projectArch = "x86_64";
|
||||
targetArch = "x86_64";
|
||||
};
|
||||
}.${platform};
|
||||
inherit (arches) depsArch projectArch targetArch;
|
||||
buildType = if debugBuild then "Debug" else "Release";
|
||||
platform = {
|
||||
"aarch64-linux" = "linuxarm64";
|
||||
"x86_64-linux" = "linux64";
|
||||
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
arches = {
|
||||
"linuxarm64" = {
|
||||
depsArch = "arm64";
|
||||
projectArch = "arm64";
|
||||
targetArch = "arm64";
|
||||
};
|
||||
"linux64" = {
|
||||
depsArch = "amd64";
|
||||
projectArch = "x86_64";
|
||||
targetArch = "x86_64";
|
||||
};
|
||||
}.${platform};
|
||||
inherit (arches) depsArch projectArch targetArch;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jcef-jetbrains";
|
||||
rev = "1ac1c682c497f2b864f86050796461f22935ea64";
|
||||
rev = "9f8d4fb20b4658db6b2b6bc08e5dd0d8c7340290";
|
||||
# This is the commit number
|
||||
# Currently from the branch: https://github.com/JetBrains/jcef/tree/232
|
||||
# Run `git rev-list --count HEAD`
|
||||
version = "672";
|
||||
version = "675";
|
||||
|
||||
nativeBuildInputs = [ cmake python3 jdk17 git rsync ant ninja ];
|
||||
buildInputs = [ libX11 libXdamage nss nspr ];
|
||||
@ -106,19 +108,22 @@ in stdenv.mkDerivation rec {
|
||||
owner = "jetbrains";
|
||||
repo = "jcef";
|
||||
inherit rev;
|
||||
hash = "sha256-3HuW8upR/bZoK8euVti2KpCZh9xxfqgyHmgoG1NjxOI=";
|
||||
};
|
||||
cef-bin = let
|
||||
name = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_${platform}_minimal";
|
||||
hash = {
|
||||
"linuxarm64" = "sha256-gCDIfWsysXE8lHn7H+YM3Jag+mdbWwTQpJf0GKdXEVs=";
|
||||
"linux64" = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw=";
|
||||
}.${platform};
|
||||
urlName = builtins.replaceStrings ["+"] ["%2B"] name;
|
||||
in fetchzip {
|
||||
url = "https://cef-builds.spotifycdn.com/${urlName}.tar.bz2";
|
||||
inherit name hash;
|
||||
hash = "sha256-8zsgcWl0lZtC1oud5IlkUdeXxJUlHoRfw8t0FrZUQec=";
|
||||
};
|
||||
cef-bin =
|
||||
let
|
||||
# `cef_binary_${CEF_VERSION}_linux64_minimal`, where CEF_VERSION is from $src/CMakeLists.txt
|
||||
name = "cef_binary_111.2.1+g870da30+chromium-111.0.5563.64_${platform}_minimal";
|
||||
hash = {
|
||||
"linuxarm64" = "sha256-gCDIfWsysXE8lHn7H+YM3Jag+mdbWwTQpJf0GKdXEVs=";
|
||||
"linux64" = "sha256-r+zXTmDN5s/bYLvbCnHufYdXIqQmCDlbWgs5pdOpLTw=";
|
||||
}.${platform};
|
||||
urlName = builtins.replaceStrings [ "+" ] [ "%2B" ] name;
|
||||
in
|
||||
fetchzip {
|
||||
url = "https://cef-builds.spotifycdn.com/${urlName}.tar.bz2";
|
||||
inherit name hash;
|
||||
};
|
||||
clang-fmt = fetchurl {
|
||||
url = "https://storage.googleapis.com/chromium-clang-format/dd736afb28430c9782750fc0fd5f0ed497399263";
|
||||
hash = "sha256-4H6FVO9jdZtxH40CSfS+4VESAHgYgYxfCBFSMHdT0hE=";
|
||||
@ -228,7 +233,9 @@ in stdenv.mkDerivation rec {
|
||||
mkdir lib
|
||||
cp -R "$OUT_NATIVE_DIR"/* lib
|
||||
|
||||
mkdir $out
|
||||
mkdir -p $out/jmods
|
||||
|
||||
bash "$JB_TOOLS_DIR"/common/create_version_file.sh $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
@ -237,11 +244,11 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
postFixup = ''
|
||||
cd $unpacked/gluegen
|
||||
jmod create --class-path gluegen-rt.jar --libs lib $out/gluegen.rt.jmod
|
||||
jmod create --class-path gluegen-rt.jar --libs lib $out/jmods/gluegen.rt.jmod
|
||||
cd ../jogl
|
||||
jmod create --module-path . --class-path jogl-all.jar --libs lib $out/jogl.all.jmod
|
||||
jmod create --module-path . --class-path jogl-all.jar --libs lib $out/jmods/jogl.all.jmod
|
||||
cd ../jcef
|
||||
jmod create --module-path . --class-path jcef.jar --libs lib $out/jcef.jmod
|
||||
jmod create --module-path . --class-path jcef.jar --libs lib $out/jmods/jcef.jmod
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
@ -53,7 +53,10 @@ let
|
||||
, argon2Support ? true
|
||||
, cgotoSupport ? false
|
||||
, embedSupport ? false
|
||||
, staticSupport ? false
|
||||
, ipv6Support ? true
|
||||
, zendSignalsSupport ? true
|
||||
, zendMaxExecutionTimersSupport ? false
|
||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||
, valgrindSupport ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind
|
||||
, ztsSupport ? apxs2Support
|
||||
@ -236,7 +239,6 @@ let
|
||||
# PCRE
|
||||
++ [ "--with-external-pcre=${pcre2.dev}" ]
|
||||
|
||||
|
||||
# Enable sapis
|
||||
++ lib.optional (!cgiSupport) "--disable-cgi"
|
||||
++ lib.optional (!cliSupport) "--disable-cli"
|
||||
@ -250,11 +252,14 @@ let
|
||||
++ lib.optional apxs2Support "--with-apxs2=${apacheHttpd.dev}/bin/apxs"
|
||||
++ lib.optional argon2Support "--with-password-argon2=${libargon2}"
|
||||
++ lib.optional cgotoSupport "--enable-re2c-cgoto"
|
||||
++ lib.optional embedSupport "--enable-embed"
|
||||
++ lib.optional embedSupport "--enable-embed${lib.optionalString staticSupport "=static"}"
|
||||
++ lib.optional (!ipv6Support) "--disable-ipv6"
|
||||
++ lib.optional systemdSupport "--with-fpm-systemd"
|
||||
++ lib.optional valgrindSupport "--with-valgrind=${valgrind.dev}"
|
||||
++ lib.optional ztsSupport "--enable-zts"
|
||||
++ lib.optional staticSupport "--enable-static"
|
||||
++ lib.optional (!zendSignalsSupport) ["--disable-zend-signals"]
|
||||
++ lib.optional zendMaxExecutionTimersSupport "--enable-zend-max-execution-timers"
|
||||
|
||||
|
||||
# Sendmail
|
||||
|
@ -57,7 +57,7 @@ in {
|
||||
"-Dspectre=disabled"
|
||||
|
||||
(lib.mesonEnable "glib" gobjectSupport)
|
||||
(lib.mesonEnable "tests" finalAttrs.doCheck)
|
||||
(lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
|
||||
(lib.mesonEnable "xlib" x11Support)
|
||||
(lib.mesonEnable "xcb" xcbSupport)
|
||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_INSTALL_PKGCONFIGDIR=${placeholder "out"}/lib/pkgconfig"
|
||||
"-DBUILD_TESTING=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DBUILD_TESTING=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
];
|
||||
|
||||
# https://github.com/jiixyj/epoll-shim/issues/41
|
||||
|
@ -224,7 +224,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeCheckInputs = [ tzdata desktop-file-utils shared-mime-info ];
|
||||
|
||||
preCheck = lib.optionalString finalAttrs.doCheck or config.doCheckByDefault or false ''
|
||||
preCheck = lib.optionalString finalAttrs.finalPackage.doCheck or config.doCheckByDefault or false ''
|
||||
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
export TZDIR="${tzdata}/share/zoneinfo"
|
||||
export XDG_CACHE_HOME="$TMP"
|
||||
|
@ -32,13 +32,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# this is a header-only library, so we don't need to build it
|
||||
# we need `cmake` only to run tests
|
||||
nativeBuildInputs = lib.optionals finalAttrs.doCheck [
|
||||
nativeBuildInputs = lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
cmake
|
||||
python
|
||||
];
|
||||
|
||||
# we only want to run buildPhase when we run tests
|
||||
dontBuild = !finalAttrs.doCheck;
|
||||
dontBuild = !finalAttrs.finalPackage.doCheck;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
"-DENABLE_LOMIRI_FEATURES=OFF"
|
||||
"-DGSETTINGS_LOCALINSTALL=ON"
|
||||
"-DGSETTINGS_COMPILE=ON"
|
||||
|
@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmocka # cmake expects cmocka module
|
||||
];
|
||||
|
||||
cmakeFlags = lib.optional finalAttrs.doCheck "-DWITH_TESTS=ON"
|
||||
cmakeFlags = lib.optional finalAttrs.finalPackage.doCheck "-DWITH_TESTS=ON"
|
||||
++ lib.optional (!stdenv.hostPlatform.isStatic) "-DBUILD_SHARED_LIBS=ON";
|
||||
|
||||
# Tests are restricted while pkgsStatic.cmocka is broken. Tracked at:
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libglibutil";
|
||||
version = "1.0.74";
|
||||
version = "1.0.75";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sailfishos";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-+nIB516XUPjfI3fHru48sU/5PYL/w14/sMK/B8FLflI=";
|
||||
sha256 = "sha256-YHK5gRXBIhZJTY7F8b7QIUnftCIgOHwXVM3D35M3DC4=";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
# Workaround for "error: expected unqualified-id before 'public'" on "**signals"
|
||||
sed -i -e '/add_definitions/a -DQT_NO_KEYWORDS' CMakeLists.txt
|
||||
'' + lib.optionalString (!finalAttrs.doCheck) ''
|
||||
'' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
# Don't build tests when we're not running them
|
||||
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
|
||||
'';
|
||||
|
@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
postPatch = lib.optionalString (!finalAttrs.doCheck) ''
|
||||
postPatch = lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
# Don't build tests when we're not running them
|
||||
sed -i -e '/add_subdirectory(tests)/d' CMakeLists.txt
|
||||
'';
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSIDX_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DSIDX_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"shutdown_close_pipe"
|
||||
];
|
||||
tdRegexp = lib.concatStringsSep "\\|" toDisable;
|
||||
in lib.optionalString (finalAttrs.doCheck) ''
|
||||
in lib.optionalString (finalAttrs.finalPackage.doCheck) ''
|
||||
sed '/${tdRegexp}/d' -i test/test-list.h
|
||||
'';
|
||||
|
||||
|
@ -22,6 +22,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
mesonFlags = lib.optionals stdenv.isDarwin [
|
||||
"-Dgl_provider=gl" # glvnd is default
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
|
@ -133,6 +133,29 @@ self = stdenv.mkDerivation {
|
||||
|
||||
./opencl.patch
|
||||
./disk_cache-include-dri-driver-path-in-cache-key.patch
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/8634
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/robclark/mesa/-/commit/44734d1fe98ef47019fe2c56d867d1645c526e4e.diff";
|
||||
hash = "sha256-ipaISEY5xcnGvrwFxNY80JVlYWddfiHofkYEBuPkyDY=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/robclark/mesa/-/commit/d2a46afbfc44121aa491a2b4d1a3249d26fc6a11.diff";
|
||||
hash = "sha256-i00s9oUhZXXf/A4cHwWN6uRDP70cHjz+kgVpiDM/eMw=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/robclark/mesa/-/commit/17cde1ee87cc0cbb896ca81949b8f192d5496271.diff";
|
||||
hash = "sha256-ao2pWQwMBskOjWJsjWqwFYAeqpTWAyJbEtSryDO+xyo=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/robclark/mesa/-/commit/4489d737d5c12eb0a3441ed0b303f9f1100a7166.diff";
|
||||
hash = "sha256-WxqwEngd79NHLedQOWMjjroaN0gr6Upd96uteSvr4Yw=";
|
||||
})
|
||||
# fixes a linking error
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.freedesktop.org/mesa/mesa/-/commit/c8b64452c076c1768beb23280de25faf2bcbe2c8.diff";
|
||||
hash = "sha256-mqivdzyoLtkfkAb+r57gjPwg8d7whgFAahiUhGVOOvo=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -202,6 +225,15 @@ self = stdenv.mkDerivation {
|
||||
# Enable RT for Intel hardware
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/9080
|
||||
(lib.mesonEnable "intel-clc" (stdenv.buildPlatform == stdenv.hostPlatform))
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# Disable features that are explicitly unsupported on the platform
|
||||
"-Dgbm=disabled"
|
||||
"-Dxlib-lease=disabled"
|
||||
"-Degl=disabled"
|
||||
"-Dgallium-vdpau=disabled"
|
||||
"-Dgallium-va=disabled"
|
||||
"-Dgallium-xa=disabled"
|
||||
"-Dlmsensors=disabled"
|
||||
] ++ lib.optionals enableOpenCL [
|
||||
# Clover, old OpenCL frontend
|
||||
"-Dgallium-opencl=icd"
|
||||
@ -379,9 +411,6 @@ self = stdenv.mkDerivation {
|
||||
license = licenses.mit; # X11 variant, in most files
|
||||
platforms = platforms.mesaPlatforms;
|
||||
maintainers = with maintainers; [ primeos vcunat ]; # Help is welcome :)
|
||||
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/8634
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -29,8 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
"-DMZ_OPENSSL=ON"
|
||||
"-DMZ_BUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DMZ_BUILD_UNIT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DMZ_BUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
"-DMZ_BUILD_UNIT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
"-DMZ_LIB_SUFFIX='-ng'"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# missing header file
|
||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DMSGPACK_BUILD_EXAMPLES=OFF" # examples are not installed even if built
|
||||
] ++ lib.optional (!finalAttrs.doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
|
||||
] ++ lib.optional (!finalAttrs.finalPackage.doCheck) "-DMSGPACK_BUILD_TESTS=OFF";
|
||||
|
||||
checkInputs = [
|
||||
gtest
|
||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
"-DMSGPACK_BUILD_DOCS=OFF" # docs are not installed even if built
|
||||
] ++ lib.optional finalAttrs.doCheck "-DMSGPACK_BUILD_TESTS=ON";
|
||||
] ++ lib.optional finalAttrs.finalPackage.doCheck "-DMSGPACK_BUILD_TESTS=ON";
|
||||
|
||||
checkInputs = [
|
||||
zlib
|
||||
|
@ -24,10 +24,10 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DJSON_BuildTests=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DJSON_BuildTests=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
"-DJSON_FastTests=ON"
|
||||
"-DJSON_MultipleHeaders=ON"
|
||||
] ++ lib.optional finalAttrs.doCheck "-DJSON_TestDataDirectory=${testData}";
|
||||
] ++ lib.optional finalAttrs.finalPackage.doCheck "-DJSON_TestDataDirectory=${testData}";
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
|
||||
|
@ -33,13 +33,13 @@ in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "open62541";
|
||||
version = "1.3.8";
|
||||
version = "1.3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "open62541";
|
||||
repo = "open62541";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-koifSynnJX9IuwX8HUT1TzHoKgJfweNGAVlqUx7nEc4=";
|
||||
hash = "sha256-FnLMR54xjIyYRqwCnvMJsNgsVwH7hVAixCNGhfIZPiw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@ -57,7 +57,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"-DBUILD_SHARED_LIBS=${if stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
|
||||
"-DUA_NAMESPACE_ZERO=FULL"
|
||||
|
||||
"-DUA_BUILD_UNIT_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DUA_BUILD_UNIT_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
]
|
||||
++ lib.optional withExamples "-DUA_BUILD_EXAMPLES=ON"
|
||||
++ lib.optional (withEncryption != false)
|
||||
@ -92,16 +92,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
enableParallelChecking = false;
|
||||
|
||||
preCheck = let
|
||||
disabledTests =
|
||||
lib.optionals withPubSub [
|
||||
# "Cannot set socket option IP_ADD_MEMBERSHIP"
|
||||
"pubsub_publish"
|
||||
"check_pubsub_get_state"
|
||||
"check_pubsub_publish_rt_levels"
|
||||
"check_pubsub_subscribe_config_freeze"
|
||||
"check_pubsub_subscribe_rt_levels"
|
||||
"check_pubsub_multiple_subscribe_rt_levels"
|
||||
];
|
||||
disabledTests = lib.optionals withPubSub [
|
||||
# "Cannot set socket option IP_ADD_MEMBERSHIP"
|
||||
"pubsub_publish"
|
||||
"check_pubsub_get_state"
|
||||
"check_pubsub_publish_rt_levels"
|
||||
"check_pubsub_subscribe_config_freeze"
|
||||
"check_pubsub_subscribe_rt_levels"
|
||||
"check_pubsub_multiple_subscribe_rt_levels"
|
||||
];
|
||||
regex = "^(${builtins.concatStringsSep "|" disabledTests})\$";
|
||||
in lib.optionalString (disabledTests != []) ''
|
||||
checkFlagsArray+=(ARGS="-E ${lib.escapeRegex regex}")
|
||||
|
@ -102,10 +102,10 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
(mkFlag qt5Support "QT5")
|
||||
(mkFlag qt6Support "QT6")
|
||||
(mkFlag gpgmeSupport "GPGME")
|
||||
] ++ lib.optionals finalAttrs.doCheck [
|
||||
] ++ lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
"-DTESTDATADIR=${testData}"
|
||||
];
|
||||
disallowedReferences = lib.optional finalAttrs.doCheck testData;
|
||||
disallowedReferences = lib.optional finalAttrs.finalPackage.doCheck testData;
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-C/BDEuKNMQHOjATO5aWBptjIlgfv6ykzjFAsHb6uP3Q=";
|
||||
};
|
||||
|
||||
postPatch = lib.optionalString (!finalAttrs.doCheck) ''
|
||||
postPatch = lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
|
||||
sed -i "/add_subdirectory(tests)/d" CMakeLists.txt
|
||||
'';
|
||||
|
||||
|
@ -34,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
substituteInPlace libqmenumodel/QMenuModel/CMakeLists.txt \
|
||||
--replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
|
||||
'' + lib.optionalString finalAttrs.doCheck ''
|
||||
'' + lib.optionalString finalAttrs.finalPackage.doCheck ''
|
||||
patchShebangs tests/{client,script}/*.py
|
||||
'';
|
||||
|
||||
@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
dontWrapQtApps = true;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
|
||||
"-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
|
||||
];
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_TESTS=${if (finalAttrs.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
|
||||
"-DBUILD_TESTS=${if (finalAttrs.finalPackage.doCheck && stdenv.hostPlatform == stdenv.buildPlatform) then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = let
|
||||
cmakeBool = x: if x then "ON" else "OFF";
|
||||
in [
|
||||
"-DBUILD_TESTS=${cmakeBool finalAttrs.doCheck}"
|
||||
"-DBUILD_TESTS=${cmakeBool finalAttrs.finalPackage.doCheck}"
|
||||
"-DXTENSOR_ENABLE_ASSERT=${cmakeBool enableAssertions}"
|
||||
"-DXTENSOR_CHECK_DIMENSION=${cmakeBool enableBoundChecks}"
|
||||
];
|
||||
|
@ -422,22 +422,61 @@ final: prev: {
|
||||
buildInputs = [ final.node-gyp-build ];
|
||||
};
|
||||
|
||||
wrangler = prev.wrangler.override (oldAttrs: {
|
||||
meta = oldAttrs.meta // { broken = before "16.13"; };
|
||||
buildInputs = [ pkgs.llvmPackages.libcxx pkgs.llvmPackages.libunwind ] ++ lib.optional stdenv.isLinux pkgs.autoPatchelfHook;
|
||||
preFixup = ''
|
||||
# patch elf is trying to patch binary for sunos
|
||||
rm -r $out/lib/node_modules/wrangler/node_modules/@esbuild/sunos-x64
|
||||
'';
|
||||
dependencies = oldAttrs.dependencies ++ lib.optional stdenv.isLinux ({
|
||||
name = "_at_cloudflare_slash_workerd-linux-64";
|
||||
packageName = "@cloudflare/workerd-linux-64";
|
||||
# Should be same version as workerd
|
||||
version = "1.20231030.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20231030.0.tgz";
|
||||
sha512 = "2HUeRTvoCC17fxE0qdBeR7J9dO8j4A8ZbdcvY8pZxdk+zERU6+N03RTbk/dQMU488PwiDvcC3zZqS4gwLfVT8g==";
|
||||
wrangler = prev.wrangler.override (oldAttrs:
|
||||
let
|
||||
linuxWorkerd = {
|
||||
name = "_at_cloudflare_slash_workerd-linux-64";
|
||||
packageName = "@cloudflare/workerd-linux-64";
|
||||
# Should be same version as workerd
|
||||
version = "1.20231030.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20231030.0.tgz";
|
||||
sha512 = "2HUeRTvoCC17fxE0qdBeR7J9dO8j4A8ZbdcvY8pZxdk+zERU6+N03RTbk/dQMU488PwiDvcC3zZqS4gwLfVT8g==";
|
||||
};
|
||||
};
|
||||
linuxWorkerdArm = {
|
||||
name = "_at_cloudflare_slash_workerd-linux-arm64";
|
||||
packageName = "@cloudflare/workerd-linux-arm64";
|
||||
# Should be same version as workerd
|
||||
version = "1.20231030.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20231030.0.tgz";
|
||||
sha512 = "4/GK5zHh+9JbUI6Z5xTCM0ZmpKKHk7vu9thmHjUxtz+o8Ne9DoD7DlDvXQWgMF6XGaTubDWyp3ttn+Qv8jDFuQ==";
|
||||
};
|
||||
};
|
||||
darwinWorkerd = {
|
||||
name = "_at_cloudflare_slash_workerd-darwin-64";
|
||||
packageName = "@cloudflare/workerd-darwin-64";
|
||||
# Should be same version as workerd
|
||||
version = "1.20231030.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20231030.0.tgz";
|
||||
sha512 = "0iy34j997llj3jl3l8dipnsyms89qv9nxkza9l2gxmcj6mqwv5m6c8cvgca78qfccl1f5zsrzj855q1fz631p91yydbri2gxgvd10r7";
|
||||
};
|
||||
};
|
||||
darwinWorkerdArm = {
|
||||
name = "_at_cloudflare_slash_workerd-darwin-arm64";
|
||||
packageName = "@cloudflare/workerd-darwin-arm64";
|
||||
# Should be same version as workerd
|
||||
version = "1.20231030.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20231030.0.tgz";
|
||||
sha512 = "WSJJjm11Del4hSneiNB7wTXGtBXI4QMCH9l5qf4iT5PAW8cESGcCmdHtWDWDtGAAGcvmLT04KNvmum92vRKKQQ==";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
meta = oldAttrs.meta // { broken = before "16.13"; };
|
||||
buildInputs = [ pkgs.llvmPackages.libcxx pkgs.llvmPackages.libunwind ] ++ lib.optional stdenv.isLinux pkgs.autoPatchelfHook;
|
||||
preFixup = ''
|
||||
# patch elf is trying to patch binary for sunos
|
||||
rm -r $out/lib/node_modules/wrangler/node_modules/@esbuild/sunos-x64
|
||||
'';
|
||||
dependencies = oldAttrs.dependencies
|
||||
++ lib.optional (stdenv.isLinux && stdenv.isx86_64) linuxWorkerd
|
||||
++ lib.optional (stdenv.isLinux && stdenv.isAarch64) linuxWorkerdArm
|
||||
++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) darwinWorkerd
|
||||
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) darwinWorkerdArm;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchFromGitHub
|
||||
@ -57,8 +58,6 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [
|
||||
fsspec
|
||||
jax
|
||||
jaxlib
|
||||
numba
|
||||
setuptools
|
||||
numexpr
|
||||
@ -66,6 +65,10 @@ buildPythonPackage rec {
|
||||
pyarrow
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
# no support for darwin
|
||||
jax
|
||||
jaxlib
|
||||
];
|
||||
|
||||
# The following tests have been disabled because they need to be run on a GPU platform.
|
||||
|
@ -42,14 +42,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Django";
|
||||
version = "5.0rc1";
|
||||
version = "5.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.10";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-pLt3plnaAyt0GpXcuVeGTzaVJ10dWB73Y3IUMA+qrzA=";
|
||||
hash = "sha256-fSnhTfvBnLapWkvWae294R9dTGpx/apCwtQLaEboB/c=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
83
pkgs/development/python-modules/dnf4/default.nix
Normal file
83
pkgs/development/python-modules/dnf4/default.nix
Normal file
@ -0,0 +1,83 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, gettext
|
||||
, libcomps
|
||||
, libdnf
|
||||
, python
|
||||
, rpm
|
||||
, sphinx
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dnf4";
|
||||
version = "4.18.1";
|
||||
format = "other";
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rpm-software-management";
|
||||
repo = "dnf";
|
||||
rev = version;
|
||||
hash = "sha256-pgS4y87HbFiaS+fftdhKHOZAl2hYTUds3XVXUuQN6tU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-python-install-dir.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "@PYTHON_INSTALL_DIR@" "$out/${python.sitePackages}" \
|
||||
--replace "SYSCONFDIR /etc" "SYSCONFDIR $out/etc" \
|
||||
--replace "SYSTEMD_DIR /usr/lib/systemd/system" "SYSTEMD_DIR $out/lib/systemd/system"
|
||||
substituteInPlace etc/tmpfiles.d/CMakeLists.txt \
|
||||
--replace "DESTINATION /usr/lib/tmpfiles.d" "DESTINATION $out/usr/lib/tmpfiles.d"
|
||||
substituteInPlace dnf/const.py.in \
|
||||
--replace "/etc" "$out/etc"
|
||||
substituteInPlace doc/CMakeLists.txt \
|
||||
--replace 'SPHINX_BUILD_NAME "sphinx-build-3"' 'SPHINX_BUILD_NAME "${sphinx}/bin/sphinx-build"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gettext
|
||||
sphinx
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
libcomps
|
||||
libdnf
|
||||
rpm
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DPYTHON_DESIRED=${lib.head (lib.splitString ["."] python.version)}"
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
make doc-man
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# See https://github.com/rpm-software-management/dnf/blob/41a287e2bd60b4d1100c329a274776ff32ba8740/dnf.spec#L218-L220
|
||||
ln -s dnf-3 $out/bin/dnf
|
||||
ln -s dnf-3 $out/bin/dnf4
|
||||
mv $out/bin/dnf-automatic-3 $out/bin/dnf-automatic
|
||||
# See https://github.com/rpm-software-management/dnf/blob/41a287e2bd60b4d1100c329a274776ff32ba8740/dnf.spec#L231-L232
|
||||
ln -s $out/etc/dnf/dnf.conf $out/etc/yum.conf
|
||||
ln -s dnf-3 $out/bin/yum
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Package manager based on libdnf and libsolv. Replaces YUM";
|
||||
homepage = "https://github.com/rpm-software-management/dnf";
|
||||
changelog = "https://github.com/rpm-software-management/dnf/releases/tag/${version}";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ katexochen ];
|
||||
mainProgram = "dnf";
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4aee99fb..0bb28897 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ ELSE ()
|
||||
MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED})
|
||||
ENDIF()
|
||||
|
||||
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
|
||||
+SET(PYTHON_INSTALL_DIR "@PYTHON_INSTALL_DIR@")
|
||||
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")
|
||||
|
||||
ADD_SUBDIRECTORY (dnf)
|
@ -9,14 +9,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "plaid-python";
|
||||
version = "18.0.0";
|
||||
version = "18.2.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-1OV/oybxZXF2kjLoSA2KyQaTR91jqEWstpELSlUIg2o=";
|
||||
hash = "sha256-xUaAuk1uQWZQPpLzSHDavZuCCqTEWhj+V3S1DLb9XQc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -8,14 +8,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pydal";
|
||||
version = "20230521.1";
|
||||
version = "20231114.3";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-EEeKYeYnxbjLdpH39+v3IQhFSFMWST0310DCl/ttGEU=";
|
||||
hash = "sha256-xC0W/Knju205mu+yQ0wOcIYu4Tx1Q3hS9CGSBDLuX7E=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyorthanc";
|
||||
version = "1.13.1";
|
||||
version = "1.15.0";
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
format = "pyproject";
|
||||
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
owner = "gacou54";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-LahLR+LbppcPKs0gPT2lEP48XG6pbGMvCBW/EwAIFDQ=";
|
||||
hash = "sha256-2F5yXWqOwQM1i0AgCCr1j98jpZLA2D919Iex9WjKLuw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pythonRelaxDepsHook poetry-core ];
|
||||
|
@ -12,14 +12,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytapo";
|
||||
version = "3.3.16";
|
||||
version = "3.3.18";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-omeJUF4bY/FfXMmBvpVo3dr7B/pUy8YXt0DPaSe3VkA=";
|
||||
hash = "sha256-CiLZ+FUmawZaKQxkDxYCv0Qs/djFuIVSyQ0eSi41HDg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -8,14 +8,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "sqlmap";
|
||||
version = "1.7.11";
|
||||
version = "1.7.12";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-gjObtmEvvyCnqd+bLdirzW18/AarmvhF6ItvqJ2Qmuo=";
|
||||
hash = "sha256-9sl/tH/TNXGkeTcXhG9i6/QByOO7SC0GkzyEhzVfJdk=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -1,33 +1,32 @@
|
||||
{ lib
|
||||
, pkgs
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, pytest-xdist
|
||||
, fetchFromGitHub
|
||||
, numpy
|
||||
, pybind11
|
||||
, cirq-core
|
||||
, fetchFromGitHub
|
||||
, matplotlib
|
||||
, networkx
|
||||
, numpy
|
||||
, pandas
|
||||
, pybind11
|
||||
, pytest-xdist
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, scipy
|
||||
, setuptools
|
||||
, wheel
|
||||
, pandas
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "stim";
|
||||
version = "1.9.0";
|
||||
format = "pyproject";
|
||||
version = "1.12.1";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
src = fetchFromGitHub {
|
||||
owner = "quantumlib";
|
||||
repo = "Stim";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-zXWdJjFkf74FCWxyVMF8dx0P8GmUkuHFxUo5wYNU2o0=";
|
||||
hash = "sha256-vDpW8cn1JPARDIXpLyK9uenhHmva0FwnWIDV7dSHbIY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@ -47,34 +46,31 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-xdist
|
||||
|
||||
cirq-core
|
||||
matplotlib
|
||||
networkx
|
||||
scipy
|
||||
pandas
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
scipy
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A tool for high performance simulation and analysis of quantum stabilizer circuits, especially quantum error correction (QEC) circuits.";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ chrispattison ];
|
||||
homepage = "https://github.com/quantumlib/stim";
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "stim" ];
|
||||
pythonImportsCheck = [
|
||||
"stim"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
disabledTestPaths = [
|
||||
# No pymatching
|
||||
"glue/sample/src/sinter/main_test.py"
|
||||
"glue/sample/src/sinter/decoding_test.py"
|
||||
"glue/sample/src/sinter/predict_test.py"
|
||||
"glue/sample/src/sinter/collection_test.py"
|
||||
"glue/sample/src/sinter/collection_work_manager.py"
|
||||
"glue/sample/src/sinter/worker_test.py"
|
||||
# Don't test sample
|
||||
"glue/sample/"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool for high performance simulation and analysis of quantum stabilizer circuits, especially quantum error correction (QEC) circuits";
|
||||
homepage = "https://github.com/quantumlib/stim";
|
||||
changelog = "https://github.com/quantumlib/Stim/releases/tag/v${version}";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ chrispattison ];
|
||||
};
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "twilio";
|
||||
version = "8.10.2";
|
||||
version = "8.10.3";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -27,7 +27,7 @@ buildPythonPackage rec {
|
||||
owner = "twilio";
|
||||
repo = "twilio-python";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-3Gm1oKhKcTb3c+awMKVQ3qFKkdXC3azR1ECTdw60oCg=";
|
||||
hash = "sha256-6aTPPuQRRPd9mYJI8CHusejTTYdJX/06x+TubPgagJY=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -31,7 +31,7 @@ toPythonModule (stdenv.mkDerivation(finalAttrs: {
|
||||
];
|
||||
doCheck = true;
|
||||
cmakeFlags = [
|
||||
"-DBUILD_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DBUILD_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "packer";
|
||||
version = "1.9.4";
|
||||
version = "1.9.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "packer";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oGEG9uGjZTpJjQBnVlffFpNc5sb7HyD/ibpnQUhtTH4=";
|
||||
hash = "sha256-7HoT9B6YpgwJ8Q1TUMS3W919204LiOqyemtT7Ybeeyg=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-vHVx9vFPvctWNzibfZlN7mEYngYd6q7s9gMIM0FX0Ao=";
|
||||
vendorHash = "sha256-aalecIoKUUj0siDIBXXeyCjkpsyjlPPX6XohDC6WDoY=";
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
|
@ -7,11 +7,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "rectangle";
|
||||
version = "0.74";
|
||||
version = "0.75";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/rxhanson/Rectangle/releases/download/v${version}/Rectangle${version}.dmg";
|
||||
hash = "sha256-ERfzgw8R39dOc9F/dgcgCKbEVFNChC5LqDFBDzbS+Wg=";
|
||||
hash = "sha256-IjEqT1PHGohuQqgS+IzZKyLoIs0P0V7z42JzNUuzh84=";
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=man"
|
||||
(lib.mesonBool "tests" finalAttrs.doCheck)
|
||||
(lib.mesonBool "tests" finalAttrs.finalPackage.doCheck)
|
||||
(lib.mesonBool "docs-build" withDocs)
|
||||
];
|
||||
|
||||
|
@ -93,7 +93,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pkg-config
|
||||
(python3.withPackages (ps: with ps; [
|
||||
pillow
|
||||
] ++ lib.optionals finalAttrs.doCheck [
|
||||
] ++ lib.optionals finalAttrs.finalPackage.doCheck [
|
||||
pygobject3
|
||||
python-dbusmock
|
||||
]))
|
||||
@ -141,7 +141,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cmakeFlags = [
|
||||
"-DBUILD_DOXYGEN=OFF"
|
||||
"-DMIR_PLATFORM='gbm-kms;x11;eglstream-kms;wayland'"
|
||||
"-DMIR_ENABLE_TESTS=${if finalAttrs.doCheck then "ON" else "OFF"}"
|
||||
"-DMIR_ENABLE_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
# BadBufferTest.test_truncated_shm_file *doesn't* throw an error as the test expected, mark as such
|
||||
# https://github.com/MirServer/mir/pull/1947#issuecomment-811810872
|
||||
"-DMIR_SIGBUS_HANDLER_ENVIRONMENT_BROKEN=ON"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user