push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
{
rustPlatform,
lib,
fetchzip,
openssl,
pkg-config,
}:
rustPlatform.buildRustPackage rec {
pname = "pr-tracker";
version = "1.9.0";
src = fetchzip {
url = "https://git.qyliss.net/pr-tracker/snapshot/pr-tracker-${version}.tar.xz";
hash = "sha256-8ZA+FjTO/8GdzYFskz8G0ihxtddsiZ9W44cXbExllZE=";
};
cargoHash = "sha256-dFyJX2X+bR3h/opAETTJpvy1vDAmBYQ/gq4ywVRnWaM=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
meta = {
changelog = "https://git.qyliss.net/pr-tracker/plain/NEWS?h=${version}";
description = "Nixpkgs pull request channel tracker";
longDescription = ''
A web server that displays the path a Nixpkgs pull request will take
through the various release channels.
'';
platforms = lib.platforms.unix;
homepage = "https://git.qyliss.net/pr-tracker";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [
qyliss
sumnerevans
];
mainProgram = "pr-tracker";
};
}

View File

@@ -0,0 +1,69 @@
{
alsa-lib,
fetchFromGitHub,
gtk3,
lib,
libpulseaudio,
pkg-config,
stdenv,
wrapGAppsHook3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "praat";
version = "6.4.25";
src = fetchFromGitHub {
owner = "praat";
repo = "praat";
rev = "v${finalAttrs.version}";
hash = "sha256-jTMXSVxhzaHF7zNr0/EWBDm3fIawTF4v6zuAcx/woeQ=";
};
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
];
buildInputs = [
alsa-lib
gtk3
libpulseaudio
];
makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
];
configurePhase = ''
runHook preConfigure
cp makefiles/makefile.defs.linux.pulse makefile.defs
runHook postConfigure
'';
installPhase = ''
runHook preInstall
install -Dt $out/bin praat
install -Dm444 main/praat.desktop -t $out/share/applications
install -Dm444 main/praat-32.ico $out/share/icons/hicolor/32x32/apps/praat.ico
install -Dm444 main/praat-256.ico $out/share/icons/hicolor/256x256/apps/praat.ico
install -Dm444 main/praat-480.png $out/share/icons/hicolor/480x480/apps/praat.png
install -Dm444 main/praat-480.svg $out/share/icons/hicolor/scalable/apps/praat.svg
runHook postInstall
'';
enableParallelBuilding = true;
meta = {
description = "Doing phonetics by computer";
mainProgram = "praat";
homepage = "https://www.fon.hum.uva.nl/praat/";
license = lib.licenses.gpl2Plus; # Has some 3rd-party code in it though
maintainers = with lib.maintainers; [ orivej ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,103 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cacert,
meson,
ninja,
pkg-config,
freetype,
libgit2,
libkqueue,
libuchardet,
libzip,
lua5_4,
luajit,
mbedtls_2,
pcre2,
sdl3,
xz,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pragtical";
version = "3.7.0";
pluginManagerVersion = "1.4.0";
linenoiseRev = "e78e236c8d85c078fdd9fc4e1f08716058aa1a42";
src = fetchFromGitHub {
owner = "pragtical";
repo = "pragtical";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
# also fetch required git submodules
postFetch = ''
cd "$out"
export NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
substituteInPlace subprojects/ppm.wrap \
--replace-fail 'revision = head' 'revision = v${finalAttrs.pluginManagerVersion}'
substituteInPlace subprojects/linenoise.wrap \
--replace-fail 'revision = master' 'revision = ${finalAttrs.linenoiseRev}'
${lib.getExe meson} subprojects download \
colors linenoise plugins ppm widget
find subprojects -type d -name .git -prune -execdir rm -r {} +
'';
hash = "sha256-oqXv08TvZWVRsSCX6V9oAGHkFS0hL/gm3tGdiivOI6Q=";
};
patches = [
# https://github.com/pragtical/pragtical/pull/334
(fetchpatch {
name = "fix-dirmonitor-backend-detection.patch";
url = "https://github.com/pragtical/pragtical/commit/5cf26e1f6a491f28d761390309dd77a795bdae9d.patch";
hash = "sha256-eD17ItcsyRTKn6jydyW3J2lFq/hl3qHUmQ2LC4LXKC0=";
})
];
strictDeps = true;
nativeBuildInputs = [
lua5_4 # needed for built-time lua bytecode generation
meson
ninja
pkg-config
];
buildInputs = [
freetype
libgit2
libkqueue # optional
libuchardet
libzip
lua5_4
luajit
mbedtls_2
pcre2
sdl3
xz
zlib
];
mesonFlags = [ "-Duse_system_lua=true" ];
meta = {
changelog = "https://github.com/pragtical/pragtical/blob/${finalAttrs.src.rev}/changelog.md";
description = "Practical and pragmatic code editor";
homepage = "https://pragtical.dev";
license = lib.licenses.mit;
mainProgram = "pragtical";
maintainers = with lib.maintainers; [
suhr
tomasajt
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
versionCheckHook,
nix-update-script,
bash,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "prctl";
version = "1.7";
src = fetchFromGitHub {
owner = "hikerockies";
repo = "prctl";
tag = "v${finalAttrs.version}";
hash = "sha256-1b8SO70mp0ACL3hw/iwKpPUpI5G7hF7l84hlSDHB2oA=";
};
strictDeps = true;
nativeBuildInputs = [ autoreconfHook ];
nativeInstallCheckInputs = [ versionCheckHook ];
patches = [
# Eliminate unsafe strcpy() calls,
# cf. <https://github.com/hikerockies/prctl/pull/1>
./prctl-strcpy-overflow.patch
# Correct option parsing,
# cf. <https://github.com/hikerockies/prctl/pull/2>
./prctl-getopt.patch
];
postPatch = ''
substituteInPlace prctl.c \
--replace-fail '"/bin/bash"' '"${lib.getExe bash}"'
'';
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Tool to query and modify process behaviour";
homepage = "https://tracker.debian.org/pkg/prctl";
changelog = "https://github.com/hikerockies/prctl/blob/v${finalAttrs.version}/ChangeLog";
mainProgram = "prctl";
maintainers = with lib.maintainers; [ mvs ];
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,55 @@
From 6745b6362681f57823a57575a7949bd510767ac4 Mon Sep 17 00:00:00 2001
From: Mikael Voss <mvs@nyantec.com>
Date: Wed, 23 Jul 2025 18:37:10 +0200
Subject: [PATCH 1/2] Replace unsound use of EOF
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
While getopt_long returns -1 on error, EOF is an implementationdefined
negative integer constant that just happens to be defined as -1 by most
C standard libraries.
---
prctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/prctl.c b/prctl.c
index 38cbcd1..527584c 100644
--- a/prctl.c
+++ b/prctl.c
@@ -299,8 +299,8 @@ main(int argc, char **argv)
exit(1);
}
opterr = 0;
- while ((opt = getopt_long(argc, argv, "+qhv", longopts,
- (int *) NULL)) != EOF) {
+ while ((opt = getopt_long(argc, argv, "+qhv", longopts,
+ (int *) NULL)) != -1) {
switch (opt) {
case 'u':
if (strcmp(optarg, "silent") == 0) {
From 0c11b937c30e41e97c3fa852f6d65cd595bc193f Mon Sep 17 00:00:00 2001
From: Mikael Voss <mvs@nyantec.com>
Date: Wed, 23 Jul 2025 18:54:39 +0200
Subject: [PATCH 2/2] Properly display invalid long options
---
prctl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/prctl.c b/prctl.c
index 527584c..4c1d632 100644
--- a/prctl.c
+++ b/prctl.c
@@ -375,8 +375,8 @@ main(int argc, char **argv)
break;
case '?':
- fprintf(stderr, "%s: invalid option - %c\n",
- progname, optopt);
+ fprintf(stderr, "%s: invalid option: %s\n",
+ progname, argv[optind - 1]);
exit(1);
break;
}

View File

@@ -0,0 +1,138 @@
From 079877486d9bbe170de2fbc3cba37713d11ab224 Mon Sep 17 00:00:00 2001
From: Mikael Voss <mvs@nyantec.com>
Date: Wed, 23 Jul 2025 17:33:04 +0200
Subject: [PATCH 1/2] Avoid unnecessary copy of argv[0]
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The programme is copying the contents of *argv[0] into a fixedsize
buffer of 512 bytes using strcpy(). This might result in a buffer
overflow and is unnecessary as the contents are never modified.
---
prctl.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/prctl.c b/prctl.c
index 38cbcd1..b8cb85b 100644
--- a/prctl.c
+++ b/prctl.c
@@ -51,13 +51,13 @@ struct option longopts[] = {
int verbose=0;
void
-print_version(char *progname)
+print_version(char const *progname)
{
printf("%s version %s\n", progname, VERSION);
}
void
-usage(char *progname)
+usage(char const *progname)
{
print_version(progname);
printf("Usage: %s [-v] [-h|--help] [--version]\n", progname);
@@ -273,8 +273,7 @@ int
main(int argc, char **argv)
{
int opt, cmd_start;
- char *progname;
- char fullpath[512];
+ char const *progname;
char shellname[128];
int unaligned_val = -99;
int fpemu_val = -99;
@@ -284,11 +283,10 @@ main(int argc, char **argv)
int display_all = 0;
int umask;
- strcpy(fullpath, argv[0]);
- if ((progname = strrchr(fullpath, '/')) != NULL) {
+ if ((progname = strrchr(argv[0], '/')) != NULL) {
progname++;
} else {
- progname = fullpath;
+ progname = argv[0];
}
/*
From c233d083cec389e10dc9e85b3a835cf81246c275 Mon Sep 17 00:00:00 2001
From: Mikael Voss <mvs@nyantec.com>
Date: Wed, 23 Jul 2025 17:57:59 +0200
Subject: [PATCH 2/2] Avoid unnecessary copy of shell path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The programme tries getenv("SHELL") and getpwuid(getuid())->pw_shell to
determine the preferred shell, falling back to DEFAULT_SHELL, and
copies the contents pointed to into a fixedsized buffer of 128 bytes
using strcpy().
This could result in a buffer overflow and is not necessary: While both
getenv() and getpwuid() return pointers to locations which might get
modified by subsequent calls to their respective function families,
they are only called once, so that these pointers can be aliased safely.
In addition, getenv("SHELL") would return a null pointer if the variable
is unset in the environment, resulting in a null pointer dereference in
the enclosing strcpy() call.
---
prctl.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/prctl.c b/prctl.c
index b8cb85b..342419c 100644
--- a/prctl.c
+++ b/prctl.c
@@ -274,7 +274,7 @@ main(int argc, char **argv)
{
int opt, cmd_start;
char const *progname;
- char shellname[128];
+ char const *shellname;
int unaligned_val = -99;
int fpemu_val = -99;
int mcekill_val = -99;
@@ -443,31 +443,27 @@ main(int argc, char **argv)
}
printf("Starting a shell\n");
- strcpy(shellname, getenv("SHELL"));
-
+ shellname = getenv("SHELL");
+
/*
* Make sure SHELL environment variable is not unset. If it
- * is, start bash.
+ * is, start user login shell or bash.
*/
- if (shellname[0] == 0) {
+ if (shellname == NULL) {
struct passwd *pwd_entry;
pwd_entry = getpwuid(getuid());
- if (pwd_entry == NULL) {
- strcpy(shellname, DEFAULT_SHELL);
+ if (pwd_entry != NULL && pwd_entry->pw_shell != NULL) {
+ shellname = pwd_entry->pw_shell;
} else {
- if (pwd_entry->pw_shell != NULL) {
- strcpy(shellname, pwd_entry->pw_shell);
- } else {
- strcpy(shellname, DEFAULT_SHELL);
- }
+ shellname = DEFAULT_SHELL;
}
}
/*
* Now exec the shell
*/
- if (execlp(shellname, (char *)shellname, (char *) 0) == -1) {
+ if (execlp(shellname, shellname, (char *) 0) == -1) {
fprintf(stderr, "Failed to exec the shell: %s\n",
strerror(errno));
exit(1);

View File

@@ -0,0 +1,55 @@
{
lib,
python3Packages,
fetchFromGitHub,
fetchpatch,
}:
python3Packages.buildPythonApplication rec {
pname = "pre-commit-hook-ensure-sops";
version = "1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "yuvipanda";
repo = "pre-commit-hook-ensure-sops";
tag = "v${version}";
hash = "sha256-8sMmHNzmYwOmHYSWoZ4rKb/2lKziFmT6ux+s+chd/Do=";
};
patches = [
# Add the command-line entrypoint to pyproject.toml
# Can be removed after v1.2 release that includes changes
(fetchpatch {
url = "https://github.com/yuvipanda/pre-commit-hook-ensure-sops/commit/ed88126afa253df6009af7cbe5aa2369f963be1c.patch";
hash = "sha256-mMxAoC3WEciO799Rq8gZ2PJ6FT/GbeSpxlr1EPj7r4s=";
})
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
ruamel-yaml
];
pythonImportsCheck = [
"pre_commit_hook_ensure_sops"
];
# Test entrypoint
checkPhase = ''
runHook preCheck
$out/bin/pre-commit-hook-ensure-sops --help
runHook postCheck
'';
meta = with lib; {
description = "Pre-commit hook to ensure that files that should be encrypted with sops are";
homepage = "https://github.com/yuvipanda/pre-commit-hook-ensure-sops";
maintainers = with maintainers; [ nialov ];
license = licenses.bsd3;
mainProgram = "pre-commit-hook-ensure-sops";
};
}

View File

@@ -0,0 +1,17 @@
diff --git a/pre_commit/resources/hook-tmpl b/pre_commit/resources/hook-tmpl
index 53d29f9..9b5dc2c 100755
--- a/pre_commit/resources/hook-tmpl
+++ b/pre_commit/resources/hook-tmpl
@@ -10,11 +10,4 @@ ARGS=(hook-impl)
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
-if [ -x "$INSTALL_PYTHON" ]; then
- exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
-elif command -v pre-commit > /dev/null; then
- exec pre-commit "${ARGS[@]}"
-else
- echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
- exit 1
-fi
+exec @pre-commit@/bin/pre-commit "${ARGS[@]}"

View File

@@ -0,0 +1,26 @@
diff --git a/pre_commit/languages/node.py b/pre_commit/languages/node.py
index 66d6136..e3f1bac 100644
--- a/pre_commit/languages/node.py
+++ b/pre_commit/languages/node.py
@@ -83,7 +83,7 @@ def install_environment(
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath
if sys.platform == 'win32': # pragma: no cover
envdir = fr'\\?\{os.path.normpath(envdir)}'
- cmd = [sys.executable, '-mnodeenv', '--prebuilt', '--clean-src', envdir]
+ cmd = ['@nodeenv@/bin/nodeenv', '--prebuilt', '--clean-src', envdir]
if version != C.DEFAULT:
cmd.extend(['-n', version])
cmd_output_b(*cmd)
diff --git a/pre_commit/languages/python.py b/pre_commit/languages/python.py
index 976674e..485fe2d 100644
--- a/pre_commit/languages/python.py
+++ b/pre_commit/languages/python.py
@@ -203,7 +203,7 @@ def install_environment(
additional_dependencies: Sequence[str],
) -> None:
envdir = lang_base.environment_dir(prefix, ENVIRONMENT_DIR, version)
- venv_cmd = [sys.executable, '-mvirtualenv', envdir]
+ venv_cmd = ['@virtualenv@/bin/virtualenv', envdir]
python = norm_version(version)
if python is not None:
venv_cmd.extend(('-p', python))

View File

@@ -0,0 +1,228 @@
{
lib,
stdenv,
python3Packages,
fetchFromGitHub,
# tests
cabal-install,
cargo,
gitMinimal,
go,
perl,
versionCheckHook,
writableTmpDirAsHomeHook,
coursier,
dotnet-sdk,
nodejs,
# passthru
callPackage,
pre-commit,
}:
let
i686Linux = stdenv.buildPlatform.system == "i686-linux";
in
python3Packages.buildPythonApplication rec {
pname = "pre-commit";
version = "4.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pre-commit";
repo = "pre-commit";
tag = "v${version}";
hash = "sha256-vypzvO00pic5F7c3D3ABBMXLrBSEB9n6og3EsBLZNCs=";
};
patches = [
./languages-use-the-hardcoded-path-to-python-binaries.patch
./hook-tmpl.patch
./pygrep-pythonpath.patch
];
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
cfgv
identify
nodeenv
pyyaml
toml
virtualenv
];
nativeCheckInputs = [
cabal-install
cargo
gitMinimal
go
perl
versionCheckHook
writableTmpDirAsHomeHook
]
++ (with python3Packages; [
pytest-env
pytest-forked
pytest-xdist
pytestCheckHook
re-assert
])
++ lib.optionals (!i686Linux) [
# coursier can be moved back to the main nativeCheckInputs list once were able to bootstrap a
# JRE on i686-linux: <https://github.com/NixOS/nixpkgs/issues/314873>. When coursier gets
# moved back to the main nativeCheckInputs list, dont forget to re-enable the
# coursier-related test that is currently disabled on i686-linux.
coursier
# i686-linux: dotnet-sdk not available
dotnet-sdk
# nodejs can be moved back to the main nativeCheckInputs list once this
# issue is fixed: <https://github.com/NixOS/nixpkgs/issues/387658>. When nodejs gets
# moved back to the main nativeCheckInputs list, dont forget to re-enable the
# Node.js-related tests that are currently disabled on i686-linux.
nodejs
];
versionCheckProgramArg = "--version";
postPatch = ''
substituteInPlace pre_commit/resources/hook-tmpl \
--subst-var-by pre-commit $out
substituteInPlace pre_commit/languages/python.py \
--subst-var-by virtualenv ${python3Packages.virtualenv}
substituteInPlace pre_commit/languages/node.py \
--subst-var-by nodeenv ${python3Packages.nodeenv}
patchShebangs pre_commit/resources/hook-tmpl
'';
pytestFlags = [
"--forked"
];
preCheck =
lib.optionalString (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)) ''
# Disable outline atomics for rust tests on aarch64-linux.
export RUSTFLAGS="-Ctarget-feature=-outline-atomics"
''
+ ''
export GIT_AUTHOR_NAME=test GIT_COMMITTER_NAME=test \
GIT_AUTHOR_EMAIL=test@example.com GIT_COMMITTER_EMAIL=test@example.com \
VIRTUALENV_NO_DOWNLOAD=1 PRE_COMMIT_NO_CONCURRENCY=1
''
+ lib.optionalString (!i686Linux) ''
# Resolve `.NET location: Not found` errors for dotnet tests
export DOTNET_ROOT="${dotnet-sdk}/share/dotnet"
''
+ ''
git init -b master
python -m venv --system-site-packages venv
source "$PWD/venv/bin/activate"
'';
postCheck = ''
deactivate
'';
disabledTests = [
# ERROR: The install method you used for conda--probably either `pip install conda`
# or `easy_install conda`--is not compatible with using conda as an application.
"test_conda_"
"test_local_conda_"
# /build/pytest-of-nixbld/pytest-0/test_install_ruby_with_version0/rbenv-2.7.2/libexec/rbenv-init:
# /usr/bin/env: bad interpreter: No such file or directory
"test_ruby_"
# network
"test_additional_dependencies_roll_forward"
"test_additional_golang_dependencies_installed"
"test_additional_node_dependencies_installed"
"test_additional_rust_cli_dependencies_installed"
"test_additional_rust_lib_dependencies_installed"
"test_automatic_toolchain_switching"
"test_coursier_hook"
"test_coursier_hook_additional_dependencies"
"test_dart"
"test_dart_additional_deps"
"test_dart_additional_deps_versioned"
"test_during_commit_all"
"test_golang_default_version"
"test_golang_hook"
"test_golang_hook_still_works_when_gobin_is_set"
"test_golang_infer_go_version_default"
"test_golang_system"
"test_golang_versioned"
"test_language_version_with_rustup"
"test_installs_rust_missing_rustup"
"test_installs_without_links_outside_env"
"test_julia_hook"
"test_julia_repo_local"
"test_local_golang_additional_deps"
"test_lua"
"test_lua_additional_dependencies"
"test_node_additional_deps"
"test_node_hook_versions"
"test_perl_additional_dependencies"
"test_r_hook"
"test_r_inline"
"test_r_inline_hook"
"test_r_local_with_additional_dependencies_hook"
"test_r_with_additional_dependencies_hook"
"test_run_a_node_hook_default_version"
"test_run_lib_additional_dependencies"
"test_run_versioned_node_hook"
"test_rust_cli_additional_dependencies"
"test_swift_language"
"test_run_example_executable"
"test_run_dep"
# i don't know why these fail
"test_install_existing_hooks_no_overwrite"
"test_installed_from_venv"
"test_uninstall_restores_legacy_hooks"
"test_dotnet_"
"test_health_check_"
# Expects `git commit` to fail when `pre-commit` is not in the `$PATH`,
# but we use an absolute path so it's not an issue.
"test_environment_not_sourced"
# Docker required
"test_docker_"
]
++ lib.optionals i686Linux [
# From coursier_test.py:
"test_error_if_no_deps_or_channel"
# From node_test.py:
"test_healthy_system_node"
"test_unhealthy_if_system_node_goes_missing"
"test_node_hook_system"
"test_node_with_user_config_set"
];
pythonImportsCheck = [
"pre_commit"
];
# add gitMinimal as fallback, if git is not installed
preFixup = ''
makeWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ gitMinimal ]})
'';
passthru.tests = callPackage ./tests.nix {
inherit gitMinimal pre-commit;
};
meta = {
description = "Framework for managing and maintaining multi-language pre-commit hooks";
homepage = "https://pre-commit.com/";
changelog = "https://github.com/pre-commit/pre-commit/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ borisbabic ];
mainProgram = "pre-commit";
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/pre_commit/languages/pygrep.py b/pre_commit/languages/pygrep.py
index ec55560..44e08a1 100644
--- a/pre_commit/languages/pygrep.py
+++ b/pre_commit/languages/pygrep.py
@@ -98,7 +98,7 @@ def run_hook(
color: bool,
) -> tuple[int, bytes]:
cmd = (sys.executable, '-m', __name__, *args, entry)
- return xargs(cmd, file_args, color=color)
+ return xargs(cmd, file_args, color=color, env={ "PYTHONPATH": ':'.join(sys.path) })
def main(argv: Sequence[str] | None = None) -> int:

View File

@@ -0,0 +1,45 @@
{
gitMinimal,
pre-commit,
runCommand,
testers,
}:
{
check-meta-hooks =
runCommand "check-meta-hooks"
{
nativeBuildInputs = [
gitMinimal
pre-commit
];
}
''
cd "$(mktemp --directory)"
export HOME="$PWD"
cat << 'EOF' > .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: echo
name: echo
entry: echo
files: \.yaml$
language: system
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- id: identity
EOF
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git init --initial-branch=main
git add .
pre-commit run --all-files
touch $out
'';
version = testers.testVersion {
package = pre-commit;
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "pre2k";
version = "3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "garrettfoster13";
repo = "pre2k";
tag = version;
hash = "sha256-z1ttuRos7x/zdWiYYozxWzRarFExd4W5rUYAEiUMugU=";
};
pythonRelaxDeps = [
"impacket"
"ldap3"
"pyasn1"
"rich"
"typer"
];
build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
impacket
ldap3
pyasn1
rich
typer
];
pythonImportsCheck = [ "pre2k" ];
meta = {
description = "Tool to query for the existence of pre-windows 2000 computer objects";
homepage = "https://github.com/garrettfoster13/pre2k";
changelog = "https://github.com/garrettfoster13/pre2k/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "pre2k";
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication {
pname = "config-visualizer";
version = "unstable-2022-02-23";
pyproject = true;
src = fetchFromGitHub {
owner = "precice";
repo = "config-visualizer";
rev = "60f2165f25352c8261f370dc4ceb64a8b422d4ec";
hash = "sha256-2dnpkec9hN4oAqwu+1WmDJrfeu+JbfqZ6guv3bC4H1c=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
lxml
pydot
];
doCheck = false;
meta = with lib; {
homepage = "https://github.com/precice/config-visualizer";
description = "Small python tool for visualizing the preCICE xml configuration";
license = licenses.gpl3Only;
maintainers = with maintainers; [ Scriptkiddi ];
mainProgram = "precice-config-visualizer";
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
eigen,
libxml2,
mpi,
python3Packages,
petsc,
pkg-config,
}:
stdenv.mkDerivation {
pname = "precice";
version = "3.2.0-unstable-2025-05-23";
src = fetchFromGitHub {
owner = "precice";
repo = "precice";
rev = "6ee3e347843d4d3c416a32917f6505d35b822445";
hash = "sha256-BxNAbpeLqJPzQ9dvvgC9jJQQFBdVMunSqIekz7SIHv4=";
};
cmakeFlags = [
(lib.cmakeBool "PRECICE_PETScMapping" false)
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
eigen
libxml2
mpi
petsc
python3Packages.python
python3Packages.numpy
];
meta = {
description = "PreCICE stands for Precise Code Interaction Coupling Environment";
homepage = "https://precice.org/";
license = with lib.licenses; [ gpl3 ];
maintainers = with lib.maintainers; [ Scriptkiddi ];
mainProgram = "binprecice";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "precious";
version = "0.10.0";
src = fetchFromGitHub {
owner = "houseabsolute";
repo = "precious";
tag = "v${finalAttrs.version}";
hash = "sha256-bHrn78wzdkxV92Lp3MzNUpSvMTyc8l3tw+z5NBxJPoA=";
};
cargoHash = "sha256-OA1C98C0BHEVl056UCL5alT292djuBDGFjZn2HAytEQ=";
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "One code quality tool to rule them all";
homepage = "https://github.com/houseabsolute/precious";
changelog = "https://github.com/houseabsolute/precious/releases/tag/v${finalAttrs.version}";
mainProgram = "precious";
maintainers = with lib.maintainers; [ abhisheksingh0x558 ];
license = with lib.licenses; [
mit # or
asl20
];
};
})

View File

@@ -0,0 +1,202 @@
{
lib,
python3Packages,
fetchPypi,
nixosTests,
nix-update-script,
}:
python3Packages.buildPythonApplication rec {
pname = "prefect";
version = "3.4.22";
pyproject = true;
# Trying to install from source is challenging
# the packaging is using versioningit and looking for
# .git directory
# Source will be missing sdist, uv.lock, ui artefacts ...
src = fetchPypi {
inherit pname version;
hash = "sha256-S0ank+mQekyFObBLsv28YJyYEPaQ12c6O8jQya69/IQ=";
};
pythonRelaxDeps = [
"websockets"
];
build-system = with python3Packages; [
hatchling
versioningit
];
dependencies =
with python3Packages;
[
aiosqlite
alembic
apprise
asyncpg
click
cryptography
dateparser
docker
graphviz
jinja2
jinja2-humanize-extension
humanize
pytz
readchar
sqlalchemy
typer
# client dependencies
anyio
asgi-lifespan
cachetools
cloudpickle
coolname
exceptiongroup
fastapi
fsspec
# graphviz already included
griffe
httpcore
httpx
jsonpatch
jsonschema
opentelemetry-api
orjson
packaging
pathspec
pendulum
prometheus-client
pydantic
pydantic-core
pydantic-extra-types
pydantic-settings
python-dateutil
python-slugify
python-socks
pyyaml
rfc3339-validator
rich
ruamel-yaml
semver
sniffio
toml
typing-extensions
ujson
uvicorn
websockets
whenever
uv
]
++ sqlalchemy.optional-dependencies.asyncio
++ httpx.optional-dependencies.http2
++ python-socks.optional-dependencies.asyncio;
optional-dependencies = with python3Packages; {
aws = [
# prefect-aws
];
azure = [
# prefect-azure
];
bitbucket = [
# prefect-bitbucket
];
dask = [
# prefect-dask
];
databricks = [
# prefect-databricks
];
dbt = [
# prefect-dbt
];
docker = [
# prefect-docker
];
email = [
# prefect-email
];
gcp = [
# prefect-gcp
];
github = [
# prefect-github
];
gitlab = [
# prefect-gitlab
];
kubernetes = [
# prefect-kubernetes
];
otel = [
opentelemetry-distro
opentelemetry-exporter-otlp
opentelemetry-instrumentation
opentelemetry-instrumentation-logging
opentelemetry-test-utils
];
ray = [
# prefect-ray
];
redis = [
# prefect-redis
];
shell = [
# prefect-shell
];
slack = [
# prefect-slack
];
snowflake = [
# prefect-snowflake
];
sqlalchemy = [
# prefect-sqlalchemy
];
};
makeWrapperArgs = [
# Add the installed directories to the python path so the worker can find them
"--prefix PYTHONPATH : ${python3Packages.makePythonPath dependencies}"
"--prefix PYTHONPATH : $out/${python3Packages.python.sitePackages}"
];
passthru.tests = {
inherit (nixosTests) prefect;
updateScript = nix-update-script {
extraArgs = [
# avoid prereleases
"--version-regex"
"^(\\d+\\.\\d+\\.\\d+)$"
];
};
};
# Tests are not included in the pypi source
doCheck = false;
# nativeCheckInputs = (
# with python3Packages;
# [
# pytestCheckHook
# pytest-asyncio
# pytest-cov
# pytest-env
# # pytest-flakefinder
# pytest-mypy-plugins
# pytest-timeout
# pytest-xdist
# ]
# );
meta = {
description = "Workflow orchestration framework for building resilient data pipelines in Python";
homepage = "https://github.com/PrefectHQ/prefect";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ happysalada ];
mainProgram = "prefect";
};
}

View File

@@ -0,0 +1,114 @@
{
lib,
fetchFromGitHub,
rustPlatform,
git,
uv,
python312,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "prek";
version = "0.2.4";
src = fetchFromGitHub {
owner = "j178";
repo = "prek";
tag = "v${finalAttrs.version}";
hash = "sha256-XvNvVWEmJpsY2AxTYLT0/4IiJ2QTI4mWwDleMmZ2LgA=";
};
cargoHash = "sha256-PDYCO1ggKwtMR9tnokY7JqVM03FWsO4c2L4GV+7TKu4=";
preBuild = ''
version312_str=$(${python312}/bin/python -c 'import sys; print(sys.version_info[:3])')
substituteInPlace ./tests/languages/python.rs \
--replace '(3, 12, 11)' "$version312_str"
'';
nativeCheckInputs = [
git
python312
uv
];
preCheck = ''
export TEMP="$(mktemp -d)"
export TMP=$TEMP
export TMPDIR=$TEMP
export PREK_INTERNAL__TEST_DIR=$TEMP
'';
__darwinAllowLocalNetworking = true;
useNextest = true;
# some python tests use uv, which in turn needs python
UV_PYTHON = "${python312}/bin/python";
checkFlags = map (t: "--skip ${t}") [
# these tests require internet access
"check_added_large_files_hook"
"check_json_hook"
"end_of_file_fixer_hook"
"mixed_line_ending_hook"
"install_hooks_only"
"install_with_hooks"
"golang"
"node"
"script"
"check_useless_excludes_remote"
# "meta_hooks"
"reuse_env"
"docker::docker"
"docker::workspace_docker"
"docker_image::docker_image"
"pygrep::basic_case_sensitive"
"pygrep::case_insensitive"
"pygrep::case_insensitive_multiline"
"pygrep::complex_regex_patterns"
"pygrep::invalid_args"
"pygrep::invalid_regex"
"pygrep::multiline_mode"
"pygrep::negate_mode"
"pygrep::negate_multiline_mode"
"pygrep::pattern_not_found"
"pygrep::python_regex_quirks"
"python::additional_dependencies"
"python::can_not_download"
"python::hook_stderr"
"python::language_version"
# can't checkout pre-commit-hooks
"cjk_hook_name"
"fail_fast"
"file_types"
"files_and_exclude"
"git_commit_a"
"log_file"
"merge_conflicts"
"pass_env_vars"
"restore_on_interrupt"
"run_basic"
"run_last_commit"
"same_repo"
"skips"
"staged_files_only"
"subdirectory"
"check_yaml_hook"
"check_yaml_multiple_document"
"builtin_hooks_workspace_mode"
"fix_byte_order_marker_hook"
"fix_byte_order_marker"
# does not properly use TMP
"hook_impl"
];
meta = {
homepage = "https://github.com/j178/prek";
description = "Better `pre-commit`, re-engineered in Rust ";
mainProgram = "prek";
changelog = "https://github.com/j178/prek/releases/tag/${finalAttrs.src.tag}";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.knl ];
};
})

View File

@@ -0,0 +1,53 @@
{
stdenv,
lib,
fetchgit,
autoreconfHook,
libelf,
libiberty,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "prelink";
version = "20151030-unstable-2024-07-02";
src = fetchgit {
url = "https://git.yoctoproject.org/prelink-cross";
branchName = "cross_prelink";
rev = "ff2561c02ade96c5d4d56ddd4e27ff064840a176";
sha256 = "sha256-wmX7ybrZDWEop9fiInZMvgK/fpEk3sq+Wu8DSWWIvQY=";
};
strictDeps = true;
configurePlatforms = [
"build"
"host"
];
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
stdenv.cc.libc
libelf
libiberty
];
# most tests fail
doCheck = false;
enableParallelBuilding = true;
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "ELF prelinking utility to speed up dynamic linking";
homepage = "https://wiki.yoctoproject.org/wiki/Cross-Prelink";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ artturin ];
};
}

View File

@@ -0,0 +1,54 @@
diff --git a/Makefile.in b/Makefile.in
index e4072e4..4a6b069 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -327,23 +327,9 @@ installcheck-initdSCRIPTS: $(initd_SCRIPTS)
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
done; \
done; rm -f c$${pid}_.???; exit $$bad
-install-logDATA: $(log_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(logdir)" || $(MKDIR_P) "$(DESTDIR)$(logdir)"
- @list='$(log_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(logDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(logdir)/$$f'"; \
- $(logDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(logdir)/$$f"; \
- done
+install-logDATA:
uninstall-logDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(log_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(logdir)/$$f'"; \
- rm -f "$(DESTDIR)$(logdir)/$$f"; \
- done
install-logrotateDATA: $(logrotate_DATA)
@$(NORMAL_INSTALL)
test -z "$(logrotatedir)" || $(MKDIR_P) "$(DESTDIR)$(logrotatedir)"
@@ -361,23 +347,9 @@ uninstall-logrotateDATA:
echo " rm -f '$(DESTDIR)$(logrotatedir)/$$f'"; \
rm -f "$(DESTDIR)$(logrotatedir)/$$f"; \
done
-install-pkglocalstateDATA: $(pkglocalstate_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(pkglocalstatedir)" || $(MKDIR_P) "$(DESTDIR)$(pkglocalstatedir)"
- @list='$(pkglocalstate_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(pkglocalstateDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglocalstatedir)/$$f'"; \
- $(pkglocalstateDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglocalstatedir)/$$f"; \
- done
+install-pkglocalstateDATA:
uninstall-pkglocalstateDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(pkglocalstate_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkglocalstatedir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkglocalstatedir)/$$f"; \
- done
install-sysconfigDATA: $(sysconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(sysconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfigdir)"

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchzip,
autoconf,
automake,
pkg-config,
glib,
}:
stdenv.mkDerivation rec {
pname = "preload";
version = "0.6.4";
src = fetchzip {
url = "mirror://sourceforge/preload/preload-${version}.tar.gz";
hash = "sha256-vAIaSwvbUFyTl6DflFhuSaMuX9jPVBah+Nl6c/fUbAM=";
};
patches = [
# Prevents creation of /var directories on build
./0001-prevent-building-to-var-directories.patch
];
nativeBuildInputs = [
autoconf
automake
pkg-config
];
buildInputs = [ glib ];
configureFlags = [ "--localstatedir=/var" ];
postInstall = ''
make sysconfigdir=$out/etc/conf.d install
'';
meta = with lib; {
description = "Makes applications run faster by prefetching binaries and shared objects";
homepage = "https://sourceforge.net/projects/preload";
license = licenses.gpl2Only;
platforms = lib.platforms.linux;
mainProgram = "preload";
maintainers = with maintainers; [ ldprg ];
};
}

View File

@@ -0,0 +1,167 @@
{
autoPatchelfHook,
makeDesktopItem,
lib,
stdenv,
wrapGAppsHook3,
fetchurl,
copyDesktopItems,
alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
gtk3,
libcxx,
libdrm,
libnotify,
libpulseaudio,
libuuid,
libX11,
libXScrnSaver,
libXcomposite,
libXcursor,
libXdamage,
libXext,
libXfixes,
libXi,
libXrandr,
libXrender,
libXtst,
libxcb,
libxshmfence,
libgbm,
nspr,
nss,
pango,
systemd,
libappindicator-gtk3,
libdbusmenu,
}:
stdenv.mkDerivation rec {
pname = "premid";
version = "2.3.4";
src = fetchurl {
url = "https://github.com/premid/Linux/releases/download/v${version}/${pname}.tar.gz";
sha256 = "sha256-ime6SCxm+fhMR2wagv1RItqwLjPxvJnVziW3DZafP50=";
};
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook3
copyDesktopItems
];
buildInputs = [
alsa-lib
cups
libdrm
libuuid
libXdamage
libX11
libXScrnSaver
libXtst
libxcb
libxshmfence
libgbm
nss
];
dontWrapGApps = true;
dontBuild = true;
dontConfigure = true;
libPath = lib.makeLibraryPath [
libcxx
systemd
libpulseaudio
libdrm
libgbm
stdenv.cc.cc
alsa-lib
atk
at-spi2-atk
at-spi2-core
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libnotify
libX11
libXcomposite
libuuid
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
nspr
nss
libxcb
pango
systemd
libXScrnSaver
libappindicator-gtk3
libdbusmenu
];
installPhase = ''
mkdir -p $out/{bin,opt/PreMiD,share/pixmaps}
mv * $out/opt/PreMiD
chmod +x $out/opt/PreMiD/${pname}
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
$out/opt/PreMiD/${pname}
wrapProgram $out/opt/PreMiD/${pname} \
"''${gappsWrapperArgs[@]}" \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${pname}
ln -s $out/opt/PreMiD/${pname} $out/bin/
'';
# This is the icon used by the desktop file
postInstall = ''
ln -s $out/opt/PreMiD/assets/appIcon.png $out/share/pixmaps/${pname}.png
'';
desktopItems = [
(makeDesktopItem {
name = pname;
exec = "PreMiD";
icon = pname;
desktopName = "PreMiD";
genericName = meta.description;
mimeTypes = [ "x-scheme-handler/premid" ];
})
];
meta = with lib; {
description = "Simple, configurable utility to show your web activity as playing status on Discord";
homepage = "https://premid.app";
downloadPage = "https://premid.app/downloads";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mpl20;
maintainers = with maintainers; [ natto1784 ];
platforms = [ "x86_64-linux" ];
mainProgram = "premid";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "present";
version = "0.2.3";
src = fetchFromGitHub {
owner = "terror";
repo = "present";
rev = "43c10253dc31038614eba5824588dbf2716212d6A";
sha256 = "aMy8Qn1kUM7jmvD9nGjBk1XXQF1rTLfnPDJOh9d4uIg=";
};
cargoHash = "sha256-rLLhZL8WQs68+nwCrJ9Dej3T1JU9t+ZrBhSMxAdOfbw=";
# required for tests
postPatch = ''
patchShebangs bin/get_version
'';
doCheck = true;
meta = with lib; {
description = "Script interpolation engine for markdown documents";
homepage = "https://github.com/terror/present/";
license = licenses.cc0;
maintainers = with maintainers; [ cameronfyfe ];
mainProgram = "present";
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
python3Packages,
fetchPypi,
}:
let
# https://github.com/NixOS/nixpkgs/issues/348788
mistune_2 = python3Packages.mistune.overridePythonAttrs (oldAttrs: rec {
version = "2.0.5";
src = fetchPypi {
inherit (oldAttrs) pname;
inherit version;
hash = "sha256-AkYRPLJJLbh1xr5Wl0p8iTMzvybNkokchfYxUc7gnTQ=";
};
});
in
python3Packages.buildPythonPackage rec {
pname = "present";
version = "0.6.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-l9W5L4LD9qRo3rLBkgd2I/aDaj+ucib5UYg+X4RYg6c=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
click
pyyaml
pyfiglet
asciimatics
mistune_2
];
pythonImportsCheck = [ "present" ];
# TypeError: don't know how to make test from: 0.6.0
doCheck = false;
meta = with lib; {
description = "Terminal-based presentation tool with colors and effects";
homepage = "https://github.com/vinayak-mehta/present";
license = licenses.asl20;
maintainers = with maintainers; [ lom ];
mainProgram = "present";
};
}

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
makeBinaryWrapper,
lld,
libsixel,
versionCheckHook,
nix-update-script,
}:
let
inherit (stdenv.hostPlatform) isDarwin isx86_64;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "presenterm";
version = "0.15.1";
src = fetchFromGitHub {
owner = "mfontanini";
repo = "presenterm";
tag = "v${finalAttrs.version}";
hash = "sha256-tkIw7qo7lq3rSaBG0m6HzlXt8l3dQVFSBm8P3v7adVk=";
};
nativeBuildInputs =
lib.optionals isDarwin [
makeBinaryWrapper
]
++ lib.optionals (isDarwin && isx86_64) [
lld
];
buildInputs = [
libsixel
];
buildFeatures = [
"sixel"
];
cargoHash = "sha256-CLoN85A2fggTHs/AHmo43N+9Q4FGKwNmKObw+OMBFao=";
env = lib.optionalAttrs (isDarwin && isx86_64) {
NIX_CFLAGS_LINK = "-fuse-ld=lld";
};
checkFeatures = [
"sixel"
];
checkFlags = [
# failed to load .tmpEeeeaQ: No such file or directory (os error 2)
"--skip=external_snippet"
];
# sixel-sys is dynamically linked to libsixel
postInstall = lib.optionalString isDarwin ''
wrapProgram $out/bin/presenterm \
--prefix DYLD_LIBRARY_PATH : "${lib.makeLibraryPath [ libsixel ]}"
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Terminal based slideshow tool";
changelog = "https://github.com/mfontanini/presenterm/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/mfontanini/presenterm";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ mikaelfangel ];
mainProgram = "presenterm";
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "preserves-tools";
version = "4.996.1";
src = fetchCrate {
inherit pname version;
hash = "sha256-Uyh5mXCypX3TDxxJtnTe6lBoVI8aqdG56ywn7htDGUY=";
};
cargoHash = "sha256-m07/fNuF78+PtG/trXZq9gllmKTt0w5BSMsq2UTKBbY=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd preserves-tool \
--bash <($out/bin/preserves-tool completions bash) \
--fish <($out/bin/preserves-tool completions fish) \
--zsh <($out/bin/preserves-tool completions zsh)
'';
meta = {
description = "Command-line utilities for working with Preserves documents";
homepage = "https://preserves.dev/doc/preserves-tool.html";
license = lib.licenses.asl20;
mainProgram = "preserves-tool";
};
}

View File

@@ -0,0 +1,257 @@
{
lib,
buildNpmPackage,
gettext,
python3,
fetchFromGitHub,
fetchPypi,
plugins ? [ ],
nixosTests,
}:
let
python = python3.override {
self = python;
packageOverrides = final: prev: {
django = prev.django_5_1;
django-csp = prev.django-csp.overridePythonAttrs rec {
version = "3.8";
src = fetchPypi {
inherit version;
pname = "django_csp";
hash = "sha256-7w8an32Nporm4WnALprGYcDs8E23Dg0dhWQFEqaEccA=";
};
};
django-extensions = prev.django-extensions.overridePythonAttrs {
# Compat issues with Django 5.1
# https://github.com/django-extensions/django-extensions/issues/1885
doCheck = false;
};
django-hierarkey = prev.django-hierarkey.overridePythonAttrs rec {
version = "1.2.1";
src = fetchFromGitHub {
owner = "raphaelm";
repo = "django-hierarkey";
tag = version;
hash = "sha256-GkCNVovo2bDCp6m2GBvusXsaBhcmJkPNu97OdtsYROY=";
};
};
};
};
version = "2025.1.0";
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx";
rev = "v${version}";
hash = "sha256-BlPmrfHbpsLI8DCldzoRudpf7T4SUpJXQA5h9o4Thek=";
};
meta = {
description = "Conference planning tool: CfP, scheduling, speaker management";
mainProgram = "pretalx-manage";
homepage = "https://github.com/pretalx/pretalx";
changelog = "https://docs.pretalx.org/changelog/#${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hexa ];
teams = [ lib.teams.c3d2 ];
platforms = lib.platforms.linux;
};
frontend = buildNpmPackage {
pname = "pretalx-frontend";
inherit version src;
sourceRoot = "${src.name}/src/pretalx/frontend/schedule-editor";
npmDepsHash = "sha256-8difCdoG7j75wqwuWA/VBRk9oTjsM0QqLnR0iLkd/FY=";
npmBuildScript = "build";
inherit meta;
};
in
python.pkgs.buildPythonApplication rec {
pname = "pretalx";
inherit version src;
pyproject = true;
outputs = [
"out"
"static"
];
postPatch = ''
substituteInPlace src/pretalx/common/management/commands/rebuild.py \
--replace 'subprocess.check_call(["npm", "run", "build"], cwd=frontend_dir, env=env)' ""
'';
nativeBuildInputs = [
gettext
];
build-system = with python.pkgs; [
setuptools
];
pythonRelaxDeps = [
"beautifulsoup4"
"bleach"
"beautifulsoup4"
"celery"
"css_inline"
"cssutils"
"defusedcsv"
"defusedxml"
"django-compressor"
"django-csp"
"django-filter"
"django-i18nfield"
"djangorestframework"
"markdown"
"pillow"
"publicsuffixlist"
"python-dateutil"
"reportlab"
"requests"
"rules"
"whitenoise"
];
dependencies =
with python.pkgs;
[
beautifulsoup4
bleach
celery
csscompressor
css-inline
cssutils
defusedcsv
defusedxml
django
django-compressor
django-context-decorator
django-countries
django-csp
django-filter
django-formset-js-improved
django-formtools
django-hierarkey
django-i18nfield
django-libsass
django-scopes
djangorestframework
drf-flex-fields
drf-spectacular
libsass
markdown
pillow
publicsuffixlist
python-dateutil
qrcode
reportlab
requests
rules
urlman
vobject
whitenoise
zxcvbn
]
++ beautifulsoup4.optional-dependencies.lxml
++ django.optional-dependencies.argon2
++ plugins;
optional-dependencies = {
postgres = with python.pkgs; [
psycopg2
];
redis = with python.pkgs; [
redis
];
};
postBuild = ''
rm -r ./src/pretalx/frontend/schedule-editor
ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor ./src/pretalx/frontend/schedule-editor
# Generate all static files, see https://docs.pretalx.org/administrator/commands.html#python-m-pretalx-rebuild
PYTHONPATH=$PYTHONPATH:./src python -m pretalx rebuild
'';
postInstall = ''
mkdir -p $out/bin
cp ./src/manage.py $out/bin/pretalx-manage
# The processed source files are in the static output, except for fonts, which are duplicated.
# See <https://github.com/pretalx/pretalx/issues/1585> for more details.
find $out/${python.sitePackages}/pretalx/static \
-mindepth 1 \
-not -path "$out/${python.sitePackages}/pretalx/static/fonts*" \
-delete
# Copy generated static files into dedicated output
mkdir -p $static
cp -r ./src/static.dist/** $static/
# Copy frontend files
ln -s ${frontend}/lib/node_modules/@pretalx/schedule-editor/dist/* $static
'';
preCheck = ''
export PRETALX_CONFIG_FILE="$src/src/tests/ci_sqlite.cfg"
cd src
'';
nativeCheckInputs =
with python.pkgs;
[
faker
freezegun
jsonschema
pytest-cov-stub
pytest-django
pytest-mock
pytest-xdist
pytestCheckHook
responses
]
++ lib.flatten (lib.attrValues optional-dependencies);
disabledTests = [
# tries to run npm run i18n:extract
"test_common_custom_makemessages_does_not_blow_up"
# Expected to perform X queries or less but Y were done
"test_can_see_schedule"
"test_schedule_export_public"
"test_schedule_frab_json_export"
"test_schedule_frab_xcal_export"
"test_schedule_frab_xml_export"
"test_schedule_frab_xml_export_control_char"
"test_schedule_page_text_list"
"test_schedule_page_text_table"
"test_schedule_page_text_wrong_format"
"test_versioned_schedule_page"
# Test is racy
"test_can_reset_password_by_email"
];
passthru = {
inherit python;
tests = {
inherit (nixosTests) pretalx;
};
plugins = lib.recurseIntoAttrs (
lib.packagesFromDirectoryRecursive {
inherit (python.pkgs) callPackage;
directory = ./plugins;
}
);
};
inherit meta;
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "pretalx-downstream";
version = "1.3.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx-downstream";
rev = "v${version}";
hash = "sha256-Q9519jNKQUeNCHg3ivjYyQm1ePMxp/bhtcJAselQiiM=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "pretalx_downstream" ];
meta = {
description = "Use pretalx passively by importing another event's schedule";
homepage = "https://github.com/pretalx/pretalx-downstream";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
numpy,
ollama,
openai,
python-redis-lock,
umap-learn,
}:
buildPythonPackage rec {
pname = "pretalx-llm";
version = "0.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "why2025-datenzone";
repo = "pretalx-llm";
rev = "v${version}";
hash = "sha256-Ga6Itvc+yL+p6K7w6WYTeNfxahaohDidDWnt0GtcWEM=";
};
build-system = [
setuptools
];
dependencies = [
numpy
ollama
openai
python-redis-lock
umap-learn
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretalx_llm"
];
meta = {
description = "LLM support for Pretalx";
homepage = "https://github.com/why2025-datenzone/pretalx-llm";
changelog = "https://github.com/why2025-datenzone/pretalx-llm/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "pretalx-media-ccc-de";
version = "1.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx-media-ccc-de";
rev = "v${version}";
hash = "sha256-76hxS9cYvaRcToD8ooW0Fnp36+7n17j3UR1VD9v2zR8=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "pretalx_media_ccc_de" ];
meta = {
description = "Pull recordings from media.ccc.de and embed them in talk pages";
homepage = "https://github.com/pretalx/pretalx-media-ccc-de";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
unstableGitUpdater,
}:
buildPythonPackage {
pname = "pretalx-openmetrics";
version = "unstable-2025-05-25";
pyproject = true;
src = fetchFromGitHub {
owner = "why2025-datenzone";
repo = "pretalx-openmetrics";
rev = "1121a5d430c403bc9aedb7ae8b1aa81219c8a58f";
hash = "sha256-reQA61JFZsYWE/CAL28Oe60CmGANt0phXLzz9YGtDYQ=";
};
build-system = [
setuptools
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretalx_openmetrics"
];
# no tagged release yet
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "OpenMetrics instrumentation plugin";
homepage = "https://github.com/why2025-datenzone/pretalx-openmetrics";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
}:
buildPythonPackage rec {
pname = "pretalx-pages";
version = "1.7.0";
pyproject = true;
# TODO: https://github.com/pretalx/pretalx-pages/issues/6
src = fetchPypi {
pname = "pretalx_pages";
inherit version;
hash = "sha256-XFZS0FUzouZzVh9AADK5dnezFZiAWoBihD4C184+690=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "pretalx_pages" ];
meta = {
description = "Static pages for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
homepage = "https://github.com/pretalx/pretalx-pages";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "pretalx-public-voting";
version = "1.7.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx-public-voting";
rev = "v${version}";
hash = "sha256-8l+ugonT0WTHyyMJnU3Vi2QVD2Xxpl286m3YEKu+Ij4=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "pretalx_public_voting" ];
meta = {
description = "Public voting plugin for pretalx";
homepage = "https://github.com/pretalx/pretalx-public-voting";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
gettext,
setuptools,
django,
pyjwt,
}:
buildPythonPackage rec {
pname = "pretalx-venueless";
version = "1.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx-venueless";
rev = "v${version}";
hash = "sha256-1YWkyTaImnlGXZWrborvJrx8zc1FOZD/ugOik7S+fC8=";
};
nativeBuildInputs = [ gettext ];
build-system = [ setuptools ];
dependencies = [
django
pyjwt
];
pythonImportsCheck = [ "pretalx_venueless" ];
meta = {
description = "Static venueless for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
homepage = "https://github.com/pretalx/pretalx-venueless";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "pretalx-vimeo";
version = "2.4.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx-vimeo";
rev = "v${version}";
hash = "sha256-MwAKmPQif2wLy03II1t87lIdIf2th4BteaAo5pACjLE=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "pretalx_vimeo" ];
meta = {
description = "Static vimeo for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
homepage = "https://github.com/pretalx/pretalx-vimeo";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
}:
buildPythonPackage rec {
pname = "pretalx-youtube";
version = "2.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretalx";
repo = "pretalx-youtube";
rev = "v${version}";
hash = "sha256-5vQPFW0qABKQjFUvjMrtmIGEpMzLLbAOBA4GFqqBNw0=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "pretalx_youtube" ];
meta = {
description = "Static youtube for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
homepage = "https://github.com/pretalx/pretalx-youtube";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wegank ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
zammad-py,
}:
buildPythonPackage rec {
pname = "pretalx-zammad";
version = "2025.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "badbadc0ffee";
repo = "pretalx-zammad";
tag = "v${version}";
hash = "sha256-YIKZO04vaKPGhUrTFiE4F+KjuBrYm0KsxUua5+Hm7gg=";
};
build-system = [
setuptools
];
dependencies = [
zammad-py
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretalx_zammad"
];
meta = {
description = "Pretalx plugin for Zammad issue tracker";
homepage = "https://github.com/badbadc0ffee/pretalx-zammad";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "pretender";
version = "1.3.2";
src = fetchFromGitHub {
owner = "RedTeamPentesting";
repo = "pretender";
tag = "v${version}";
hash = "sha256-c8uXN7UMj6UZPVt2aNSg6mRex8w+u7J5I7TAB7MzEWg=";
};
vendorHash = "sha256-UzKprzkxqG7FOPWcFQGuZtn+gHMeMy4jqCLUSdyO2l0=";
# Tests require network access
doCheck = false;
meta = {
description = "Tool for handling machine-in-the-middle tasks";
mainProgram = "pretender";
homepage = "https://github.com/RedTeamPentesting/pretender";
changelog = "https://github.com/RedTeamPentesting/pretender/releases/tag/v${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "pretix-banktool";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-banktool";
rev = "v${version}";
hash = "sha256-x6P+WqrOak5/gmMEmBkHrx6kPsbSOAXbKRbndFG3IJU=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
click
fints
requests
mt-940
];
doCheck = false; # no tests
pythonImportsCheck = [ "pretix_banktool" ];
meta = with lib; {
description = "Automatic bank data upload tool for pretix (with FinTS client)";
homepage = "https://github.com/pretix/pretix-banktool";
license = licenses.gpl3Only;
maintainers = with maintainers; [ hexa ];
mainProgram = "pretix-banktool";
};
}

View File

@@ -0,0 +1,320 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
fetchPypi,
nodejs,
python3,
gettext,
nixosTests,
pretix,
plugins ? [ ],
}:
let
python = python3.override {
self = python;
packageOverrides = self: super: {
django = super.django_4;
django-oauth-toolkit = super.django-oauth-toolkit.overridePythonAttrs (oldAttrs: {
version = "2.3.0";
src = fetchFromGitHub {
inherit (oldAttrs.src) owner repo;
rev = "refs/tags/v${version}";
hash = "sha256-oGg5MD9p4PSUVkt5pGLwjAF4SHHf4Aqr+/3FsuFaybY=";
};
});
stripe = super.stripe.overridePythonAttrs rec {
version = "7.9.0";
src = fetchPypi {
pname = "stripe";
inherit version;
hash = "sha256-hOXkMINaSwzU/SpXzjhTJp0ds0OREc2mtu11LjSc9KE=";
};
};
pretix = self.toPythonModule pretix;
pretix-plugin-build = self.callPackage ./plugin-build.nix { };
};
};
pname = "pretix";
version = "2025.8.0";
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix";
rev = "refs/tags/v${version}";
hash = "sha256-89BAQZpXyyTg6T9hxm4EV8QHZDcD3FcnGKxAulxziyg=";
};
npmDeps = buildNpmPackage {
pname = "pretix-node-modules";
inherit version src;
sourceRoot = "${src.name}/src/pretix/static/npm_dir";
npmDepsHash = "sha256-E2K9SYqRbhpQi83va8D02cwPnf51haoKv4P/ppU2m08=";
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir $out
cp -R node_modules $out/
runHook postInstall
'';
};
in
python.pkgs.buildPythonApplication rec {
inherit pname version src;
pyproject = true;
patches = [
# Discover pretix.plugin entrypoints during build and add them into
# INSTALLED_APPS, so that their static files are collected.
./plugin-build.patch
];
pythonRelaxDeps = [
"beautifulsoup4"
"celery"
"css-inline"
"django-bootstrap3"
"django-formset-js-improved"
"django-i18nfield"
"django-localflavor"
"django-phonenumber-field"
"dnspython"
"drf_ujson2"
"importlib-metadata"
"kombu"
"markdown"
"oauthlib"
"phonenumberslite"
"pillow"
"protobuf"
"pycparser"
"pycryptodome"
"pyjwt"
"pypdf"
"python-bidi"
"qrcode"
"redis"
"reportlab"
"requests"
"sentry-sdk"
"sepaxml"
"ua-parser"
"webauthn"
];
pythonRemoveDeps = [
"vat_moss_forked" # we provide a patched vat-moss package
];
postPatch = ''
NODE_PREFIX=src/pretix/static.dist/node_prefix
mkdir -p $NODE_PREFIX
cp -R ${npmDeps}/node_modules $NODE_PREFIX/
chmod -R u+w $NODE_PREFIX/
# unused
sed -i "/setuptools-rust/d" pyproject.toml
substituteInPlace pyproject.toml \
--replace-fail '"backend"' '"setuptools.build_meta"' \
--replace-fail 'backend-path = ["_build"]' ""
# npm ci would remove and try to reinstall node_modules
substituteInPlace src/pretix/_build.py \
--replace-fail "npm ci" "npm install"
'';
build-system = with python.pkgs; [
gettext
nodejs
setuptools
tomli
];
dependencies =
with python.pkgs;
[
arabic-reshaper
babel
beautifulsoup4
bleach
celery
chardet
cryptography
css-inline
defusedcsv
django
django-bootstrap3
django-compressor
django-countries
django-filter
django-formset-js-improved
django-formtools
django-hierarkey
django-hijack
django-i18nfield
django-libsass
django-localflavor
django-markup
django-oauth-toolkit
django-otp
django-phonenumber-field
django-redis
django-scopes
django-statici18n
djangorestframework
dnspython
drf-ujson2
geoip2
importlib-metadata
isoweek
jsonschema
kombu
libsass
lxml
markdown
mt-940
oauthlib
openpyxl
packaging
paypalrestsdk
paypal-checkout-serversdk
pyjwt
phonenumberslite
pillow
pretix-plugin-build
protobuf
psycopg2-binary
pycountry
pycparser
pycryptodome
pypdf
python-bidi
python-dateutil
pytz
pytz-deprecation-shim
pyuca
qrcode
redis
reportlab
requests
sentry-sdk
sepaxml
stripe
text-unidecode
tlds
tqdm
ua-parser
vat-moss
vobject
webauthn
zeep
]
++ django.optional-dependencies.argon2
++ plugins;
optional-dependencies = with python.pkgs; {
memcached = [
pylibmc
];
};
postInstall = ''
mkdir -p $out/bin
cp ./src/manage.py $out/${python.sitePackages}/pretix/manage.py
makeWrapper $out/${python.sitePackages}/pretix/manage.py $out/bin/pretix-manage \
--prefix PYTHONPATH : "$PYTHONPATH"
# Trim packages size
rm -rfv $out/${python.sitePackages}/pretix/static.dist/node_prefix
'';
dontStrip = true; # no binaries
nativeCheckInputs =
with python.pkgs;
[
pytestCheckHook
pytest-xdist
pytest-mock
pytest-django
pytest-asyncio
pytest-rerunfailures
freezegun
fakeredis
responses
]
++ lib.flatten (lib.attrValues optional-dependencies);
pytestFlags = [
"--reruns=3"
];
disabledTests = [
# unreliable around day changes
"test_order_create_invoice"
# outdated translation files
# https://github.com/pretix/pretix/commit/c4db2a48b6ac81763fa67475d8182aee41c31376
"test_different_dates_spanish"
"test_same_day_spanish"
"test_same_month_spanish"
"test_same_year_spanish"
# broken with fakeredis>=2.27.0
"test_waitinglist_cache_separation"
"test_waitinglist_item_active"
"test_waitinglist_variation_active"
];
preCheck = ''
export PYTHONPATH=$(pwd)/src:$PYTHONPATH
export DJANGO_SETTINGS_MODULE=tests.settings
'';
passthru = {
inherit
npmDeps
python
;
plugins = lib.recurseIntoAttrs (
lib.packagesFromDirectoryRecursive {
inherit (python.pkgs) callPackage;
directory = ./plugins;
}
);
tests = {
inherit (nixosTests) pretix;
};
};
meta = with lib; {
description = "Ticketing software that cares about your eventall the way";
homepage = "https://github.com/pretix/pretix";
license = with licenses; [
agpl3Only
# 3rd party components below src/pretix/static
bsd2
isc
mit
ofl # fontawesome
unlicense
# all other files below src/pretix/static and src/pretix/locale and aux scripts
asl20
];
maintainers = with maintainers; [ hexa ];
mainProgram = "pretix-manage";
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
django,
gettext,
}:
buildPythonPackage rec {
pname = "pretix-plugin-build";
version = "1.0.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-iLbqcCAbeK4PyLXiebpdE27rt6bOP7eXczIG2bdvvYo=";
};
build-system = [
setuptools
];
dependencies = [
django
gettext
];
doCheck = false; # no tests
meta = with lib; {
description = "";
homepage = "https://github.com/pretix/pretix-plugin-build";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,20 @@
diff --git a/src/pretix/_build_settings.py b/src/pretix/_build_settings.py
index c03f56a1a..d1ea73b84 100644
--- a/src/pretix/_build_settings.py
+++ b/src/pretix/_build_settings.py
@@ -24,6 +24,8 @@
This file contains settings that we need at wheel require time. All settings that we only need at runtime are set
in settings.py.
"""
+from importlib_metadata import entry_points
+
from ._base_settings import * # NOQA
ENTROPY = {
@@ -47,3 +49,6 @@ HAS_MEMCACHED = False
HAS_CELERY = False
HAS_GEOIP = False
SENTRY_ENABLED = False
+
+for entry_point in entry_points(group='pretix.plugin'):
+ INSTALLED_APPS.append(entry_point.module) # noqa: F405

View File

@@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
}:
buildPythonPackage rec {
pname = "pretix-dbvat";
version = "1.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-dbvat";
rev = "v${version}";
hash = "sha256-yAKqB0G2WyGqGogAxv8fI34gO6Wl/50sY/5rvWYH4Ho=";
};
build-system = [
pretix-plugin-build
setuptools
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretix_dbvat"
];
meta = with lib; {
description = "Plugin for using Deutsche Bahn (DB) Event Discount (Veranstaltungsrabatt)";
homepage = "https://github.com/pretix/pretix-dbvat";
license = licenses.asl20;
maintainers = with maintainers; [ e1mo ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
}:
buildPythonPackage rec {
pname = "pretix-mollie";
version = "2.4.1";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-mollie";
tag = "v${version}";
hash = "sha256-YdBDYpxKqb0UOkSU6zEYoLAtlUbkfDHUTIA538ILbjk=";
};
build-system = [
pretix-plugin-build
setuptools
];
pythonImportsCheck = [
"pretix_mollie"
];
meta = {
description = "Mollie payments for pretix";
homepage = "https://github.com/pretix/pretix-mollie";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
}:
buildPythonPackage rec {
pname = "pretix-pages";
version = "1.6.3";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-pages";
rev = "v${version}";
hash = "sha256-ZM38zHlFB5013PvoJwm7YC5/wHg2GZWmrhvreXuqNc8=";
};
build-system = [
pretix-plugin-build
setuptools
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretix_pages"
];
meta = with lib; {
description = "Plugin to add static pages to your pretix event";
homepage = "https://github.com/pretix/pretix-pages";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,33 @@
diff --git a/pretix_passbook/apps.py b/pretix_passbook/apps.py
index e34eee1..a7ad382 100644
--- a/pretix_passbook/apps.py
+++ b/pretix_passbook/apps.py
@@ -22,15 +22,6 @@ class PassbookApp(AppConfig):
def ready(self):
from . import signals # NOQA
- @cached_property
- def compatibility_errors(self):
- import shutil
-
- errs = []
- if not shutil.which("openssl"):
- errs.append("The OpenSSL binary is not installed or not in the PATH.")
- return errs
-
@cached_property
def compatibility_warnings(self):
errs = []
diff --git a/pretix_passbook/forms.py b/pretix_passbook/forms.py
index 2a38604..aec38de 100644
--- a/pretix_passbook/forms.py
+++ b/pretix_passbook/forms.py
@@ -41,7 +41,7 @@ class CertificateFileField(forms.FileField):
return SimpleUploadedFile("cert.pem", content, "text/plain")
openssl_cmd = [
- "openssl",
+ "@openssl@",
"x509",
"-inform",
"DER",

View File

@@ -0,0 +1,59 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
replaceVars,
# build-system
pretix-plugin-build,
setuptools,
# runtime
openssl,
# dependencies
googlemaps,
wallet-py3k,
}:
buildPythonPackage rec {
pname = "pretix-passbook";
version = "1.13.3";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-passbook";
rev = "v${version}";
hash = "sha256-xN37nM2AQVxFg+TOZ3cEvEV4F115U9m6YVX12al4SIw=";
};
patches = [
(replaceVars ./openssl.patch {
openssl = lib.getExe openssl;
})
];
build-system = [
pretix-plugin-build
setuptools
];
dependencies = [
googlemaps
wallet-py3k
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretix_passbook"
];
meta = with lib; {
description = "Support for Apple Wallet/Passbook files in pretix";
homepage = "https://github.com/pretix/pretix-passbook";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
}:
buildPythonPackage {
pname = "pretix-reluctant-stripe";
version = "0-unstable-2023-08-03";
pyproject = true;
src = fetchFromGitHub {
owner = "metarheinmain";
repo = "pretix-reluctant-stripe";
rev = "ae2d770442553e5fc00815ff4521a8fd2c113fd9";
hash = "sha256-bw9aDMxl4/uar5KHjj+wwkYkaGMRxHWY/c1N75bxu0o=";
};
build-system = [
pretix-plugin-build
setuptools
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretix_reluctant_stripe"
];
meta = with lib; {
description = "Nudge users to not use Stripe as a payment provider";
homepage = "https://github.com/metarheinmain/pretix-reluctant-stripe";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
pretix-plugin-build,
setuptools,
# dependencies
django-localflavor,
sepaxml,
# tests
django-scopes,
pretix,
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pretix-sepadebit";
version = "2.7.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-sepadebit";
tag = "v${version}";
hash = "sha256-Xnp7aic+Xf4wJzJbWqhsfMajT4AOQGQMIGIewJ5B37o=";
};
build-system = [
pretix-plugin-build
setuptools
];
dependencies = [
django-localflavor
sepaxml
];
pythonImportsCheck = [
"pretix_sepadebit"
];
nativeCheckInputs = [
django-scopes
pretix
pytest-django
pytestCheckHook
];
preCheck = ''
export DJANGO_SETTINGS_MODULE=pretix.testutils.settings
'';
disabledTests = [
# https://github.com/pretix/pretix-sepadebit/issues/69
"test_mail_context"
"test_call_mail_context"
];
meta = with lib; {
description = "Plugin to receive payments via SEPA direct debit";
homepage = "https://github.com/pretix/pretix-sepadebit";
license = licenses.asl20;
maintainers = with maintainers; [ bbenno ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
pretix-plugin-build,
setuptools,
}:
buildPythonPackage rec {
pname = "pretix-servicefees";
version = "1.15.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-servicefees";
tag = "v${version}";
hash = "sha256-oxuxlwNYJsuYj5zm2VYRMn8wz3vF92SzGxD8w3N7ZIM=";
};
build-system = [
django
pretix-plugin-build
setuptools
];
postBuild = ''
make
'';
doCheck = false; # no tests
pythonImportsCheck = [ "pretix_servicefees" ];
meta = with lib; {
description = "Allows to charge a flat fee on all orders";
homepage = "https://github.com/pretix/pretix-servicefees";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
}:
buildPythonPackage {
pname = "pretix-stretchgoals";
version = "1.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "rixx";
repo = "pretix-stretchgoals";
rev = "177238920a863f71cf03f174e2841f5b630574e9";
hash = "sha256-Sbbxg6viRdALjZwqEmN2Js/qbMShe5xMg00jUccnhsA=";
};
build-system = [
pretix-plugin-build
setuptools
];
doCheck = false; # no tests
pythonImportsCheck = [
"pretix_stretchgoals"
];
meta = with lib; {
description = "Display the average ticket sales price over time";
homepage = "https://github.com/rixx/pretix-stretchgoals";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pretix-plugin-build,
setuptools,
django,
drafthorse,
ghostscript_headless,
}:
buildPythonPackage rec {
pname = "pretix-zugferd";
version = "2.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pretix";
repo = "pretix-zugferd";
rev = "v${version}";
hash = "sha256-Qy/yfinj5EGjzhJmiczOSIP/GsTZabFt8e6Ki4AaN6w=";
};
postPatch = ''
substituteInPlace pretix_zugferd/invoice.py \
--replace-fail 'fallback="gs"' 'fallback="${lib.getExe ghostscript_headless}"'
'';
pythonRelaxDeps = [ "drafthorse" ];
build-system = [
django
pretix-plugin-build
setuptools
];
postBuild = ''
make
'';
dependencies = [ drafthorse ];
doCheck = false; # no tests
pythonImportsCheck = [ "pretix_zugferd" ];
meta = with lib; {
description = "Annotate pretix' invoices with ZUGFeRD data";
homepage = "https://github.com/pretix/pretix-zugferd";
license = licenses.asl20;
maintainers = with maintainers; [ hexa ];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "prettier-d-slim";
version = "1.2.0";
src = fetchFromGitHub {
owner = "mikew";
repo = "prettier_d_slim";
rev = "v${version}";
hash = "sha256-M+qlFKtIro3geVsVaYu6dIfOrJIlUQY98LSBikKNV/I=";
};
npmDepsHash = "sha256-zkyB3PYpfeEw5U70KewxIWd4eImIbTgy+e88264sotc=";
dontNpmBuild = true;
meta = {
description = "Makes prettier fast";
homepage = "https://github.com/mikew/prettier_d_slim";
license = lib.licenses.mit;
mainProgram = "prettier_d_slim";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage {
pname = "prettier-plugin-go-template";
version = "0.0.15-unstable-2023-07-26";
src = fetchFromGitHub {
owner = "NiklasPor";
repo = "prettier-plugin-go-template";
rev = "d91c82e1377b89592ea3365e7e5569688fbc7954";
hash = "sha256-3Tvh+OzqDTtzoaTp5dZpgEQiNA2Y2dbyq4SV9Od499A=";
};
npmDepsHash = "sha256-PpJnVZFRxpUHux2jIBDtyBS4qNo6IJY4kwTAq6stEVQ=";
dontNpmPrune = true;
# Fixes error: Cannot find module 'prettier'
postInstall = ''
pushd "$nodeModulesPath"
find -mindepth 1 -maxdepth 1 -type d -print0 | grep --null-data -Exv "\./(ulid|prettier)" | xargs -0 rm -rfv
popd
'';
meta = {
description = "Fixes prettier formatting for go templates";
mainProgram = "prettier-plugin-go-template";
homepage = "https://github.com/NiklasPor/prettier-plugin-go-template";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jukremer ];
};
}

View File

@@ -0,0 +1,72 @@
{
"@esbuild/aix-ppc64@npm:0.25.5": "098d4c3ebe965823ee43fa708457c768caea59a5fab521e1129fbf1bc47dadf8319d7170e25a91a6af779a3b91cf4ce0b01a053410fe796b2235c262f7008e30",
"@esbuild/android-arm64@npm:0.25.5": "0a3b0db67072835d003519a7b297f2618b8c65cf168be7421656a3eaa7240499e3f89708e5aec507007bf8637f486dd4a2aeb48183702a5a8d0ee29432c22c8d",
"@esbuild/android-arm@npm:0.25.5": "3f85e15beb85467d5ac0bd19774fca6db353f4927a792c2281302e0f29f66931eb4ceac61216e19d9b21a5fc90c556b58bf54b4ed9d3205e81ecba16cff842d9",
"@esbuild/android-x64@npm:0.25.5": "2033f7eb50910b4b9f8064926a8d2baf62597230dc07fd931c8def2022bc8d8e15c3ed7aa892041b6605b24d31e80afeb03e59cf7b0dc2f88a6959b821defd58",
"@esbuild/darwin-arm64@npm:0.25.5": "08d7238c6ea25cbf7de55ab2378b8bf3bf3d36de9bb3ca9fca15c41e5cec6cfcc619b2cbefd0d71722bd780ef5d1bcff5246b1676b62d131673532aa14e6ae5f",
"@esbuild/darwin-x64@npm:0.25.5": "274767e53270755c1d1814eddd25a20e6ebd68cdf8432303d9e73b45a782579a4a898ffd68920f4052c4a5ba6ca85e59ba1a87e0005b94cac98e479e3f623a22",
"@esbuild/freebsd-arm64@npm:0.25.5": "b9ef91ca56536e988a72009c04e95f4ce18a6439151029d736c6df2af97a753f5b55f73d14da76c2c22693592a9468d57435af72bf535b2731b8fdda2aadb930",
"@esbuild/freebsd-x64@npm:0.25.5": "8b6f53b0c0ffc7770ab078d694b705ca0169e08e0a88849fb0a54280e55f7339abc26aee969799ba6ee725b494653fc7188dc184d2f318be78506132b5e8f955",
"@esbuild/linux-arm64@npm:0.25.5": "c0e1925988f0b07aa8c4712f04f3cc858b52d7180ba1600c311206eeef023dbd6f0a00cb2d50fbd81064c15e69502ab95aabb433318638a5af0d9a4bd02f7294",
"@esbuild/linux-arm@npm:0.25.5": "b14daff5e6b0e9d6a613e6f11a6c0c4c1a275effe762383e6b3461c6318ec371f69d8c512bda475d634154ded6e0269345fb58281ca64c406d9dd0acfdfcf042",
"@esbuild/linux-ia32@npm:0.25.5": "f962303d6dd5062bf8cfa31801c43c4ecf2c33cf42e8e4abbcbbea2d54619ba8bd0700a342e94e13deff856e6985e50f31bf97af283b26ff36b185da40a0f7a3",
"@esbuild/linux-loong64@npm:0.25.5": "884863922180e39e9ae05c93f0d5e4e52627416237d892dca80f39bd1ce94c24920868cdeb8a8378b384332343c2b76bd7eba0ab56defaa4fa942bc361941a46",
"@esbuild/linux-mips64el@npm:0.25.5": "90da507ace130201e4653e08187b6ec95d4acb9acf37fbd14f7c0aa60ac299cb9a8a2cc1c8541e376ac14206e10abc52e99bd2c1614dce53f6f66d00165671df",
"@esbuild/linux-ppc64@npm:0.25.5": "1a82c32464c6e446bba510c5cafff685c113cadc3f65966465a54bed455cfc737ea3c11628785cd4ad8b169be03ef3b3c3e46b4ecd3e1a64a501d6ae3aa500d0",
"@esbuild/linux-riscv64@npm:0.25.5": "d9f49b01639ec4ceebf5455151e2632191a2bc0d96ba27ba661f4b97e314c1496a99ed5ea2d3c0bddbcf9da09bf1c06ba8f94bcab283a2f181a1c2c514848631",
"@esbuild/linux-s390x@npm:0.25.5": "14ce910d0ed879bf6549c4892a020e2a652fe5cbf8897a7a967ba20801e89582e70a3567659b96049a789a6b3fa5b34b330f4002de51f87bc734a2c83d8089a8",
"@esbuild/linux-x64@npm:0.25.5": "31edf2a53f0dede747f57405d2d9e277b1ae25e40eef7a7567b8d9c11c0d23c7aa6d4f94493f5295f95dc0f75a77f8cf3a52144501a6db7bf914cff8a5370258",
"@esbuild/netbsd-arm64@npm:0.25.5": "d35b97cf24a5f7e32e880b40a451c7409959acb26c9adaba1c4d5d469853982ce7e5f5e6ff33f32bde78d400c869923d2933d1620779d127e95a693422b4cc07",
"@esbuild/netbsd-x64@npm:0.25.5": "7a8ecc712deda1af96de426998f39934ed5fad0cdb12b13ff31170c9dfe44f679d179c16dca7db2d686044a941a7addb9378a01f15b25efe424453ac61a0031f",
"@esbuild/openbsd-arm64@npm:0.25.5": "9e1ccd8e6cc87b7f8c83b8fb7091b98078ac96e18d58c7a45c22c981e58be1f86d8328d48906a1869226edf1a21e62eba64e43dd2aed9046a57795ed31b8d617",
"@esbuild/openbsd-x64@npm:0.25.5": "a13696c3b5ea9971df702c3c6cf8ddd17490d4becd3c2596a33230e53523c2d8d11d43857973d06292ad6670163e42ca6203dbad5a4f708f250d2d5fc23dc4d0",
"@esbuild/sunos-x64@npm:0.25.5": "87789cae50b1aacd24d3f25b903d8016f370c6bc9c2618c243283921eea00119728e824c052fb41056ab7a5c8295442b32f598343788117499fb4145f52b6795",
"@esbuild/win32-arm64@npm:0.25.5": "4a02984bb78737aec94eac24347be38aa17e504dc7702b3de9cb59179d5df14a812ecab387ce7654e4e23e58ea7989079bdf90e515bbf774a66243387ad55c52",
"@esbuild/win32-ia32@npm:0.25.5": "e214bba446a70d3072c124f45b948af6dba335115c2f17b2bd64f64c1ef875db815cc7f6b5a57e2b9bec0bb76d7b4ebcd3afcb857b9b7e76a7c9d1a80ba0963e",
"@esbuild/win32-x64@npm:0.25.5": "4c6381c6dd3ab7c8aa9fdcda4faf0f08c0982c497348844c764d5b0f7b3d1ccb3fc5bf341057a79ce4fdbb8dcddc115a7b9d5af3ea247b3434d3d451a88c7072",
"@oxc-parser/binding-android-arm64@npm:0.75.0": "ffbf389dd3930f89c8730e6f2a19238fbab409d26d1daf18c023c42a1a0cded25b7f4dc961a7dacbb65c073566657e84902a09c645059bd6c7e278f1e95c6eaa",
"@oxc-parser/binding-darwin-arm64@npm:0.75.0": "14793b0a782e43eac2a1b2452ba813660cc28497f51e848217c21010ade67e1393b91f49d571e6741f26657c7499bf9eb49190077ff082ebead6c789244cee67",
"@oxc-parser/binding-darwin-x64@npm:0.75.0": "6f07df67a1311cb1c48e152afb0720b00efb716e0ca4a156b0a0bf7116b1eeaf2583fd420ca29d5d6fe90f4128c97caae704a9885995b16e5db6ec8b558d166e",
"@oxc-parser/binding-freebsd-x64@npm:0.75.0": "cc6ae75ff1d3d01cb56ced4dc5801a98ed8211a73b08001a4d88ca48e42796ab3e736c638afd7c95081739a0d50c5de1c9b2afe950752abc75c7f0af7152f5ff",
"@oxc-parser/binding-linux-arm-gnueabihf@npm:0.75.0": "84476e3d2792cf589bf1217b22d6108cbd925b30b0910ed1970a221264a2d99da9e53343158f26b310e1f662dc576b128a3035c36c53d9e870379e6a93324085",
"@oxc-parser/binding-linux-arm-musleabihf@npm:0.75.0": "f9b9c0b6170394e7cce5f6f48ad7484871f324ed078f861cfd577910e392e4a4350f912d8591b3678451748f3b1a4d90ff181fd642540d03f745c2f7ad6760dc",
"@oxc-parser/binding-linux-arm64-gnu@npm:0.75.0": "d0f232b73675c496f12f49351a1f4374e450ada0735ba81113fe3d834ad0475aaa7785a6a4636500e4cea2a51c19c15d0f88395e411eaf801ddc42c397cf3df7",
"@oxc-parser/binding-linux-arm64-musl@npm:0.75.0": "f849e9c9e1d6875dc5244ca86391d63ec46c165c6afb3cb1b6ae99254db83c9a4da1167dbdb32f08ae51352ba5d57267b6cdd8c53eff0962e9ca1ddd4285fc94",
"@oxc-parser/binding-linux-riscv64-gnu@npm:0.75.0": "bfd17943ac7292388736621ef19fe1d4eac9e0a52386ee4d6969be3ae34ace8bdf2dc2bce60e3be8f94a91eea1095a9ff02dd88891e985f91bd741e944d59fd6",
"@oxc-parser/binding-linux-s390x-gnu@npm:0.75.0": "002c4e8f27c73fedab9b7a1792b4e5887edef4953e209b444a468698acd32e26789c28b9ec0bf9a2c6d2057e47db5975ba507820b7bbc1219001e92d2dd034dd",
"@oxc-parser/binding-linux-x64-gnu@npm:0.75.0": "430a01fc11a8d8b7a98f8af0ffe9a8f58d3c3b0443657cee8cc65dc951dab36607bf991a878e22783316a25cf734b9d09bd6e8db04d217c7f0415cee2da7a802",
"@oxc-parser/binding-linux-x64-musl@npm:0.75.0": "b6d45f29ccf955440d44b021716b1e7568423bf70a7e604fd4d6cef8838a40e1610fab2aa86fd502bba803c042806b3edde065b214960811b6b4991ca0d80402",
"@oxc-parser/binding-wasm32-wasi@npm:0.75.0": "98498e1911bf7cf75930d388a5b27e3912554637ec28fbff82746b46958e23251ea4537d0b5364a923c9dd62eaeec2fd48e0d9e633ef3fcc636db478e705efc8",
"@oxc-parser/binding-win32-arm64-msvc@npm:0.75.0": "c7cded4af688cbf460ae2104fcda8bc920d94d5f9fe3d9c81e751e815344e0a6caab806c7bd63c4ceb19e9eccbbba66b1d298d3c20b6da3d1b353ef6a213f8ce",
"@oxc-parser/binding-win32-x64-msvc@npm:0.75.0": "c518f673f8a03394d7a58f6015e9c54693ff039dba82deef84ebf46414a4b2a1ff596023d40133866e8de2def50a3bc866b6fcfa5954dcec8a8de47252981f08",
"@oxc-resolver/binding-darwin-arm64@npm:11.2.0": "e372a937dd7023a600c0bf65bda92ab17a7456738bd67425c0586e10391d61cdd46e52d89f8ae64c96bdcb8f6b8d8f6dc2327f88a6bb6a56d75dfaf3239011e8",
"@oxc-resolver/binding-darwin-x64@npm:11.2.0": "811e8bc26c7c49fcf55980bd43eaec43e8741478030eba80cfbf0768706e8dec4b228adc621e82b971356046cb5d64da9caf596baf429439ac6e72ca98ca265f",
"@oxc-resolver/binding-freebsd-x64@npm:11.2.0": "29ecf9af4df5c2289677fb1c7cdba86178d829070065b4e4fdc14bf316ce7d83b8a26cb43bca70bcc759caf53b372727dba40a5b75d2975c18bb00ce1b9e0430",
"@oxc-resolver/binding-linux-arm-gnueabihf@npm:11.2.0": "05a919357edc9334384f75b75f004f1380435d62aeb6f83a98ebbdbf0006a57808a4da5b85580c5658b15643f0c6ad2a7b872f80f321053b58705da803fab201",
"@oxc-resolver/binding-linux-arm64-gnu@npm:11.2.0": "20176fdde6e834ab963b19eb0dc0440c0dbd218e70d42c907ecb53f9444038f534871115549cf18b545d2e51b9c52af549ef49d043ba69e6ce4fdad0e72af768",
"@oxc-resolver/binding-linux-arm64-musl@npm:11.2.0": "518dce0dc638179d1e20d9b7ad90d71cbc89432df660c39d1d1c61a51ec9cdd0de0c046efee8afd80734410320d592433ae9cd0e227d9f2f8821bac5d28bf581",
"@oxc-resolver/binding-linux-riscv64-gnu@npm:11.2.0": "0b1648c4d838fc3269af744d9bea732078c5545f5fd6bcd8141550c244927ca968eda6f59b9ea6ff71960c5312e711c27994f98aabe92ff039644a67140ff1bf",
"@oxc-resolver/binding-linux-s390x-gnu@npm:11.2.0": "39b489ba03d1ed364cab5b4224670e95c984d7775fd9296aa0ed54ec7da20af23c729e8a900f7f28ad81ee7be8ed3b187f4904813ef2fd03a1485ebba4489f46",
"@oxc-resolver/binding-linux-x64-gnu@npm:11.2.0": "330a0bc725b9d090f77a1dea372118a6959d958090358fb12e48ecb9cd498facc2fcc306229f88addea5303f350238d645bf116447b4b6c388aba84a7f2accdb",
"@oxc-resolver/binding-linux-x64-musl@npm:11.2.0": "1e2f22c8f0130f9556f4ea3f6a208d8e8697a9983aab40f2e75c9b18330a952244f5ffb624114dafe6b91eac090b341e6cd83567cf415e24a31d7c927ffdeba5",
"@oxc-resolver/binding-wasm32-wasi@npm:11.2.0": "d94a7788a293b6a77b34e07dd198d451b43478196b55d86727636cd56643ef133113d6c9904fe33c2ea330683f68bf8aeb1e0a360740976036c13578729ebdc6",
"@oxc-resolver/binding-win32-arm64-msvc@npm:11.2.0": "3342de93cda0d7787d496a2434c41bca0e3641fa3ed381bd1a53b02afdb16dd76b4cc4bb062e7b238d5964ba3f8220e771233ce7c4bbd7a79f2c8c61139b4f2c",
"@oxc-resolver/binding-win32-x64-msvc@npm:11.2.0": "4a6929145a189b998f46bc0826d736f11039bcd3fc5bba7a3c06bd81130f24721cf849232d01ca45f017ad01cbe66316c36530bf2b362e1dcc23b70d1a174650",
"@unrs/resolver-binding-darwin-arm64@npm:1.7.11": "d7ba4ca14ae2e1787312b5c1e4ad33a91a0d19578c58176604bebbfd727d9c21bd4cf0d105f48a7e224968bdf3cd53b3b9ec8b6d882b2baf22624ac8ccaf2e2b",
"@unrs/resolver-binding-darwin-x64@npm:1.7.11": "615bd56e1534c33f3636b999c8f74ff8350301c0b2396f4289e5b984ddddf09537d973fe92d5e7e5cd145c2d4384a9663362ebf367f8b7534ab398043b189c2d",
"@unrs/resolver-binding-freebsd-x64@npm:1.7.11": "33981db9d3bc4bb0f7682ef5ba51cb9ad9eb51d8f5c62703f17524000fa9c38f21d1c566474efcf0d8637be8ffad3b510214908387238633da3282b477018502",
"@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.7.11": "0a12a184a31d5ce33d11d5d424a3f3ac68c15594f6cb71e0c8670cfca585e24b1f22b022f9abc0f4a93b844f5232a3b660e4c8cb8df0480a3bef3e3ae994d7fa",
"@unrs/resolver-binding-linux-arm-musleabihf@npm:1.7.11": "c8540d77a0dc7354e6c61d988d242b0013ce923790828671e13bc12db216fc04e72da8a241c815d66194df6a69d959bddf20d4bf72139f33b7c41579078e3d15",
"@unrs/resolver-binding-linux-arm64-gnu@npm:1.7.11": "b0f1126eea72b1932091eb78fdd4a9556973a120b11d29a8501aa4000120d719859e373daf80f83096d301879b0ee8e5209e716a1f0d2a873e880ff9fbe59985",
"@unrs/resolver-binding-linux-arm64-musl@npm:1.7.11": "4d3a716fdb227a30c963c9c2783839783577941885b9bcae214529550e8786d503756a1f32969d0ef5a76fbe9293c865dc4cbc998a19b0aba3c404c1508c246e",
"@unrs/resolver-binding-linux-ppc64-gnu@npm:1.7.11": "2fa07f67eeb0131e13c474a3d9031d7b2aa79388fd033a885b4c188c1c3a6392e3393949a4870b6050d4987e7fc6bc32fd602016878f76b135bcc381b99b87d7",
"@unrs/resolver-binding-linux-riscv64-gnu@npm:1.7.11": "0df9391c8149f14939c227c007f974921b831af2fac907325191f7d59cc3a08c097e569c16564d2053202fc1fdd3e079853729f4428ba05561cc729313789d65",
"@unrs/resolver-binding-linux-riscv64-musl@npm:1.7.11": "10e1aeac0c690651d3c6ad3450da853a2421215a5a39373b67ca3dc50463f9194e5ee89fd2cb1943330e8c40f81ef6fde5b7ab86e6a2b20651b4de0d9fbe40a7",
"@unrs/resolver-binding-linux-s390x-gnu@npm:1.7.11": "c3258f7a68bece5e196d9da37105d416d833484ea59d23849d9acb69f9d12205a8dfac6cd5ba09c185276c923f460bafdb5607abe8aff3cda4213cd9ff11a2ee",
"@unrs/resolver-binding-linux-x64-gnu@npm:1.7.11": "937493b8986b3b39866c6955e6b64cb04365b4940ca1d78d3ebb37365087326c4ffad404e03977d50d190c765670c1e82629a6f842dba30f08845f47c4f8cb71",
"@unrs/resolver-binding-linux-x64-musl@npm:1.7.11": "bec6e6105cefc9e927c66cc378cce466c9e560a96b100dde914c12c1ed2111172363813609ea0075187cc74a6f863591da72dc9f437b768b5b29e3a4b349d72c",
"@unrs/resolver-binding-wasm32-wasi@npm:1.7.11": "e4875afc3026b934da497a7426c5092094a63162a229119f750a2a7133c3fef1b4e79e4d8068aafd14b69475c0f137f3369d38e646a97a578a839c4235a793f6",
"@unrs/resolver-binding-win32-arm64-msvc@npm:1.7.11": "5db590463e19b572d89414da9377cbb027ec8c4ad9987895925ff497ffbad4e2bcad577e0308cb8842d66d8c697ace5d20d22756317d7b055b187eadc00b4236",
"@unrs/resolver-binding-win32-ia32-msvc@npm:1.7.11": "c30223076e76dfd69c1ee4fe3735adca56bbfed874ab9b09baebe6b4e9d33b23a49bc068b31812a3c7aba54f026209c91d4921d9402d8c376045095528d07513",
"@unrs/resolver-binding-win32-x64-msvc@npm:1.7.11": "1ddf771f3aea07a590869ad9bdb59f9c896cfdd489941978e554f54a07c8f175e7d34bdae64b0749580d7c1cb522d66529a5a578ac77c60222c1cd78fa7af68f"
}

View File

@@ -0,0 +1,224 @@
{
"name": "prettier",
"version": "3.6.2",
"description": "Prettier is an opinionated code formatter",
"bin": "./bin/prettier.cjs",
"repository": "prettier/prettier",
"funding": "https://github.com/prettier/prettier?sponsor=1",
"homepage": "https://prettier.io",
"author": "James Long",
"type": "module",
"license": "MIT",
"main": "./src/index.cjs",
"browser": "./standalone.js",
"unpkg": "./standalone.js",
"exports": {
".": {
"types": "./src/index.d.ts",
"require": "./src/index.cjs",
"default": "./src/index.js"
},
"./standalone": "./src/standalone.js",
"./plugins/*": "./src/plugins/*.js",
"./*": "./*"
},
"engines": {
"node": ">=18"
},
"files": [
"index.js",
"standalone.js",
"src",
"bin"
],
"dependencies": {
"@angular/compiler": "20.0.5",
"@babel/code-frame": "7.27.1",
"@babel/parser": "7.27.7",
"@babel/types": "7.27.7",
"@glimmer/syntax": "0.94.9",
"@prettier/cli": "0.9.0",
"@prettier/html-tags": "1.0.0",
"@prettier/parse-srcset": "3.1.0",
"@typescript-eslint/typescript-estree": "8.34.1",
"@typescript-eslint/visitor-keys": "8.34.1",
"acorn": "8.15.0",
"acorn-jsx": "5.3.2",
"angular-estree-parser": "12.1.0",
"angular-html-parser": "8.1.0",
"camelcase": "8.0.0",
"ci-info": "4.2.0",
"cjk-regex": "3.3.0",
"collapse-white-space": "1.0.6",
"css-units-list": "2.1.0",
"dashify": "2.0.0",
"deno-path-from-file-url": "0.0.3",
"diff": "8.0.2",
"editorconfig": "0.15.3",
"emoji-regex": "10.4.0",
"escape-string-regexp": "5.0.0",
"espree": "10.4.0",
"fast-glob": "3.3.3",
"fast-json-stable-stringify": "2.1.0",
"file-entry-cache": "10.1.1",
"find-cache-directory": "6.0.0",
"flow-parser": "0.274.1",
"get-east-asian-width": "1.3.0",
"get-stdin": "9.0.0",
"graphql": "16.11.0",
"hermes-parser": "0.29.0",
"html-element-attributes": "3.4.0",
"html-ua-styles": "0.0.8",
"ignore": "7.0.5",
"import-meta-resolve": "4.1.0",
"index-to-position": "1.1.0",
"is-es5-identifier-name": "1.0.0",
"jest-docblock": "30.0.1",
"json5": "2.2.3",
"leven": "4.0.0",
"linguist-languages": "8.0.0",
"meriyah": "6.1.3",
"micromatch": "4.0.8",
"minimist": "1.2.8",
"n-readlines": "1.0.1",
"outdent": "0.8.0",
"oxc-parser": "0.75.0",
"parse-json": "8.3.0",
"picocolors": "1.1.1",
"please-upgrade-node": "3.2.0",
"postcss": "8.5.6",
"postcss-less": "6.0.0",
"postcss-media-query-parser": "0.2.3",
"postcss-scss": "4.0.9",
"postcss-selector-parser": "2.2.3",
"postcss-values-parser": "2.0.1",
"regexp-util": "2.0.3",
"remark-footnotes": "2.0.0",
"remark-math": "3.0.1",
"remark-parse": "8.0.3",
"sdbm": "2.0.0",
"search-closest": "1.1.0",
"smol-toml": "1.3.4",
"strip-ansi": "7.1.0",
"to-fast-properties": "4.0.0",
"trim-newlines": "5.0.0",
"typescript": "5.8.3",
"unicode-regex": "4.1.2",
"unified": "9.2.2",
"url-or-path": "2.6.1",
"vnopts": "2.0.2",
"wcwidth.js": "2.0.0",
"yaml": "1.10.2",
"yaml-unist-parser": "2.0.5"
},
"devDependencies": {
"@babel/generator": "7.27.5",
"@eslint-react/eslint-plugin": "1.52.2",
"@eslint/js": "9.29.0",
"@stylistic/eslint-plugin": "5.0.0",
"@types/estree": "1.0.8",
"@typescript-eslint/eslint-plugin": "8.34.1",
"@typescript-eslint/parser": "8.34.1",
"browserslist": "4.25.1",
"browserslist-to-esbuild": "2.1.1",
"buffer": "6.0.3",
"c8": "10.1.3",
"cross-env": "7.0.3",
"cspell": "9.1.1",
"enquirer": "2.4.1",
"esbuild": "0.25.5",
"esbuild-plugins-node-modules-polyfill": "1.7.1",
"esbuild-visualizer": "0.7.0",
"eslint": "9.29.0",
"eslint-config-prettier": "10.1.5",
"eslint-formatter-friendly": "7.0.0",
"eslint-plugin-compat": "6.0.2",
"eslint-plugin-jest": "29.0.1",
"eslint-plugin-n": "17.20.0",
"eslint-plugin-regexp": "2.9.0",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-unicorn": "59.0.1",
"esm-utils": "4.4.2",
"globals": "16.2.0",
"jest": "30.0.3",
"jest-light-runner": "0.7.9",
"jest-snapshot-serializer-ansi": "2.2.1",
"jest-snapshot-serializer-raw": "2.0.0",
"jest-watch-typeahead": "3.0.1",
"knip": "5.61.2",
"magic-string": "0.30.17",
"nano-spawn": "1.0.2",
"node-style-text": "0.0.8",
"npm-run-all2": "8.0.4",
"prettier": "3.6.1",
"pretty-bytes": "7.0.0",
"pretty-ms": "9.2.0",
"rollup-plugin-license": "3.6.0",
"semver": "7.7.2",
"serialize-javascript": "6.0.2",
"snapshot-diff": "0.10.0",
"tempy": "3.1.0",
"tinybench": "4.0.1",
"ts-expect": "1.3.0"
},
"resolutions": {
"trim": "1.0.1"
},
"scripts": {
"prepublishOnly": "echo \"Error: must publish from dist/\" && exit 1",
"test": "jest",
"test:dev-package": "cross-env INSTALL_PACKAGE=1 yarn test",
"test:production": "cross-env NODE_ENV=production yarn test",
"test:production-standalone": "cross-env TEST_STANDALONE=1 yarn test:production",
"test:production-lint": "eslint dist/prettier --config=./scripts/bundle-eslint-config.js --quiet --format friendly",
"perf": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/prettier/bin/prettier.cjs",
"perf:inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/prettier/bin/prettier.cjs",
"perf:benchmark": "yarn perf --debug-benchmark",
"perf:compare": "./scripts/benchmark/compare.sh",
"lint": "run-p --continue-on-error \"lint:*\"",
"lint:typecheck": "tsc",
"lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
"lint:changelog": "node ./scripts/lint-changelog.js",
"lint:prettier": "prettier . --check --cache",
"lint:spellcheck": "cspell --no-progress --relative --dot --gitignore",
"lint:deps": "node ./scripts/check-deps.js",
"lint:knip": "knip",
"lint:format-test": "node ./scripts/format-test-lint.js",
"fix": "run-s --continue-on-error fix:eslint fix:prettier",
"fix:eslint": "yarn lint:eslint --fix",
"fix:prettier": "yarn lint:prettier --write",
"build": "node ./scripts/build/build.js",
"build:website": "node ./scripts/build-website.js",
"gen:changelog": "node ./scripts/generate-changelog.js",
"debug": "node bin/prettier.js --ignore-path=.prettierignore --plugin=./packages/plugin-oxc/index.js --plugin=./packages/plugin-hermes/index.js",
"debug:watch": "node --watch bin/prettier.js --ignore-path=.prettierignore --plugin=./packages/plugin-oxc/index.js --plugin=./packages/plugin-hermes/index.js",
"debug:inspect": "node --inspect-brk bin/prettier.js --ignore-path=.prettierignore --plugin=./packages/plugin-oxc/index.js --plugin=./packages/plugin-hermes/index.js"
},
"c8": {
"reporter": [
"lcov",
"text"
],
"all": true,
"include": [
"src/**",
"bin/**"
],
"exclude": [
"bin/prettier.js",
"src/standalone.js",
"src/index.cjs",
"src/document/debug.js",
"src/utils/unexpected-node-error.js",
"src/language-js/types/estree.d.ts",
"src/**/**/*.d.ts"
]
},
"browserslist": [
">0.5%",
"not dead",
"not op_mini all"
],
"preferUnplugged": true,
"packageManager": "yarn@4.9.2"
}

View File

@@ -0,0 +1,187 @@
/**
# Example
Prettier with plugins and Vim Home Manager configuration
```nix
pkgs.prettier.override {
plugins = with pkgs.nodePackages; [
prettier-plugin-toml
# ...
];
}
```
*/
{
fetchFromGitHub,
lib,
makeBinaryWrapper,
nodejs,
stdenv,
versionCheckHook,
yarn-berry,
plugins ? [ ],
}:
let
/**
# Example
```nix
exportRelativePathOf (builtins.fromJSON "./package.json")
=>
lib/node_modules/prettier-plugin-toml/./lib/index.cjs
```
# Type
```
exportRelativePathOf :: AttrSet => String
```
# Arguments
packageJsonAttrs
: Attribute set with shape similar to `package.json` file
*/
## Blame NodeJS
exportRelativePathOf =
let
nodeExportAttrAddresses = [
[ "main" ]
[
"exports"
"."
"default"
]
[
"exports"
"."
]
[
"exports"
"default"
]
[ "exports" ]
];
recAttrByPath =
addresses: default: attrs:
if builtins.length addresses == 0 then
default
else
let
addressNext = builtins.head addresses;
addressesRemaning = lib.lists.drop 1 addresses;
in
lib.attrByPath addressNext (recAttrByPath addressesRemaning default attrs) attrs;
in
packageJsonAttrs:
recAttrByPath nodeExportAttrAddresses (builtins.head (
lib.attrByPath [ "prettier" "plugins" ] [ "null" ] packageJsonAttrs
)) packageJsonAttrs;
/**
# Example
```nix
nodeEntryPointOf pkgs.nodePackages.prettier-plugin-toml
=>
/nix/store/<NAR_HASH>-prettier-plugin-toml-<VERSION>/lib/node_modules/prettier-plugin-toml/./lib/index.cjs
```
# Type
```
nodeEntryPointOf :: AttrSet => String
```
# Arguments
plugin
: Attribute set with `.packageName` and `.outPath` defined
*/
nodeEntryPointOf =
plugin:
let
pluginDir = "${plugin.outPath}/lib/node_modules/${plugin.packageName}";
packageJsonAttrs = builtins.fromJSON (builtins.readFile "${pluginDir}/package.json");
exportPath = exportRelativePathOf packageJsonAttrs;
pathAbsoluteNaive = "${pluginDir}/${exportPath}";
pathAbsoluteFallback = "${pluginDir}/${exportPath}.js";
in
if builtins.pathExists pathAbsoluteNaive then
pathAbsoluteNaive
else if builtins.pathExists pathAbsoluteFallback then
pathAbsoluteFallback
else
lib.warn ''
${plugin.packageName}: error context, tried finding entry point under;
pathAbsoluteNaive -> ${pathAbsoluteNaive}
pathAbsoluteFallback -> ${pathAbsoluteFallback}
'' throw ''${plugin.packageName}: does not provide parse-able entry point'';
in
stdenv.mkDerivation (finalAttrs: {
pname = "prettier";
version = "3.6.2";
src = fetchFromGitHub {
owner = "prettier";
repo = "prettier";
tag = finalAttrs.version;
hash = "sha256-uMLRFBZP7/42R6nReONcb9/kVGCn3yGHLcLFajMZLmQ=";
};
missingHashes = ./missing-hashes.json;
offlineCache = yarn-berry.fetchYarnBerryDeps {
inherit (finalAttrs) src missingHashes;
hash = "sha256-dpxzbtWyXsHS6tH6DJ9OqSsUSc+YqYeAPJYb95Qy5wQ=";
};
nativeBuildInputs = [
makeBinaryWrapper
yarn-berry
yarn-berry.yarnBerryConfigHook
];
installPhase = ''
runHook preInstall
yarn install --immutable
yarn build --clean
cp --recursive dist/prettier "$out"
makeBinaryWrapper "${lib.getExe nodejs}" "$out/bin/prettier" \
--add-flags "$out/bin/prettier.cjs"
''
+ lib.optionalString (builtins.length plugins > 0) ''
wrapProgram $out/bin/prettier --add-flags "${
builtins.concatStringsSep " " (lib.map (plugin: "--plugin=${nodeEntryPointOf plugin}") plugins)
}";
''
+ ''
runHook postInstall
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
passthru.updateScript = ./update.sh;
meta = {
changelog = "https://github.com/prettier/prettier/blob/${finalAttrs.version}/CHANGELOG.md";
description = "Code formatter";
homepage = "https://prettier.io/";
license = lib.licenses.mit;
mainProgram = "prettier";
maintainers = with lib.maintainers; [
l0b0
S0AndS0
];
};
})

View File

@@ -0,0 +1,47 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts coreutils jq yarn-berry.yarn-berry-fetcher
set -o errexit -o nounset -o pipefail
set -o xtrace # debugging
# Configuration
owner='prettier'
repo='prettier'
package='prettier'
cleanup() {
rm --force --recursive "${tmpdir}"
}
trap cleanup EXIT
tmpdir="$(mktemp --directory)"
disable_cleanup() {
# We want to keep the temporary directory in case of error
trap - EXIT
}
trap disable_cleanup ERR
curl_command=(curl --fail ${GITHUB_TOKEN:+--user ":${GITHUB_TOKEN}"})
jq_command=(jq --raw-output)
current_version=$(nix-instantiate --eval --expr "with import ./. {}; ${package}.version or (lib.getVersion ${package})" --raw)
echo "Current version: ${current_version}"
latest_version="$("${curl_command[@]}" "https://api.github.com/repos/${owner}/${repo}/releases/latest" | "${jq_command[@]}" .tag_name)"
echo "Latest version: ${latest_version}"
if [[ "${current_version}" == "${latest_version}" ]]; then
echo "${package} is up to date: ${current_version}"
exit 0
else
echo "Updating ${package} from ${current_version} to ${latest_version}"
fi
package_dir="pkgs/by-name/${package::2}/${package}"
"${curl_command[@]}" --output "${package_dir}/package.json" "https://raw.githubusercontent.com/${owner}/${repo}/${latest_version}/package.json"
update-source-version "${package}" "${latest_version}"
echo "Update yarn offline cache hash…"
nix-build --attr "${package}.src"
yarn-berry-fetcher missing-hashes result/yarn.lock >"${package_dir}/missing-hashes.json"

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
nix-update-script,
runCommand,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "prettierd";
version = "0.26.2";
src = fetchFromGitHub {
owner = "fsouza";
repo = "prettierd";
tag = "v${finalAttrs.version}";
hash = "sha256-KvFOvWQZBppvHbvUvGQu39j8aV/pQFwfuqjFQqdb7lI=";
};
offlineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-Rf7km2WUODqWu8U8iiHNrb5dMamIm1XCsRnldO71j5A=";
};
strictDeps = true;
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
nodejs
];
# launch the daemon with the same node version used to run the CLI
# fixes "Error: spawn node ENOENT" if node isn't available on the user's path
postInstall = ''
wrapProgram $out/bin/prettierd \
--prefix PATH : ${lib.makeBinPath [ nodejs ]}
'';
passthru = {
updateScript = nix-update-script { };
tests = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) {
format =
runCommand "prettierd-format-file-test" { nativeBuildInputs = [ finalAttrs.finalPackage ]; }
''
export HOME=$(mktemp -d)
prettierd ${finalAttrs.src}/package.json < ${finalAttrs.src}/package.json > $out
'';
};
};
meta = {
mainProgram = "prettierd";
description = "Prettier, as a daemon, for improved formatting speed";
homepage = "https://github.com/fsouza/prettierd";
license = lib.licenses.isc;
changelog = "https://github.com/fsouza/prettierd/blob/${finalAttrs.src.rev}/CHANGELOG.md";
platforms = with lib.platforms; linux ++ darwin;
maintainers = with lib.maintainers; [
NotAShelf
n3oney
];
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
php,
fetchFromGitHub,
testers,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "pretty-php";
version = "0.4.94";
src = fetchFromGitHub {
owner = "lkrms";
repo = "pretty-php";
tag = "v${finalAttrs.version}";
hash = "sha256-zBhxuEViLxeQ9m3u1L0wYqeL+YEWWwvJS7PtsFPO5QU=";
};
vendorHash = "sha256-vnmp/HLzaOzHu22lzugRXIHL43YQ/hm223gcUbIiLT4=";
passthru = {
tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "HOME=$TMPDIR pretty-php --version";
};
};
meta = {
description = "Opinionated PHP code formatter";
homepage = "https://github.com/lkrms/pretty-php";
license = lib.licenses.mit;
mainProgram = "pretty-php";
maintainers = with lib.maintainers; [ piotrkwiecinski ];
};
})

View File

@@ -0,0 +1,17 @@
{
haskell,
haskellPackages,
lib,
}:
haskell.lib.compose.justStaticExecutables (
haskell.lib.compose.overrideCabal (oldAttrs: {
maintainers = (oldAttrs.maintainers or [ ]) ++ [
lib.maintainers.cdepillabout
];
configureFlags = (oldAttrs.configureFlags or [ ]) ++ [ "-fbuildexe" ];
buildDepends = (oldAttrs.buildDepends or [ ]) ++ [ haskellPackages.optparse-applicative ];
}) haskellPackages.pretty-simple
)

View File

@@ -0,0 +1,29 @@
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "prettyping";
version = "1.1.0";
src = fetchFromGitHub {
owner = "denilsonsa";
repo = "prettyping";
rev = "v${version}";
sha256 = "sha256-GhsoWnhX9xBnupmmHuKW9DA2KFgIzVbSO0CyR2FpJ74=";
};
installPhase = ''
install -Dt $out/bin prettyping
'';
meta = with lib; {
homepage = "https://github.com/denilsonsa/prettyping";
description = "Wrapper around the standard ping tool with the objective of making the output prettier, more colorful, more compact, and easier to read";
mainProgram = "prettyping";
license = with licenses; [ mit ];
platforms = platforms.unix;
maintainers = with maintainers; [ qoelet ];
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "prettypst";
version = "2.0.0";
src = fetchFromGitHub {
owner = "antonWetzel";
repo = "prettypst";
rev = "2.0.0";
hash = "sha256-fGm3HDMJ12HlVOjLtaS2hcAzVl/jl4nqMYly0aBVRxw=";
};
cargoHash = "sha256-zfx6SDtvn5waKWZB1gVxcvCzP+Rp7+J+txaRHoRfaBM=";
meta = {
changelog = "https://github.com/antonWetzel/prettypst/blob/${src.rev}/changelog.md";
description = "Formatter for Typst";
homepage = "https://github.com/antonWetzel/prettypst";
license = lib.licenses.mit;
mainProgram = "prettypst";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,104 @@
{
lib,
cmake,
exiv2,
extra-cmake-modules,
fetchFromGitLab,
imagemagick,
libarchive,
libraw,
mpv,
pkg-config,
qt6Packages,
resvg,
stdenv,
vips,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "previewqt";
version = "4.0";
src = fetchFromGitLab {
owner = "lspies";
repo = "previewqt";
tag = "v${finalAttrs.version}";
hash = "sha256-wzMo5igLTVxUo3E8X2mRbOTuhW3CS4fISgVntgPbZlY=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
qt6Packages.wrapQtAppsHook
];
buildInputs = [
exiv2
imagemagick
libarchive
libraw
mpv
resvg
vips
]
++ [
qt6Packages.poppler
qt6Packages.qtmultimedia
qt6Packages.qtquick3d
qt6Packages.qtsvg
qt6Packages.qttools
qt6Packages.qtwebengine
];
strictDeps = true;
cmakeFlags = [
(lib.cmakeBool "WITH_FREEIMAGE" false)
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/previewqt.app $out/Applications
makeWrapper $out/{Applications/previewqt.app/Contents/MacOS,bin}/previewqt
'';
meta = {
homepage = "https://previewqt.org/";
description = "Qt-based file previewer";
longDescription = ''
PhotoQt is an image viewer that provides a simple and uncluttered
interface. Yet, hidden beneath the surface awaits a large array of
features. Here are some of its main features (not an exhaustive
list). Suggestions for new features are always welcome.
- Support of ImageMagick/GraphicsMagick, Libraw, FreeImage, DevIL,
libvips, Poppler, libarchive, and video files.
- Touchscreen support
- Support for Motion Photos and Apple Live Photos
- Support for (partial) photo spheres and 360 degree panoramas using
equirectangular projection
- Explore images on an interactive map according to their embedded GPS
location
- Chromecast support
- Basic image manipulations
- Convert images between formats
- Keyboard and mouse shortcuts
- Upload images directly to imgur.com
- Set image as wallpaper directly from inside PhotoQt
- Slideshow feature
- Display Exif information (including tagging of faces)
- Detect and display bar codes and QR codes in images
- Thumbnail Cache
- System Tray Usage
- Command Line Options
- Several translations available (help wanted)
- and much more...
'';
changelog = "https://gitlab.com/lspies/previewqt/-/blob/v${finalAttrs.version}/CHANGELOG";
license = lib.licenses.gpl2Plus;
mainProgram = "previewqt";
maintainers = with lib.maintainers; [ wegank ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitHub,
prevo-tools,
}:
stdenv.mkDerivation {
pname = "prevo-data";
version = "2020-03-08";
src = fetchFromGitHub {
owner = "bpeel";
repo = "revo";
rev = "1e8d7197c0bc831e2127909e77e64dfc26906bdd";
hash = "sha256-308IDx/9LXauvtyjiC9GlHWOj9VMnYy21ouVNuL9sNE=";
};
nativeBuildInputs = [ prevo-tools ];
dontUnpack = true;
buildPhase = ''
prevodb -s -i $src -o prevo.db
'';
installPhase = ''
mkdir -p $out/share/prevo
cp prevo.db $out/share/prevo/
'';
meta = {
description = "Data for offline version of the Esperanto dictionary Reta Vortaro";
longDescription = ''
PReVo is the "portable" ReVo, i.e., the offline version
of the Esperanto dictionary Reta Vortaro.
This package provides the ReVo database for the prevo command line application.
'';
homepage = "https://github.com/bpeel/revo";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
das-g
];
};
}

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
pkg-config,
glib,
expat,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "prevo-tools";
version = "0.2";
src = fetchFromGitHub {
owner = "bpeel";
repo = "prevodb";
rev = version;
hash = "sha256-TfgsZidwXewwqGkb31Qv0SrX8wQdPaK7JQA3nB5h2bs=";
};
patches = [
# Fix building with glib-2.82
# https://github.com/bpeel/prevodb/issues/8
(fetchpatch {
url = "https://github.com/bpeel/prevodb/commit/38474b47d0ab8ef5451997b87493f0677b8b8358.patch";
hash = "sha256-mGHwnN4TT3jiandaN+6uNttKMg0OjV9yKLSuVn3F0CA=";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
installShellFiles
];
buildInputs = [
glib
expat
];
postInstall = ''
installShellCompletion --bash src/prevo-completion
'';
meta = {
description = "CLI tools for the offline version of the Esperanto dictionary Reta Vortaro";
longDescription = ''
PReVo is the "portable" ReVo, i.e., the offline version
of the Esperanto dictionary Reta Vortaro.
This package provides the command line application prevo to query a local
ReVo database, as well as the command line tool revodb to create such a
database for this application or for the Android app of the same name.
'';
homepage = "https://github.com/bpeel/prevodb";
license = lib.licenses.gpl2Only;
mainProgram = "prevo";
maintainers = with lib.maintainers; [
das-g
];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
symlinkJoin,
man,
prevo-tools,
prevo-data,
makeWrapper,
}:
symlinkJoin rec {
name = "prevo-${version}";
inherit (prevo-tools) version;
paths = [ prevo-tools ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/prevo \
--prefix PATH ":" "${lib.makeBinPath [ man ]}" \
--suffix XDG_DATA_DIRS : "${prevo-data}/share" \
'';
meta = {
description = "Offline version of the Esperanto dictionary Reta Vortaro";
longDescription = ''
PReVo is the "portable" ReVo, i.e., the offline version
of the Esperanto dictionary Reta Vortaro.
'';
homepage = "https://github.com/bpeel/prevodb";
license = lib.licenses.gpl2Only;
mainProgram = "prevo";
maintainers = with lib.maintainers; [
das-g
];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
python3Packages,
fetchFromGitLab,
}:
python3Packages.buildPythonApplication rec {
pname = "pricehist";
version = "1.4.7";
format = "pyproject";
src = fetchFromGitLab {
owner = "chrisberkhout";
repo = "pricehist";
tag = version;
hash = "sha256-SBRJxNnA+nOxO6h97WZZHwhxoXeNtb5+rDayn4Hw6so=";
};
dependencies = with python3Packages; [
requests
lxml
cssselect
curlify
];
build-system = with python3Packages; [
poetry-core
];
nativeCheckInputs = with python3Packages; [
responses
pytest-mock
pytestCheckHook
];
meta = {
description = "Command-line tool for fetching and formatting historical price data, with support for multiple data sources and output formats";
homepage = "https://gitlab.com/chrisberkhout/pricehist";
license = lib.licenses.mit;
mainProgram = "pricehist";
};
}

View File

@@ -0,0 +1,20 @@
diff --git a/Makefile b/Makefile
index 815c27e..1556807 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
CXX ?= clang
+out ?= /usr/local
all: pridecat
@@ -6,7 +7,8 @@ pridecat: main.cpp
$(CXX) main.cpp -o pridecat -std=c++11 -lstdc++ -Wall -Wextra -O3
install: pridecat
- cp pridecat /usr/local/bin/pridecat
+ mkdir -p ${out}/bin
+ cp pridecat ${out}/bin/pridecat
uninstall:
rm -f /usr/local/bin/pridecat

View File

@@ -0,0 +1,28 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "pridecat";
version = "0-unstable-2020-06-19";
src = fetchFromGitHub {
owner = "lunasorcery";
repo = "pridecat";
rev = "92396b11459e7a4b5e8ff511e99d18d7a1589c96";
sha256 = "sha256-PyGLbbsh9lFXhzB1Xn8VQ9zilivycGFEIc7i8KXOxj8=";
};
# fixes the install path in the Makefile
patches = [ ./fix_install.patch ];
meta = with lib; {
description = "Like cat, but more colorful";
homepage = "https://github.com/lunasorcery/pridecat";
license = licenses.cc-by-nc-sa-40;
maintainers = with maintainers; [ lunarequest ];
mainProgram = "pridecat";
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
fetchFromGitHub,
python3,
stdenv,
strip-nondeterminism,
zip,
}:
let
version = "1.1.0";
sha256 = "sha256-563xOz63vto19yuaHtReV1dSw6BgNf+CLtS3lrPnaoc=";
pname = "pridefetch";
src = fetchFromGitHub {
owner = "SpyHoodle";
repo = "pridefetch";
rev = "v" + version;
inherit sha256;
};
in
stdenv.mkDerivation {
inherit pname version src;
nativeBuildInputs = [
strip-nondeterminism
zip
];
buildInputs = [
(python3.withPackages (
pythonPackages: with pythonPackages; [
distro
]
))
];
buildPhase = ''
runHook preBuild
pushd src
zip -r ../pridefetch.zip ./*
strip-nondeterminism ../pridefetch.zip
popd
echo '#!/usr/bin/env python' | cat - pridefetch.zip > pridefetch
rm pridefetch.zip
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mv pridefetch $out/bin/pridefetch
chmod +x $out/bin/pridefetch
runHook postInstall
'';
meta = with lib; {
description = "Print out system statistics with pride flags";
longDescription = ''
Pridefetch prints your system statistics (similarly to neofetch, screenfetch or pfetch) along with a pride flag.
The flag which is printed is configurable, as well as the width of the output.
'';
homepage = "https://github.com/SpyHoodle/pridefetch";
license = licenses.mit;
maintainers = [
maintainers.minion3665
];
platforms = platforms.all;
mainProgram = "pridefetch";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
curl,
zeromq,
czmq,
libsodium,
}:
stdenv.mkDerivation rec {
pname = "prime-server";
version = "0.7.0";
src = fetchFromGitHub {
owner = "kevinkreiser";
repo = "prime_server";
tag = version;
sha256 = "0izmmvi3pvidhlrgfpg4ccblrw6fil3ddxg5cfxsz4qbh399x83w";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
curl
zeromq
czmq
libsodium
];
# https://github.com/kevinkreiser/prime_server/issues/95
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=unused-variable" ];
meta = with lib; {
description = "Non-blocking (web)server API for distributed computing and SOA based on zeromq";
homepage = "https://github.com/kevinkreiser/prime_server";
license = licenses.bsd2;
maintainers = [ maintainers.Thra11 ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
cmake,
fetchFromGitHub,
gitUpdater,
primesieve,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "primecount";
version = "7.19";
src = fetchFromGitHub {
owner = "kimwalisch";
repo = "primecount";
rev = "v${finalAttrs.version}";
hash = "sha256-prPNAmMSiZD1EbMyPSD6OmjFn/NQ7ULVxBM1AjCYWPo=";
};
outputs = [
"out"
"dev"
"lib"
"man"
];
nativeBuildInputs = [ cmake ];
buildInputs = [ primesieve ];
strictDeps = true;
cmakeFlags = [
(lib.cmakeBool "BUILD_LIBPRIMESIEVE" true)
(lib.cmakeBool "BUILD_PRIMECOUNT" true)
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "BUILD_STATIC_LIBS" stdenv.hostPlatform.isStatic)
(lib.cmakeBool "BUILD_TESTS" true)
];
passthru = {
tests = {
inherit primesieve; # dependency
};
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {
homepage = "https://github.com/kimwalisch/primecount";
description = "Fast prime counting function implementations";
longDescription = ''
primecount is a command-line program and C/C++ library that counts the
primes below an integer x 10^31 using highly optimized implementations
of the combinatorial prime counting algorithms.
primecount includes implementations of all important combinatorial prime
counting algorithms known up to this date all of which have been
parallelized using OpenMP. primecount contains the first ever open source
implementations of the Deleglise-Rivat algorithm and Xavier Gourdon's
algorithm (that works). primecount also features a novel load balancer
that is shared amongst all implementations and that scales up to hundreds
of CPU cores. primecount has already been used to compute several prime
counting function world records.
'';
changelog = "https://github.com/kimwalisch/primecount/blob/${finalAttrs.src.rev}/ChangeLog";
license = lib.licenses.bsd2;
mainProgram = "primecount";
inherit (primesieve.meta) teams platforms;
};
})

View File

@@ -0,0 +1,56 @@
{
lib,
cmake,
fetchFromGitHub,
gitUpdater,
stdenv,
primecount,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "primesieve";
version = "12.9";
src = fetchFromGitHub {
owner = "kimwalisch";
repo = "primesieve";
rev = "v${finalAttrs.version}";
hash = "sha256-xEGpMQ6kxby3nq3RBv6s6ZrTwC9KRKr3II1VQHGaAXk=";
};
outputs = [
"out"
"dev"
"lib"
"man"
];
nativeBuildInputs = [ cmake ];
strictDeps = true;
passthru = {
tests = {
inherit primecount; # dependent
};
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {
homepage = "https://primesieve.org/";
description = "Fast C/C++ prime number generator";
longDescription = ''
primesieve is a command-line program and C/C++ library for quickly
generating prime numbers. It is very cache efficient, it detects your
CPU's L1 & L2 cache sizes and allocates its main data structures
accordingly. It is also multi-threaded by default, it uses all available
CPU cores whenever possible i.e. if sequential ordering is not
required. primesieve can generate primes and prime k-tuplets up to 264.
'';
changelog = "https://github.com/kimwalisch/primesieve/blob/${finalAttrs.src.rev}/ChangeLog";
license = lib.licenses.bsd2;
mainProgram = "primesieve";
teams = [ lib.teams.sage ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule {
pname = "primitive";
version = "0-unstable-2020-05-04";
src = fetchFromGitHub {
owner = "fogleman";
repo = "primitive";
rev = "0373c216458be1c4b40655b796a3aefedf8b7d23";
hash = "sha256-stKb3tPP/pgHTfdyTmWwVj/hLjOHtFpvJxXgBhhWgPQ=";
};
vendorHash = "sha256-I3rhP87QJJxNM9D7JYo3BjG/1PhsDWbnK/NJTf4aqmI=";
patches = [
(fetchpatch {
name = "add-modules.patch";
url = "https://github.com/regularpoe/primitive/commit/2fa9b9f575ac2602e771c5263747bdbb48e9810b.patch";
hash = "sha256-TX3dGqVuY+qLh9EBg7oNVYWhGuETZHJdjPTroCDyZ74=";
})
];
meta = {
description = "Reproducing images with geometric primitives";
homepage = "https://github.com/fogleman/primitive";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ stunkymonkey ];
mainProgram = "primitive";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,46 @@
# For a 64bit + 32bit system the LD_LIBRARY_PATH must contain both the 32bit and 64bit primus
# libraries. Providing a different primusrun for each architecture will not work as expected. EG:
# Using steam under wine can involve both 32bit and 64bit process. All of which inherit the
# same LD_LIBRARY_PATH.
# Other distributions do the same.
{
stdenv,
pkgsi686Linux,
lib,
primusLib,
writeScriptBin,
runtimeShell,
primusLib_i686 ?
if stdenv.hostPlatform.system == "x86_64-linux" then pkgsi686Linux.primusLib else null,
useNvidia ? true,
}:
let
# We override stdenv in case we need different ABI for libGL
primusLib_ = primusLib.override { inherit stdenv; };
primusLib_i686_ = primusLib_i686.override { stdenv = pkgsi686Linux.stdenv; };
primus = if useNvidia then primusLib_ else primusLib_.override { nvidia_x11 = null; };
primus_i686 =
if useNvidia then primusLib_i686_ else primusLib_i686_.override { nvidia_x11 = null; };
ldPath = lib.makeLibraryPath (
lib.filter (x: x != null) (
[
primus
primus.glvnd
]
++ lib.optionals (primusLib_i686 != null) [
primus_i686
primus_i686.glvnd
]
)
);
in
writeScriptBin "primusrun" ''
#!${runtimeShell}
export LD_LIBRARY_PATH=${ldPath}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
# https://bugs.launchpad.net/ubuntu/+source/bumblebee/+bug/1758243
export __GLVND_DISALLOW_PATCHING=1
exec "$@"
''

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
libX11,
libGL,
linuxPackages,
nvidia_x11 ? linuxPackages.nvidia_x11.override { libsOnly = true; },
libglvnd,
}:
let
aPackage =
if nvidia_x11 == null then
libGL
else if nvidia_x11.useGLVND then
libglvnd
else
nvidia_x11;
in
stdenv.mkDerivation {
pname = "primus-lib";
version = "unstable-2015-04-28";
src = fetchFromGitHub {
owner = "amonakov";
repo = "primus";
rev = "d1afbf6fce2778c0751eddf19db9882e04f18bfd";
sha256 = "118jm57ccawskb8vjq3a9dpa2gh72nxzvx2zk7zknpy0arrdznj1";
};
patches = [
# Bump buffer size for long library paths.
(fetchpatch {
url = "https://github.com/abbradar/primus/commit/2f429e232581c556df4f4bf210aee8a0c99c60b7.patch";
sha256 = "1da6ynz7r7x98495i329sf821308j1rpy8prcdraqahz7p4c89nc";
})
];
buildInputs = [
libX11
libGL
];
makeFlags = [
"LIBDIR=$(out)/lib"
"PRIMUS_libGLa=${aPackage}/lib/libGL.so"
"PRIMUS_libGLd=${libGL}/lib/libGL.so"
];
installPhase = ''
ln -s $out/lib/libGL.so.1 $out/lib/libGL.so
'';
passthru.glvnd = if nvidia_x11 != null && nvidia_x11.useGLVND then nvidia_x11 else null;
meta = {
description = "Low-overhead client-side GPU offloading";
homepage = "https://github.com/amonakov/primus";
platforms = [
"i686-linux"
"x86_64-linux"
];
license = lib.licenses.bsd2;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
wrapGAppsHook3,
curl,
freetype,
glew,
gtk3,
libGL,
libjpeg,
libpng,
SDL2,
SDL2_gfx,
SDL2_image,
SDL2_mixer,
SDL2_ttf,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "principia";
version = "2025.04.05";
src = fetchFromGitHub {
owner = "Bithack";
repo = "principia";
rev = finalAttrs.version;
hash = "sha256-cXtc1E4iJf3//UyzZzhky/NV7zk4959xSwGLHdCeyk0=";
};
nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook3
];
buildInputs = [
curl
freetype
glew
gtk3
libGL
libjpeg
libpng
SDL2
SDL2_gfx
SDL2_image
SDL2_mixer
SDL2_ttf
];
cmakeFlags = [
# Remove when https://github.com/NixOS/nixpkgs/issues/144170 is fixed
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
];
meta = with lib; {
changelog = "https://principia-web.se/wiki/Changelog#${
lib.replaceStrings [ "." ] [ "-" ] finalAttrs.version
}";
description = "Physics-based sandbox game";
mainProgram = "principia";
homepage = "https://principia-web.se/";
downloadPage = "https://principia-web.se/download";
license = licenses.bsd3;
maintainers = [ maintainers.fgaz ];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
python3Packages,
fetchFromGitHub,
glib,
wrapGAppsHook3,
}:
python3Packages.buildPythonApplication rec {
pname = "printrun";
version = "2.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "kliment";
repo = "Printrun";
tag = "printrun-${version}";
hash = "sha256-INJNGAmghoPIiivQp6AV1XmhyIu8SjfKqL8PTpi/tkY=";
};
nativeBuildInputs = [
glib
wrapGAppsHook3
];
build-system = with python3Packages; [
setuptools
cython
];
dependencies =
with python3Packages;
[
pyserial
wxpython
numpy
pyglet
psutil
lxml
platformdirs
puremagic
]
++ lib.optional stdenv.hostPlatform.isLinux dbus-python
++ lib.optional stdenv.hostPlatform.isDarwin pyobjc-framework-Cocoa;
pythonRelaxDeps = [ "pyglet" ];
# pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
doCheck = false;
postInstall = ''
substituteInPlace $out/share/applications/*.desktop \
--replace-fail /usr/bin/ ""
substituteInPlace $out/share/applications/pronterface.desktop \
--replace-fail "Path=/usr/share/pronterface/" ""
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
description = "Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software";
homepage = "https://github.com/kliment/Printrun";
license = licenses.gpl3Plus;
changelog = "https://github.com/kliment/Printrun/releases/tag/${src.tag}";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "prio";
version = "0-unstable-2018-09-13";
src = fetchFromGitHub {
owner = "letoram";
repo = "prio";
rev = "c3f97491339d15f063d6937d5f89bcfaea774dd1";
hash = "sha256-Idv/duEYmDk/rO+TI8n+FY3VFDtUEh8C292jh12BJuM=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p ${placeholder "out"}/share/arcan/appl/prio
cp -a ./* ${placeholder "out"}/share/arcan/appl/prio
runHook postInstall
'';
meta = {
homepage = "https://github.com/letoram/prio";
description = "Plan9- Rio like Window Manager for Arcan";
license = with lib.licenses; [ bsd3 ];
maintainers = [ ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,103 @@
{
lib,
stdenv,
gccStdenv,
coreutils,
fetchFromGitHub,
openjdk,
jre,
cctools,
copyDesktopItems,
makeDesktopItem,
makeWrapper,
}:
let
stdenv' = if stdenv.hostPlatform.isDarwin then gccStdenv else stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
pname = "prism-model-checker";
version = "4.9";
src = fetchFromGitHub {
owner = "prismmodelchecker";
repo = "prism";
rev = "v${finalAttrs.version}";
hash = "sha256-eoyMGrXta49j2h/bStPuzrF6OZd/l2aQBngPbTZEvAo=";
};
nativeBuildInputs = [
openjdk
copyDesktopItems
makeWrapper
]
++ lib.optionals stdenv'.hostPlatform.isDarwin [ cctools ];
desktopItems = [
(makeDesktopItem {
name = "prism-model-checker-xprism";
desktopName = "XPrism";
type = "Application";
icon = "prism-model-checker";
terminal = false;
categories = [
"Science"
"Math"
];
exec = "xprism";
comment = "Probabalistic Symbolic Model Checker";
})
];
postPatch = ''
substituteInPlace prism/install.sh --replace-fail "/bin/mv" "mv"
'';
makeFlags = [
"JAVA_DIR=${openjdk}"
"release_config"
"clean_all"
"all"
"binary"
];
preBuild = ''
cd prism
'';
installPhase = ''
runHook preInstall
mkdir --parents $out/share/
cp -r bin/ $out/
cp -r lib/ $out/
cp -r etc/{scripts,syntax-highlighters,prism{.css,.tex,-eclipse-formatter.xml}} -t $out/share
for size in 16 24 32 48 64 128 256; do
mkdir --parents $out/share/icons/hicolor/''${size}x''${size}/apps
cp etc/icons/p''${size}.png $out/share/icons/hicolor/''${size}x''${size}/apps/prism-model-checker.png
done
mv install.sh $out/
cd $out
./install.sh
rm install.sh
for f in $out/bin/*; do
wrapProgram $f \
--set JAVA_HOME ${jre.home} \
--set PRISM_JAVA ${lib.getExe jre} \
--prefix PATH: ${lib.makeBinPath [ jre ]}
done
runHook postInstall
'';
meta = {
description = "Probabalistic Symbolic Model Checker";
homepage = "https://www.prismmodelchecker.org";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.astrobeastie ];
platforms = lib.platforms.unix;
mainProgram = "prism";
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule rec {
pname = "prism";
version = "0.1.1";
src = fetchFromGitHub {
owner = "muesli";
repo = "prism";
tag = "v${version}";
hash = "sha256-IRR7Gu+wGUUYyFfhc003QVlEaWCJPmi6XYVUN6Q6+GA=";
};
vendorHash = "sha256-uKtVifw4dxJdVvHxytL+9qjXHEdTyiz8U8n/95MObdY=";
passthru.updateScript = nix-update-script { };
meta = {
description = "RTMP stream recaster/splitter";
homepage = "https://github.com/muesli/prism";
changelog = "https://github.com/muesli/prism/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ paperdigits ];
mainProgram = "prism";
};
}

View File

@@ -0,0 +1,90 @@
{
fetchFromGitHub,
lib,
openssl,
pkg-config,
protobuf,
rustPlatform,
stdenv,
}:
# Updating this package will force an update for prisma. The
# version of prisma-engines and prisma must be the same for them to
# function correctly.
rustPlatform.buildRustPackage rec {
pname = "prisma-engines";
version = "6.7.0";
src = fetchFromGitHub {
owner = "prisma";
repo = "prisma-engines";
rev = version;
hash = "sha256-Ty8BqWjZluU6a5xhSAVb2VoTVY91UUj6zoVXMKeLO4o=";
};
cargoHash = "sha256-HjDoWa/JE6izUd+hmWVI1Yy3cTBlMcvD9ANsvqAoHBI=";
# Use system openssl.
OPENSSL_NO_VENDOR = 1;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
preBuild = ''
export OPENSSL_DIR=${lib.getDev openssl}
export OPENSSL_LIB_DIR=${lib.getLib openssl}/lib
export PROTOC=${protobuf}/bin/protoc
export PROTOC_INCLUDE="${protobuf}/include";
export SQLITE_MAX_VARIABLE_NUMBER=250000
export SQLITE_MAX_EXPR_DEPTH=10000
export GIT_HASH=0000000000000000000000000000000000000000
'';
cargoBuildFlags = [
"-p"
"query-engine"
"-p"
"query-engine-node-api"
"-p"
"schema-engine-cli"
"-p"
"prisma-fmt"
];
postInstall = ''
mv $out/lib/libquery_engine${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libquery_engine.node
'';
# Tests are long to compile
doCheck = false;
setupHook = ./setup-hook.sh;
meta = with lib; {
description = "Collection of engines that power the core stack for Prisma";
homepage = "https://www.prisma.io/";
license = licenses.asl20;
platforms = platforms.unix;
mainProgram = "prisma";
maintainers = with maintainers; [
tomhoule
aqrln
];
};
}
### Troubleshooting
# Here's an example application using Prisma with Nix: https://github.com/pimeys/nix-prisma-example
# At example's `flake.nix` shellHook, notice the requirement of defining environment variables for prisma, it's values will show on `prisma --version`.
# Read the example's README: https://github.com/pimeys/nix-prisma-example/blob/main/README.md
# Prisma requires 2 packages, `prisma-engines` and `prisma`, to be at *exact* same versions.
# Certify at `package.json` that dependencies "@prisma/client" and "prisma" are equal, meaning no caret (`^`) in version.
# Configure NPM to use exact version: `npm config set save-exact=true`
# Delete `package-lock.json`, delete `node_modules` directory and run `npm install`.
# Run prisma client from `node_modules/.bin/prisma`.
# Run `./node_modules/.bin/prisma --version` and check if both prisma packages versions are equal, current platform is `linux-nixos`, and other keys equal to the prisma environment variables you defined for prisma.
# Test prisma with `generate`, `db push`, etc. It should work. If not, open an issue.

View File

@@ -0,0 +1,4 @@
export PRISMA_SCHEMA_ENGINE_BINARY="@out@/bin/schema-engine"
export PRISMA_QUERY_ENGINE_BINARY="@out@/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="@out@/lib/libquery_engine.node"
export PRISMA_FMT_BINARY="@out@/bin/prisma-fmt"

View File

@@ -0,0 +1,28 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs: {
pname = "prisma-language-server";
version = "6.16.3";
src = fetchFromGitHub {
owner = "prisma";
repo = "language-tools";
tag = "${finalAttrs.version}";
hash = "sha256-89/XErfqdMYTbATa8SmSTBMwY8Hlb364jNAuQgql5zo=";
};
sourceRoot = "${finalAttrs.src.name}/packages/language-server";
npmDepsHash = "sha256-RCwHl8UNQfGOmq4QY6ECY+/Beo2enaOlWsS7RiMlyLc=";
meta = {
description = "Language server for Prisma";
homepage = "https://github.com/prisma/language-tools";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ mmkaram ];
mainProgram = "prisma-language-server";
};
})

View File

@@ -0,0 +1,107 @@
{
lib,
fetchFromGitHub,
stdenv,
nodejs,
pnpm_9,
prisma-engines,
jq,
makeWrapper,
moreutils,
callPackage,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "prisma";
version = "6.7.0";
src = fetchFromGitHub {
owner = "prisma";
repo = "prisma";
rev = finalAttrs.version;
hash = "sha256-ts7HvQbbBFzLRr7uamo95rDnJuDHsAu2CE/pKkJwcX4=";
};
nativeBuildInputs = [
nodejs
pnpm_9.configHook
jq
makeWrapper
moreutils
];
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-dhEpn0oaqZqeiRMfcSiaqhud/RsKd6Wm5RR5iyQp1I8=";
};
patchPhase = ''
runHook prePatch
for package in packages/*; do
jq --arg version $version '.version = $version' $package/package.json | sponge $package/package.json
done
runHook postPatch
'';
buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';
# FIXME: Use pnpm deploy: https://github.com/pnpm/pnpm/issues/5315
installPhase = ''
runHook preInstall
mkdir -p $out/lib/prisma
# Fetch CLI workspace dependencies
deps_json=$(pnpm list --filter ./packages/cli --prod --depth Infinity --json)
deps=$(jq -r '[.. | strings | select(startswith("link:../")) | sub("^link:../"; "")] | unique[]' <<< "$deps_json")
# Remove unnecessary external dependencies
find . -name node_modules -type d -prune -exec rm -rf {} +
pnpm install --offline --ignore-scripts --frozen-lockfile --prod
cp -r node_modules $out/lib/prisma
# Only install cli and its workspace dependencies
for package in cli $deps; do
filename=$(npm pack --json ./packages/$package | jq -r '.[].filename')
mkdir -p $out/lib/prisma/packages/$package
[ -d "packages/$package/node_modules" ] && \
cp -r packages/$package/node_modules $out/lib/prisma/packages/$package
tar xf $filename --strip-components=1 -C $out/lib/prisma/packages/$package
done
# Remove dangling symlinks to packages we didn't copy to $out
find $out/lib/prisma/node_modules/.pnpm/node_modules -type l -exec test ! -e {} \; -delete
makeWrapper "${lib.getExe nodejs}" "$out/bin/prisma" \
--add-flags "$out/lib/prisma/packages/cli/build/index.js" \
--set PRISMA_SCHEMA_ENGINE_BINARY ${prisma-engines}/bin/schema-engine \
--set PRISMA_QUERY_ENGINE_BINARY ${prisma-engines}/bin/query-engine \
--set PRISMA_QUERY_ENGINE_LIBRARY ${lib.getLib prisma-engines}/lib/libquery_engine.node
runHook postInstall
'';
dontStrip = true;
passthru.tests = {
cli = callPackage ./test-cli.nix { };
};
meta = with lib; {
description = "Next-generation ORM for Node.js and TypeScript";
homepage = "https://www.prisma.io/";
license = licenses.asl20;
maintainers = with maintainers; [ aqrln ];
mainProgram = "prisma";
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,64 @@
{
lib,
runCommand,
prisma,
prisma-engines,
sqlite-interactive,
}:
let
prismaMajorVersion = lib.versions.majorMinor prisma.version;
enginesMajorVersion = lib.versions.majorMinor prisma-engines.version;
in
runCommand "prisma-cli-tests"
{
nativeBuildInputs = [
prisma
sqlite-interactive
];
meta.timeout = 60;
}
''
mkdir $out
cd $out
if [ "${prismaMajorVersion}" != "${enginesMajorVersion}" ]; then
echo "prisma in version ${prismaMajorVersion} and prisma-engines in ${enginesMajorVersion}. Major versions must match."
exit 1
fi
# Ensure CLI runs
prisma --help > /dev/null
# Init a new project
prisma init > /dev/null
# Create a simple data model
cat << EOF > prisma/schema.prisma
datasource db {
provider = "sqlite"
url = "file:test.db"
}
generator js {
provider = "prisma-client-js"
}
model A {
id Int @id @default(autoincrement())
b String @default("foo")
}
EOF
# Format
prisma format > /dev/null
# Create the database
prisma db push --skip-generate > /dev/null
# The database file should exist and be a SQLite database
sqlite3 prisma/test.db "SELECT id, b FROM A" > /dev/null
# Introspect the database
prisma db pull > /dev/null
''

View File

@@ -0,0 +1,123 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
cmark,
extra-cmake-modules,
fetchpatch2,
gamemode,
ghc_filesystem,
jdk17,
kdePackages,
ninja,
nix-update-script,
stripJavaArchivesHook,
tomlplusplus,
zlib,
msaClientID ? null,
gamemodeSupport ? stdenv.hostPlatform.isLinux,
}:
let
libnbtplusplus = fetchFromGitHub {
owner = "PrismLauncher";
repo = "libnbtplusplus";
rev = "23b955121b8217c1c348a9ed2483167a6f3ff4ad";
hash = "sha256-yy0q+bky80LtK1GWzz7qpM+aAGrOqLuewbid8WT1ilk=";
};
in
assert lib.assertMsg (
gamemodeSupport -> stdenv.hostPlatform.isLinux
) "gamemodeSupport is only available on Linux.";
stdenv.mkDerivation (finalAttrs: {
pname = "prismlauncher-unwrapped";
version = "9.4";
src = fetchFromGitHub {
owner = "PrismLauncher";
repo = "PrismLauncher";
tag = finalAttrs.version;
hash = "sha256-q8ln54nepwbJhC212vGODaafsbOCtdXar7F2NacKWO4=";
};
postUnpack = ''
rm -rf source/libraries/libnbtplusplus
ln -s ${libnbtplusplus} source/libraries/libnbtplusplus
'';
patches = [
# https://github.com/PrismLauncher/PrismLauncher/pull/3622
# https://github.com/NixOS/nixpkgs/issues/400119
(fetchpatch2 {
name = "fix-qt6.9-compatibility.patch";
url = "https://github.com/PrismLauncher/PrismLauncher/commit/8bb9b168fb996df9209e1e34be854235eda3d42a.diff";
hash = "sha256-hOqWBrUrVUhMir2cfc10gu1i8prdNxefTyr7lH6KA2c=";
})
];
nativeBuildInputs = [
cmake
ninja
extra-cmake-modules
jdk17
stripJavaArchivesHook
];
buildInputs = [
cmark
ghc_filesystem
kdePackages.qtbase
kdePackages.qtnetworkauth
kdePackages.quazip
tomlplusplus
zlib
]
++ lib.optional gamemodeSupport gamemode;
hardeningEnable = lib.optionals stdenv.hostPlatform.isLinux [ "pie" ];
cmakeFlags = [
# downstream branding
(lib.cmakeFeature "Launcher_BUILD_PLATFORM" "nixpkgs")
]
++ lib.optionals (msaClientID != null) [
(lib.cmakeFeature "Launcher_MSA_CLIENT_ID" (toString msaClientID))
]
++ lib.optionals (lib.versionOlder kdePackages.qtbase.version "6") [
(lib.cmakeFeature "Launcher_QT_VERSION_MAJOR" "5")
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# we wrap our binary manually
(lib.cmakeFeature "INSTALL_BUNDLE" "nodeps")
# disable built-in updater
(lib.cmakeFeature "MACOSX_SPARKLE_UPDATE_FEED_URL" "''")
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/Applications/")
];
doCheck = true;
dontWrapQtApps = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Free, open source launcher for Minecraft";
longDescription = ''
Allows you to have multiple, separate instances of Minecraft (each with
their own mods, texture packs, saves, etc) and helps you manage them and
their associated options with a simple interface.
'';
homepage = "https://prismlauncher.org/";
changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
minion3665
Scrumplex
getchoo
];
mainProgram = "prismlauncher";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,134 @@
{
addDriverRunpath,
alsa-lib,
flite,
gamemode,
glfw3-minecraft,
jdk17,
jdk21,
jdk8,
kdePackages,
lib,
libGL,
libX11,
libXcursor,
libXext,
libXrandr,
libXxf86vm,
libjack2,
libpulseaudio,
libusb1,
mesa-demos,
openal,
pciutils,
pipewire,
prismlauncher-unwrapped,
stdenv,
symlinkJoin,
udev,
vulkan-loader,
xrandr,
additionalLibs ? [ ],
additionalPrograms ? [ ],
controllerSupport ? stdenv.hostPlatform.isLinux,
gamemodeSupport ? stdenv.hostPlatform.isLinux,
jdks ? [
jdk21
jdk17
jdk8
],
msaClientID ? null,
textToSpeechSupport ? stdenv.hostPlatform.isLinux,
}:
assert lib.assertMsg (
controllerSupport -> stdenv.hostPlatform.isLinux
) "controllerSupport only has an effect on Linux.";
assert lib.assertMsg (
textToSpeechSupport -> stdenv.hostPlatform.isLinux
) "textToSpeechSupport only has an effect on Linux.";
let
prismlauncher' = prismlauncher-unwrapped.override { inherit msaClientID gamemodeSupport; };
in
symlinkJoin {
pname = "prismlauncher";
inherit (prismlauncher') version;
paths = [ prismlauncher' ];
nativeBuildInputs = [ kdePackages.wrapQtAppsHook ];
buildInputs = [
kdePackages.qtbase
kdePackages.qtsvg
]
++ lib.optional (
lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.hostPlatform.isLinux
) kdePackages.qtwayland;
postBuild = ''
wrapQtAppsHook
'';
qtWrapperArgs =
let
runtimeLibs = [
(lib.getLib stdenv.cc.cc)
## native versions
glfw3-minecraft
openal
## openal
alsa-lib
libjack2
libpulseaudio
pipewire
## glfw
libGL
libX11
libXcursor
libXext
libXrandr
libXxf86vm
udev # oshi
vulkan-loader # VulkanMod's lwjgl
]
++ lib.optional textToSpeechSupport flite
++ lib.optional gamemodeSupport gamemode.lib
++ lib.optional controllerSupport libusb1
++ additionalLibs;
runtimePrograms = [
mesa-demos
pciutils # need lspci
xrandr # needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
]
++ additionalPrograms;
in
[ "--prefix PRISMLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ]
++ lib.optionals stdenv.hostPlatform.isLinux [
"--set LD_LIBRARY_PATH ${addDriverRunpath.driverLink}/lib:${lib.makeLibraryPath runtimeLibs}"
"--prefix PATH : ${lib.makeBinPath runtimePrograms}"
];
meta = {
inherit (prismlauncher'.meta)
description
longDescription
homepage
changelog
license
maintainers
mainProgram
platforms
;
};
}

View File

@@ -0,0 +1,173 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
runtimeShell,
runCommand,
makeWrapper,
installShellFiles,
buildGoModule,
coreutils,
which,
gnugrep,
gnused,
openresolv,
systemd,
iproute2,
openvpn,
electron,
wireguard-tools,
withWireguard ? stdenv.hostPlatform.isLinux,
}:
let
version = "1.3.4275.94";
src = fetchFromGitHub {
owner = "pritunl";
repo = "pritunl-client-electron";
rev = version;
sha256 = "sha256-a1arRI4qQy5niKV8JAyusAjheMa/LtEXPZGhngsH+TU=";
};
cli = buildGoModule {
pname = "pritunl-cli";
inherit version src;
modRoot = "cli";
vendorHash = "sha256-xozdrNKBgrrCZ5WYHGWKOuuGrEhx/VzOKLZTGq3scoo=";
postInstall = ''
mv $out/bin/cli $out/bin/pritunl-client
'';
passthru.updateScript = nix-update-script { };
};
service = buildGoModule {
pname = "pritunl-client-service";
inherit version src;
modRoot = "service";
vendorHash = "sha256-3dgBiCqWj+nwWn9mFARBKIpgjn2aJYvVUrqMIzhToQs=";
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
sed -Ei service/connection/scripts.go \
-e 's|#!\s*(/usr)?/bin/(env )?bash\b|#! ${runtimeShell}|g'
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
sed -Ei service/connection/scripts.go \
-e 's|(/usr)?/s?bin/busctl\b|busctl|g' \
-e 's|(/usr)?/s?bin/resolvectl\b|resolvectl|g' \
-e 's|(/usr)?/s?bin/ip\b|ip|g'
'';
postInstall = ''
mv $out/bin/service $out/bin/pritunl-client-service
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/lib/systemd/system/
cp $src/resources_linux/pritunl-client.service $out/lib/systemd/system/
substituteInPlace $out/lib/systemd/system/pritunl-client.service \
--replace-warn "/usr" "$out"
'';
postFixup =
let
hookScriptsDeps = [
coreutils
which
gnused
gnugrep
]
++ lib.optionals stdenv.hostPlatform.isLinux [
openresolv
systemd
iproute2
];
openvpn-wrapped =
runCommand "openvpn-wrapped"
{
nativeBuildInputs = [ makeWrapper ];
}
''
mkdir -p $out/bin
makeWrapper ${openvpn}/bin/openvpn $out/bin/openvpn \
--prefix PATH : ${lib.makeBinPath hookScriptsDeps} \
--add-flags "--setenv PATH \$PATH"
'';
pritunlDeps = [
openvpn-wrapped
]
++ lib.optionals withWireguard [
openresolv
coreutils
wireguard-tools
];
in
lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/pritunl-client-service \
--prefix PATH : "${lib.makeBinPath pritunlDeps}"
'';
passthru.updateScript = nix-update-script { };
};
in
stdenv.mkDerivation {
pname = "pritunl-client";
inherit version src;
dontBuild = true;
dontConfigure = true;
nativeBuildInputs = [
makeWrapper
installShellFiles
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin/
ln -s ${cli}/bin/pritunl-client $out/bin/
ln -s ${service}/bin/pritunl-client-service $out/bin/
mkdir -p $out/lib/
cp -r client $out/lib/pritunl_client_electron
makeWrapper ${electron}/bin/electron $out/bin/pritunl-client-electron \
--add-flags $out/lib/pritunl_client_electron
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/lib/systemd/system/
ln -s ${service}/lib/systemd/system/pritunl-client.service $out/lib/systemd/system/
mkdir -p $out/share/icons/
cp -r resources_linux/icons $out/share/icons/hicolor
mkdir -p $out/share/applications/
cp resources_linux/pritunl-client-electron.desktop $out/share/applications/
substituteInPlace $out/share/applications/pritunl-client-electron.desktop \
--replace-fail "/usr/lib/pritunl_client_electron/Pritunl" "$out/bin/pritunl-client-electron"
''
+ ''
# install shell completions for pritunl-client
installShellCompletion --cmd pritunl-client \
--bash <($out/bin/pritunl-client completion bash) \
--fish <($out/bin/pritunl-client completion fish) \
--zsh <($out/bin/pritunl-client completion zsh)
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Pritunl OpenVPN client";
homepage = "https://client.pritunl.com/";
license = licenses.unfree;
maintainers = with maintainers; [
minizilla
andrevmatos
];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
}:
stdenv.mkDerivation rec {
pname = "pritunl-ssh";
version = "1.0.3231.6";
src = fetchFromGitHub {
owner = "pritunl";
repo = "pritunl-zero-client";
rev = version;
sha256 = "sha256-kccc8ZDh3S/Ko/MaBd5u0UxMNIbg5dhvRuecJuE3D6c=";
};
buildInputs = [ python3 ];
installPhase = ''
mkdir -p $out/bin
install ssh_client.py $out/bin/pritunl-ssh
install ssh_host_client.py $out/bin/pritunl-ssh-host
'';
meta = with lib; {
description = "Pritunl Zero SSH client";
homepage = "https://github.com/pritunl/pritunl-zero-client";
license = licenses.unfree;
maintainers = with maintainers; [ Thunderbottom ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
nixosTests,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "privatebin";
version = "2.0.0";
src = fetchFromGitHub {
owner = "PrivateBin";
repo = "PrivateBin";
tag = finalAttrs.version;
hash = "sha256-qAGCpxOWJ+hF8/KV8E8xB30nL3c2JhbQmhFiQsoHQ68=";
};
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R $src/* $out
runHook postInstall
'';
passthru = {
tests = nixosTests.privatebin;
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/PrivateBin/PrivateBin/releases/tag/${finalAttrs.version}";
description = "Minimalist, open source online pastebin where the server has zero knowledge of pasted data";
homepage = "https://privatebin.info";
license = with lib.licenses; [
# privatebin
zlib
# dependencies, see https://github.com/PrivateBin/PrivateBin/blob/master/LICENSE.md
gpl2Only
bsd3
mit
asl20
cc-by-40
];
maintainers = with lib.maintainers; [
savyajha
defelo
];
};
})

View File

@@ -0,0 +1,172 @@
{
autoPatchelfHook,
bash,
bbe,
coreutils,
cups,
dbus,
fetchurl,
fuse,
gawk,
glib,
lib,
makeWrapper,
netcat,
p7zip,
perl,
stdenv,
timetrap,
undmg,
util-linux,
wayland,
xorg,
}:
let
libPath = lib.concatStringsSep ":" [
"${glib.out}/lib"
"${xorg.libXrandr}/lib"
"${wayland.out}/lib"
];
scriptPath = lib.concatStringsSep ":" [
"${bash}/bin"
"${coreutils}/bin"
"${cups}/sbin"
"${gawk}/bin"
"${netcat}/bin"
"${timetrap}/bin"
"${util-linux}/bin"
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "prl-tools";
version = "26.1.1-57288";
# We download the full distribution to extract prl-tools-lin.iso from
# => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso
src = fetchurl {
url = "https://download.parallels.com/desktop/v${lib.versions.major finalAttrs.version}/${finalAttrs.version}/ParallelsDesktop-${finalAttrs.version}.dmg";
hash = "sha256-11IyKI2oOffzSPTB65XksZI3PD9W2+0SPZIfpb0RLuU=";
};
hardeningDisable = [
"pic"
"format"
];
nativeBuildInputs = [
autoPatchelfHook
bbe
makeWrapper
p7zip
perl
undmg
];
buildInputs = [
fuse
glib
xorg.libX11
xorg.libXcomposite
xorg.libXext
xorg.libXrandr
xorg.libXi
xorg.libXinerama
];
runtimeDependencies = [
dbus
glib
xorg.libXrandr
];
unpackPhase = ''
runHook preUnpack
undmg $src
export sourceRoot=prl-tools-build
7z x "Parallels Desktop.app/Contents/Resources/Tools/prl-tools-lin${lib.optionalString stdenv.hostPlatform.isAarch64 "-arm"}.iso" -o$sourceRoot
runHook postUnpack
'';
dontBuild = true;
installPhase = ''
runHook preInstall
( # tools
cd tools/tools${
if stdenv.hostPlatform.isAarch64 then
"-arm64"
else if stdenv.hostPlatform.isx86_64 then
"64"
else
"32"
}
mkdir -p $out/lib
# prltoolsd contains hardcoded /bin/bash path
# we're lucky because it uses only -c command
# => replace to /bin/sh
bbe -e "s:/bin/bash:/bin/sh\x00\x00:" -o bin/prltoolsd.tmp bin/prltoolsd
rm -f bin/prltoolsd
mv bin/prltoolsd.tmp bin/prltoolsd
# replace hardcoded /usr/bin/prl_fsd
substituteInPlace ../mount.fuse.prl_fsd \
--replace-fail "/usr/bin/prl_fsd" "$out/bin/prl_fsd"
# install binaries
for i in bin/* sbin/prl_nettool sbin/prl_snapshot; do
# also patch binaries to replace /usr/bin/XXX to XXX
# here a two possible cases:
# 1. it is uses as null terminated string and should be truncated by null;
# 2. it is uses inside shell script and should be truncated by space.
for p in bin/* sbin/prl_nettool sbin/prl_snapshot sbin/prlfsmountd; do
p=$(basename $p)
bbe -e "s:/usr/bin/$p\x00:./$p\x00\x00\x00\x00\x00\x00\x00\x00:" -o $i.tmp $i
bbe -e "s:/usr/sbin/$p\x00:./$p\x00\x00\x00\x00\x00\x00\x00\x00 :" -o $i $i.tmp
bbe -e "s:/usr/bin/$p:$p :" -o $i.tmp $i
bbe -e "s:/usr/sbin/$p:$p :" -o $i $i.tmp
done
install -Dm755 $i $out/$i
done
install -Dm755 ../../tools/mount.fuse.prl_fsd $out/sbin/mount.fuse.prl_fsd
install -Dm755 ../../tools/prlfsmountd.sh $out/sbin/prlfsmountd
install -Dm755 ../../tools/prlbinfmtconfig.sh $out/sbin/prlbinfmtconfig
for f in $out/bin/* $out/sbin/*; do
wrapProgram $f \
--prefix LD_LIBRARY_PATH ':' "${libPath}" \
--prefix PATH ':' "${scriptPath}"
done
for i in lib/libPrl*.0.0; do
cp $i $out/lib
ln -s $out/$i $out/''${i%.0.0}
done
substituteInPlace ../99prltoolsd-hibernate \
--replace-fail "/bin/bash" "${bash}/bin/bash"
mkdir -p $out/etc/pm/sleep.d
install -Dm644 ../99prltoolsd-hibernate $out/etc/pm/sleep.d
)
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Parallels Tools for Linux guests";
homepage = "https://parallels.com";
license = licenses.unfree;
maintainers = with maintainers; [
wegank
codgician
];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,53 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq libxml2
set -eu -o pipefail
nixpkgs="$(git rev-parse --show-toplevel)"
path="$nixpkgs/pkgs/by-name/pr/prl-tools/default.nix"
# Currently this script only supports Parallels 26
# Please change the knowledge base url after each major release
kb_url="https://kb.parallels.com/en/131014"
content="$(curl -s "$kb_url")"
# Extract all version/build pairs and select the latest (by semver, then build)
# Prefer the article content; fallback to whole body text
article_text="$(echo "$content" | xmllint --recover --html --xpath 'string(//div[@id="article-content"])' - 2>/dev/null || true)"
if [[ -z "${article_text:-}" ]]; then
article_text="$(echo "$content" | xmllint --recover --html --xpath 'string(//body)' - 2>/dev/null || echo "$content")"
fi
# Find all "X.Y.Z (BUILD)" occurrences like "20.4.1 (55996)"
mapfile -t candidates < <(echo "$article_text" \
| grep -Eo '[0-9]+\.[0-9]+\.[0-9]+[[:space:]]*\(([0-9]+)\)' \
| sed -E 's/([0-9]+\.[0-9]+\.[0-9]+)[[:space:]]*\(([0-9]+)\)/\1 \2/' \
| sort -u)
if [[ ${#candidates[@]} -eq 0 ]]; then
echo "Failed to extract any version from $kb_url" >&2
exit 1
fi
# Sort by version then build and pick the highest
latest_pair="$(printf '%s\n' "${candidates[@]}" | sort -V -k1,1 -k2,2n | tail -n1)"
latest_ver="$(awk '{print $1}' <<< "$latest_pair")"
latest_build="$(awk '{print $2}' <<< "$latest_pair")"
version="${latest_ver}-${latest_build}"
echo "Found latest version: $version"
# Extract and compare current version
old_version="$(grep -o 'version = ".*"' "$path" | awk -F'"' '{print $2}')"
if [[ "$old_version" > "$version" || "$old_version" == "$version" ]]; then
echo "Current version $old_version is up-to-date"
exit 0
fi
# Update version and hash
major_version="$(echo "$version" | cut -d. -f1)"
dmg_url="https://download.parallels.com/desktop/v${major_version}/${version}/ParallelsDesktop-${version}.dmg"
sha256="$(nix store prefetch-file "$dmg_url" --json | jq -r '.hash')"
sed -i -e "s,version = \"$old_version\",version = \"$version\"," \
-e "s,hash = \"sha256-.*\",hash = \"$sha256\"," "$path"
echo "Updated linuxPackages_latest.prl-tools $old_version -> $version"

View File

@@ -0,0 +1,77 @@
{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
pkg-config,
libusb1,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "probe-rs-tools";
version = "0.29.1";
src = fetchFromGitHub {
owner = "probe-rs";
repo = "probe-rs";
tag = "v${version}";
hash = "sha256-/gP9abygktYSzg/054o1PEcQywiPFTtKNdUdI3hCYyc=";
};
cargoHash = "sha256-txHl0+HDCVdmbZppGsFqPjsEbPBCJVEB3XZWZJBBoOk=";
buildAndTestSubdir = pname;
nativeBuildInputs = [
# required by libz-sys, no option for dynamic linking
# https://github.com/rust-lang/libz-sys/issues/158
cmake
pkg-config
];
buildInputs = [
libusb1
openssl
];
checkFlags = [
# require a physical probe
"--skip=cmd::dap_server::server::debugger::test::attach_request"
"--skip=cmd::dap_server::server::debugger::test::attach_with_flashing"
"--skip=cmd::dap_server::server::debugger::test::disassemble::instructions_after_and_not_including_the_ref_address"
"--skip=cmd::dap_server::server::debugger::test::disassemble::instructions_before_and_not_including_the_ref_address_multiple_locations"
"--skip=cmd::dap_server::server::debugger::test::disassemble::instructions_including_the_ref_address_location_cloned_from_earlier_line"
"--skip=cmd::dap_server::server::debugger::test::disassemble::negative_byte_offset_of_exactly_one_instruction_aligned_"
"--skip=cmd::dap_server::server::debugger::test::disassemble::positive_byte_offset_that_lands_in_the_middle_of_an_instruction_unaligned_"
"--skip=cmd::dap_server::server::debugger::test::launch_and_threads"
"--skip=cmd::dap_server::server::debugger::test::launch_with_config_error"
"--skip=cmd::dap_server::server::debugger::test::test_initalize_request"
"--skip=cmd::dap_server::server::debugger::test::test_launch_and_terminate"
"--skip=cmd::dap_server::server::debugger::test::test_launch_no_probes"
"--skip=cmd::dap_server::server::debugger::test::wrong_request_after_init"
# compiles an image for an embedded target which we do not have a toolchain for
"--skip=util::cargo::test::get_binary_artifact_with_cargo_config"
"--skip=util::cargo::test::get_binary_artifact_with_cargo_config_toml"
# requires other crates in the workspace
"--skip=util::cargo::test::get_binary_artifact"
"--skip=util::cargo::test::library_with_example_specified"
"--skip=util::cargo::test::multiple_binaries_in_crate_select_binary"
"--skip=util::cargo::test::workspace_binary_package"
"--skip=util::cargo::test::workspace_root"
];
meta = {
description = "CLI tool for on-chip debugging and flashing of ARM chips";
homepage = "https://probe.rs/";
changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = with lib.maintainers; [
xgroleau
newam
];
};
}

View File

@@ -0,0 +1,75 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
bash,
coreutils,
gdb,
zlib,
}:
stdenv.mkDerivation rec {
pname = "procdump";
version = "1.2";
src = fetchFromGitHub {
owner = "Microsoft";
repo = "ProcDump-for-Linux";
rev = version;
sha256 = "sha256-gVswAezHl7E2cBTJEQhPFXhHkzhWVHSpPF8m0s8+ekc=";
};
patches = [
# Pull upstream patch to fix parallel builds:
# https://github.com/Sysinternals/ProcDump-for-Linux/pull/133
(fetchpatch {
name = "parallel.patch";
url = "https://github.com/Sysinternals/ProcDump-for-Linux/commit/0d735836f11281cc6134be93eac8acb302f2055e.patch";
sha256 = "sha256-zsqllPHF8ZuXAIDSAPvbzdKa43uSSx9ilUKM1vFVW90=";
})
];
nativeBuildInputs = [ zlib ];
buildInputs = [
bash
coreutils
gdb
];
postPatch = ''
substituteInPlace src/CoreDumpWriter.c \
--replace '"gcore ' '"${gdb}/bin/gcore ' \
--replace '"rm ' '"${coreutils}/bin/rm ' \
--replace '/bin/bash' '${bash}/bin/bash'
'';
makeFlags = [
"DESTDIR=${placeholder "out"}"
"INSTALLDIR=/bin"
"MANDIR=/share/man/man1"
];
enableParallelBuilding = true;
doCheck = false; # needs sudo root
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
set +o pipefail
($out/bin/procdump -h | grep "ProcDump v${version}") ||
(echo "ERROR: ProcDump is not the expected version or does not run properly" ; exit 1)
set -o pipefail
runHook postInstallCheck
'';
meta = with lib; {
description = "Linux version of the ProcDump Sysinternals tool";
mainProgram = "procdump";
homepage = "https://github.com/Microsoft/ProcDump-for-Linux";
license = licenses.mit;
maintainers = with maintainers; [ c0bw3b ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
let
config-module = "github.com/f1bonacc1/process-compose/src/config";
in
buildGoModule (finalAttrs: {
pname = "process-compose";
version = "1.75.2";
src = fetchFromGitHub {
owner = "F1bonacc1";
repo = "process-compose";
tag = "v${finalAttrs.version}";
hash = "sha256-BKf8FrgpGhYzuukAFP+OCjvp5bMCQL6BmZ+Tk/E8RIY=";
# populate values that require us to use git. By doing this in postFetch we
# can delete .git afterwards and maintain better reproducibility of the src.
leaveDotGit = true;
postFetch = ''
cd "$out"
git rev-parse --short HEAD > $out/COMMIT
# in format of 0000-00-00T00:00:00Z
date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%dT%H:%M:%SZ" > $out/SOURCE_DATE_EPOCH
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
# ldflags based on metadata from git and source
preBuild = ''
ldflags+=" -X ${config-module}.Commit=$(cat COMMIT)"
ldflags+=" -X ${config-module}.Date=$(cat SOURCE_DATE_EPOCH)"
'';
ldflags = [
"-X ${config-module}.Version=v${finalAttrs.version}"
"-s"
"-w"
];
nativeBuildInputs = [
installShellFiles
];
vendorHash = "sha256-AXmULIWtEsNhSZ764BH5AkXlh49HNKT1jZABzhPIzPQ=";
doCheck = false;
postInstall = ''
mv $out/bin/{src,process-compose}
installShellCompletion --cmd process-compose \
--bash <($out/bin/process-compose completion bash) \
--zsh <($out/bin/process-compose completion zsh) \
--fish <($out/bin/process-compose completion fish)
'';
meta = {
description = "Simple and flexible scheduler and orchestrator to manage non-containerized applications";
homepage = "https://github.com/F1bonacc1/process-compose";
changelog = "https://github.com/F1bonacc1/process-compose/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ thenonameguy ];
mainProgram = "process-compose";
};
})

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchFromGitLab,
testers,
gitUpdater,
cmake,
coreutils,
boost,
gtest,
lomiri,
properties-cpp,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "process-cpp";
version = "3.0.2";
src = fetchFromGitLab {
domain = "gitlab.com";
owner = "ubports";
repo = "development/core/lib-cpp/process-cpp";
rev = finalAttrs.version;
hash = "sha256-UCNmD5Ea2wnEwG9gkt88TaX0vfS4SCaIOPRMeNFx80Y=";
};
outputs = [
"out"
"dev"
];
postPatch = ''
substituteInPlace data/process-cpp.pc.in \
--replace-fail 'libdir=''${exec_prefix}' 'libdir=''${prefix}' \
--replace-fail 'includedir=''${exec_prefix}' 'includedir=''${prefix}'
substituteInPlace tests/posix_process_test.cpp \
--replace-fail '/usr/bin/sleep' '${lib.getExe' coreutils "sleep"}' \
--replace-fail '/usr/bin/env' '${lib.getExe' coreutils "env"}'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost
lomiri.cmake-extras
properties-cpp
];
checkInputs = [ gtest ];
cmakeFlags = [ (lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck) ];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = {
description = "Simple convenience library for handling processes in C++11";
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/process-cpp";
license = with lib.licenses; [
gpl3Only
lgpl3Only
];
maintainers = with lib.maintainers; [
onny
OPNA2608
];
platforms = lib.platforms.linux;
pkgConfigModules = [ "process-cpp" ];
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
fetchCrate,
pkg-config,
gtk4,
}:
rustPlatform.buildRustPackage rec {
pname = "process-viewer";
version = "0.5.8";
src = fetchCrate {
inherit pname version;
hash = "sha256-mEmtLCtHlrCurjKKJ3vEtEkLBik4LwuUED5UeQ1QLws=";
};
cargoHash = "sha256-vmNqay/tYGASSez+VqyCQVMW+JGqfBvjwSKx0AG/LeY=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk4 ];
postInstall = ''
install -Dm644 assets/fr.guillaume_gomez.ProcessViewer.desktop -t $out/share/applications
install -Dm644 assets/fr.guillaume_gomez.ProcessViewer.svg -t $out/share/icons/hicolor/scalable/apps
install -Dm644 assets/fr.guillaume_gomez.ProcessViewer.metainfo.xml -t $out/share/metainfo
'';
meta = with lib; {
description = "Process viewer GUI in rust";
homepage = "https://github.com/guillaumegomez/process-viewer";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "process_viewer";
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/build/build.xml b/build/build.xml
index 8ad556c11..e61b6ae45 100644
--- a/build/build.xml
+++ b/build/build.xml
@@ -453,8 +453,6 @@
<!-- the revision.base property won't be set
if $revision wasn't found... -->
- <fail unless="revision.correct"
- message="Fix revision number in Base.java" />
</target>

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