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,67 @@
{
buildGoModule,
fetchFromGitLab,
fetchzip,
ffmpeg,
installShellFiles,
lib,
makeWrapper,
}:
buildGoModule rec {
pname = "olaris-server";
version = "unstable-2022-06-11";
src = fetchFromGitLab {
owner = "olaris";
repo = "olaris-server";
rev = "bdb2aeb1595c941210249164a97c12404c1ae0d8";
hash = "sha256-Uhnh6GC85ORKnfHeYNtbSA40osuscxXDF5/kXJrF2Cs=";
};
preBuild =
let
olaris-react = fetchzip {
url = "https://gitlab.com/api/v4/projects/olaris%2Folaris-react/jobs/artifacts/v${version}/download?job=build";
extension = "zip";
hash = "sha256-MkxBf/mGvtiOu0e79bMpd9Z/D0eOxhzPE+bKic//viM=";
};
in
''
# cannot build olaris-react https://github.com/NixOS/nixpkgs/issues/203708
cp -r ${olaris-react} react/build
make generate
'';
ldflags = [
"-s"
"-w"
"-X gitlab.com/olaris/olaris-server/helpers.Version=${version}"
];
vendorHash = "sha256-bw8zvDGFBci9bELsxAD0otpNocBnO8aAcgyohLZ3Mv0=";
nativeBuildInputs = [
installShellFiles
makeWrapper
];
# integration tests require network access
doCheck = false;
postInstall = ''
installShellCompletion --cmd olaris-server \
--bash <($out/bin/olaris-server completion bash) \
--fish <($out/bin/olaris-server completion fish) \
--zsh <($out/bin/olaris-server completion zsh)
wrapProgram $out/bin/olaris-server --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
'';
meta = {
description = "Media manager and transcoding server";
homepage = "https://gitlab.com/olaris/olaris-server";
changelog = "https://gitlab.com/olaris/olaris-server/-/releases/v${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ urandom ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation rec {
pname = "oldsindhi";
version = "1.0";
src = fetchurl {
url = "https://github.com/MihailJP/${pname}/releases/download/v${version}/OldSindhi-${version}.tar.xz";
hash = "sha256-jOcl+mo6CJ9Lnn3nAUiXXHCJssovVgLoPrbGxj4uzQs=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype *.ttf
install -m444 -Dt $out/share/doc/${pname}-${version} README *.txt
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/MihailJP/oldsindhi";
description = "Free Sindhi Khudabadi font";
maintainers = with maintainers; [ mathnerd314 ];
license = with licenses; [
mit
ofl
];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "oldstandard";
version = "2.2";
src = fetchzip {
url = "https://github.com/akryukov/oldstand/releases/download/v${version}/${pname}-${version}.otf.zip";
stripRoot = false;
hash = "sha256-cDB5KJm87DK+GczZ3Nmn4l5ejqViswVbwrJ9XbhEh8I=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/opentype *.otf
install -m444 -Dt $out/share/doc/${pname}-${version} FONTLOG.txt
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/akryukov/oldstand";
description = "Attempt to revive a specific type of Modern style of serif typefaces";
maintainers = with maintainers; [ raskin ];
license = licenses.ofl;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,98 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pkg-config,
which,
frei0r,
opencolorio,
ffmpeg_6,
cmake,
openimageio,
openexr,
portaudio,
imath,
qt6,
}:
let
# https://github.com/olive-editor/olive/issues/2284
# we patch support for 2.3+, but 2.5 fails
openimageio' = openimageio.overrideAttrs (old: rec {
version = "2.4.15.0";
src = (
old.src.override {
tag = "v${version}";
hash = "sha256-I2/JPmUBDb0bw7qbSZcAkYHB2q2Uo7En7ZurMwWhg/M=";
}
);
# robin-map headers require c++17
cmakeFlags = (old.cmakeFlags or [ ]) ++ [ (lib.cmakeFeature "CMAKE_CXX_STANDARD" "17") ];
});
in
stdenv.mkDerivation {
pname = "olive-editor";
version = "unstable-2023-06-12";
src = fetchFromGitHub {
fetchSubmodules = true;
owner = "olive-editor";
repo = "olive";
rev = "2036fffffd0e24b7458e724b9084ae99c9507c64";
hash = "sha256-qee9/WTvTy5jWLowvZJOwAjrqznRhJR+u9dYsnCN/Qs=";
};
cmakeFlags = [
"-DBUILD_QT6=1"
];
patches = [
(fetchpatch {
# Taken from https://github.com/olive-editor/olive/pull/2294.
name = "olive-editor-openimageio-2.3-compat.patch";
url = "https://github.com/olive-editor/olive/commit/311eeb72944f93f873d1cd1784ee2bf423e1e7c2.patch";
hash = "sha256-lswWn4DbXGH1qPvPla0jSgUJQXuqU7LQGHIPoXAE8ag=";
})
];
# https://github.com/olive-editor/olive/issues/2200
postPatch = ''
substituteInPlace ./app/node/project/serializer/serializer230220.cpp \
--replace 'QStringRef' 'QStringView'
'';
nativeBuildInputs = [
pkg-config
which
cmake
qt6.wrapQtAppsHook
];
buildInputs = [
ffmpeg_6
frei0r
opencolorio
openimageio'
imath
openexr
portaudio
qt6.qtwayland
qt6.qtmultimedia
qt6.qttools
];
meta = {
description = "Professional open-source NLE video editor";
homepage = "https://www.olivevideoeditor.org/";
downloadPage = "https://www.olivevideoeditor.org/download.php";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ balsoft ];
platforms = lib.platforms.unix;
# never built on aarch64-darwin since first introduction in nixpkgs
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64;
mainProgram = "olive-editor";
};
}

View File

@@ -0,0 +1,145 @@
{
lib,
fetchFromGitHub,
buildGoModule,
stdenvNoCC,
writableTmpDirAsHomeHook,
buf,
protoc-gen-go,
protoc-gen-go-grpc,
grpc-gateway,
buildNpmPackage,
installShellFiles,
versionCheckHook,
nixosTests,
}:
buildGoModule (
finalAttrs:
let
gen = stdenvNoCC.mkDerivation {
pname = "olivetin-gen";
inherit (finalAttrs) version src;
nativeBuildInputs = [
writableTmpDirAsHomeHook
buf
protoc-gen-go
protoc-gen-go-grpc
grpc-gateway
];
buildPhase = ''
runHook preBuild
pushd proto
buf generate
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r service/gen $out
runHook postInstall
'';
postFixup = ''
find $out -type f -name '*.go' -exec \
sed -i -E 's|//.*protoc-gen-go(-grpc)? +v.*$||' {} +
'';
outputHashMode = "recursive";
outputHash = "sha256-wHqXsSV18mF/CfLQ0S4rGtT3QRcLnneYXAa8nXZaHpQ=";
};
webui = buildNpmPackage {
pname = "olivetin-webui";
inherit (finalAttrs) version src;
npmDepsHash = "sha256-a1BBNlGusdMlmDXgclGqkO8AywSd4DTQKkuBVzuzAfE=";
sourceRoot = "${finalAttrs.src.name}/webui.dev";
buildPhase = ''
runHook preBuild
npx parcel build --public-url "."
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
cp -r *.png $out
runHook postInstall
'';
};
in
{
pname = "olivetin";
version = "2025.7.29";
src = fetchFromGitHub {
owner = "OliveTin";
repo = "OliveTin";
tag = finalAttrs.version;
hash = "sha256-QNwPc+qr26S2hl4deLVx58Xh9hkSfZyrxrdaO1NCTDc=";
};
modRoot = "service";
vendorHash = "sha256-1vZCQBc/J3E/QRS8Bkfc1exDZJIn9739/gyPrpQpiHI=";
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
__darwinAllowLocalNetworking = true;
nativeBuildInputs = [ installShellFiles ];
preBuild = ''
ln -s ${gen} gen
substituteInPlace internal/config/config.go \
--replace-fail 'config.WebUIDir = "./webui"' 'config.WebUIDir = "${webui}"'
substituteInPlace internal/httpservers/webuiServer_test.go \
--replace-fail '"../webui/"' '"${webui}"'
'';
postInstall = ''
installManPage ../var/manpage/OliveTin.1.gz
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/OliveTin";
versionCheckProgramArg = "-version";
doInstallCheck = true;
passthru = {
inherit gen webui;
tests = { inherit (nixosTests) olivetin; };
updateScript = ./update.sh;
};
meta = {
description = "Gives safe and simple access to predefined shell commands from a web interface";
homepage = "https://www.olivetin.app/";
downloadPage = "https://github.com/OliveTin/OliveTin";
changelog = "https://github.com/OliveTin/OliveTin/releases/tag/${finalAttrs.version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ defelo ];
mainProgram = "OliveTin";
};
}
)

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update common-updater-scripts
set -euo pipefail
nix-update olivetin --src-only
update-source-version olivetin --source-key=gen --ignore-same-version
update-source-version olivetin --source-key=webui.npmDeps --ignore-same-version
update-source-version olivetin --source-key=goModules --ignore-same-version

View File

@@ -0,0 +1,273 @@
{
lib,
buildGoModule,
fetchFromGitHub,
buildEnv,
linkFarm,
makeWrapper,
stdenv,
addDriverRunpath,
nix-update-script,
cmake,
gitMinimal,
clblast,
libdrm,
rocmPackages,
rocmGpuTargets ? rocmPackages.clr.localGpuTargets or (rocmPackages.clr.gpuTargets or [ ]),
cudaPackages,
cudaArches ? cudaPackages.flags.realArches or [ ],
autoAddDriverRunpath,
apple-sdk_15,
# passthru
nixosTests,
testers,
ollama,
ollama-rocm,
ollama-cuda,
config,
# one of `[ null false "rocm" "cuda" ]`
acceleration ? null,
}:
assert builtins.elem acceleration [
null
false
"rocm"
"cuda"
];
let
validateFallback = lib.warnIf (config.rocmSupport && config.cudaSupport) (lib.concatStrings [
"both `nixpkgs.config.rocmSupport` and `nixpkgs.config.cudaSupport` are enabled, "
"but they are mutually exclusive; falling back to cpu"
]) (!(config.rocmSupport && config.cudaSupport));
shouldEnable =
mode: fallback: (acceleration == mode) || (fallback && acceleration == null && validateFallback);
rocmRequested = shouldEnable "rocm" config.rocmSupport;
cudaRequested = shouldEnable "cuda" config.cudaSupport;
enableRocm = rocmRequested && stdenv.hostPlatform.isLinux;
enableCuda = cudaRequested && stdenv.hostPlatform.isLinux;
rocmLibs = [
rocmPackages.clr
rocmPackages.hipblas-common
rocmPackages.hipblas
rocmPackages.rocblas
rocmPackages.rocsolver
rocmPackages.rocsparse
rocmPackages.rocm-device-libs
rocmPackages.rocm-smi
];
rocmPath = buildEnv {
name = "rocm-path";
paths = rocmLibs;
};
cudaLibs = [
cudaPackages.cuda_cudart
cudaPackages.libcublas
cudaPackages.cuda_cccl
];
# Extract the major version of CUDA. e.g. 11 12
cudaMajorVersion = lib.versions.major cudaPackages.cuda_cudart.version;
cudaToolkit = buildEnv {
# ollama hardcodes the major version in the Makefile to support different variants.
# - https://github.com/ollama/ollama/blob/v0.4.4/llama/Makefile#L17-L18
name = "cuda-merged-${cudaMajorVersion}";
paths = map lib.getLib cudaLibs ++ [
(lib.getOutput "static" cudaPackages.cuda_cudart)
(lib.getBin (cudaPackages.cuda_nvcc.__spliced.buildHost or cudaPackages.cuda_nvcc))
];
};
cudaPath = lib.removeSuffix "-${cudaMajorVersion}" cudaToolkit;
wrapperOptions = [
# ollama embeds llama-cpp binaries which actually run the ai models
# these llama-cpp binaries are unaffected by the ollama binary's DT_RUNPATH
# LD_LIBRARY_PATH is temporarily required to use the gpu
# until these llama-cpp binaries can have their runpath patched
"--suffix LD_LIBRARY_PATH : '${addDriverRunpath.driverLink}/lib'"
]
++ lib.optionals enableRocm [
"--suffix LD_LIBRARY_PATH : '${rocmPath}/lib'"
"--set-default HIP_PATH '${rocmPath}'"
]
++ lib.optionals enableCuda [
"--suffix LD_LIBRARY_PATH : '${lib.makeLibraryPath (map lib.getLib cudaLibs)}'"
];
wrapperArgs = builtins.concatStringsSep " " wrapperOptions;
goBuild =
if enableCuda then
buildGoModule.override { stdenv = cudaPackages.backendStdenv; }
else if enableRocm then
buildGoModule.override { stdenv = rocmPackages.stdenv; }
else
buildGoModule;
inherit (lib) licenses platforms maintainers;
in
goBuild (finalAttrs: {
pname = "ollama";
# don't forget to invalidate all hashes each update
version = "0.12.3";
src = fetchFromGitHub {
owner = "ollama";
repo = "ollama";
tag = "v${finalAttrs.version}";
hash = "sha256-ooDGwTklGJ/wzDlAY3uJiqpZUxT1cCsqVNJKU8BAPbQ=";
};
vendorHash = "sha256-SlaDsu001TUW+t9WRp7LqxUSQSGDF1Lqu9M1bgILoX4=";
env =
lib.optionalAttrs enableRocm {
ROCM_PATH = rocmPath;
CLBlast_DIR = "${clblast}/lib/cmake/CLBlast";
HIP_PATH = rocmPath;
CFLAGS = "-Wno-c++17-extensions -I${rocmPath}/include";
CXXFLAGS = "-Wno-c++17-extensions -I${rocmPath}/include";
}
// lib.optionalAttrs enableCuda { CUDA_PATH = cudaPath; };
nativeBuildInputs = [
cmake
gitMinimal
]
++ lib.optionals enableRocm [
rocmPackages.llvm.bintools
rocmLibs
]
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ]
++ lib.optionals (enableRocm || enableCuda) [
makeWrapper
autoAddDriverRunpath
];
buildInputs =
lib.optionals enableRocm (rocmLibs ++ [ libdrm ])
++ lib.optionals enableCuda cudaLibs
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ];
# replace inaccurate version number with actual release version
postPatch = ''
substituteInPlace version/version.go \
--replace-fail 0.0.0 '${finalAttrs.version}'
'';
overrideModAttrs = (
finalAttrs: prevAttrs: {
# don't run llama.cpp build in the module fetch phase
preBuild = "";
}
);
preBuild =
let
removeSMPrefix =
str:
let
matched = builtins.match "sm_(.*)" str;
in
if matched == null then str else builtins.head matched;
cudaArchitectures = builtins.concatStringsSep ";" (map removeSMPrefix cudaArches);
rocmTargets = builtins.concatStringsSep ";" rocmGpuTargets;
cmakeFlagsCudaArchitectures = lib.optionalString enableCuda "-DCMAKE_CUDA_ARCHITECTURES='${cudaArchitectures}'";
cmakeFlagsRocmTargets = lib.optionalString enableRocm "-DAMDGPU_TARGETS='${rocmTargets}'";
in
''
cmake -B build \
-DCMAKE_SKIP_BUILD_RPATH=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
${cmakeFlagsCudaArchitectures} \
${cmakeFlagsRocmTargets} \
cmake --build build -j $NIX_BUILD_CORES
'';
# ollama looks for acceleration libs in ../lib/ollama/ (now also for CPU-only with arch specific optimizations)
# https://github.com/ollama/ollama/blob/v0.5.11/docs/development.md#library-detection
postInstall = ''
mkdir -p $out/lib
cp -r build/lib/ollama $out/lib/
'';
postFixup =
# the app doesn't appear functional at the moment, so hide it
''
mv "$out/bin/app" "$out/bin/.ollama-app"
''
# expose runtime libraries necessary to use the gpu
+ lib.optionalString (enableRocm || enableCuda) ''
wrapProgram "$out/bin/ollama" ${wrapperArgs}
'';
ldflags = [
"-s"
"-w"
"-X=github.com/ollama/ollama/version.Version=${finalAttrs.version}"
"-X=github.com/ollama/ollama/server.mode=release"
];
__darwinAllowLocalNetworking = true;
# required for github.com/ollama/ollama/detect's tests
sandboxProfile = lib.optionalString stdenv.hostPlatform.isDarwin ''
(allow file-read* (subpath "/System/Library/Extensions"))
(allow iokit-open (iokit-user-client-class "AGXDeviceUserClient"))
'';
checkFlags =
let
# Skip tests that require network access
skippedTests = [
"TestPushHandler/unauthorized_push" # Writes to $HOME, se https://github.com/ollama/ollama/pull/12307#pullrequestreview-3249128660
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
passthru = {
tests = {
inherit ollama;
version = testers.testVersion {
inherit (finalAttrs) version;
package = ollama;
};
}
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
inherit ollama-rocm ollama-cuda;
service = nixosTests.ollama;
service-cuda = nixosTests.ollama-cuda;
service-rocm = nixosTests.ollama-rocm;
};
}
// lib.optionalAttrs (!enableRocm && !enableCuda) { updateScript = nix-update-script { }; };
meta = {
description =
"Get up and running with large language models locally"
+ lib.optionalString rocmRequested ", using ROCm for AMD GPU acceleration"
+ lib.optionalString cudaRequested ", using CUDA for NVIDIA GPU acceleration";
homepage = "https://github.com/ollama/ollama";
changelog = "https://github.com/ollama/ollama/releases/tag/v${finalAttrs.version}";
license = licenses.mit;
platforms = if (rocmRequested || cudaRequested) then platforms.linux else platforms.unix;
mainProgram = "ollama";
maintainers = with maintainers; [
abysssol
dit7ya
prusnak
];
};
})

View File

@@ -0,0 +1,98 @@
{
lib,
stdenv,
fetchFromGitLab,
cmake,
}:
stdenv.mkDerivation rec {
pname = "olm";
version = "3.2.16";
src = fetchFromGitLab {
domain = "gitlab.matrix.org";
owner = "matrix-org";
repo = "olm";
rev = version;
sha256 = "sha256-JX20mpuLO+UoNc8iQlXEHAbH9sfblkBbM1gE27Ve0ac=";
};
nativeBuildInputs = [ cmake ];
doCheck = true;
postPatch = ''
substituteInPlace olm.pc.in \
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
substituteInPlace CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 3.4)' \
'cmake_minimum_required(VERSION 3.10)'
''
# Clang 19 has become more strict about assigning to const variables
# Patch from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281497
+ lib.optionalString (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "19") ''
substituteInPlace include/olm/list.hh \
--replace-fail "T * const other_pos = other._data;" "T const * other_pos = other._data;"
'';
meta = with lib; {
description = "Implements double cryptographic ratchet and Megolm ratchet";
homepage = "https://gitlab.matrix.org/matrix-org/olm";
license = licenses.asl20;
maintainers = with maintainers; [
tilpner
oxzi
];
knownVulnerabilities = [
''
The libolm endtoend encryption library used in many Matrix
clients and Jitsi Meet has been deprecated upstream, and relies
on a cryptography library that has known sidechannel issues and
disclaims that its implementations are not cryptographically secure
and should not be used when cryptographic security is required.
It is not known if the issues can be exploited over the network in
practical conditions. Upstream does not believe such an attack is
feasible, but has stated that the library should not be used going
forward, and there are no plans to move to another cryptography
implementation or otherwise further maintain the library at all.
You should make an informed decision about whether to override this
security warning, especially if you critically rely on endtoend
encryption. If you dont care about that, or dont use the Matrix
functionality of a multiprotocol client depending on libolm,
then there should be no additional risk.
Some clients are investigating migrating away from libolm to maintained
libraries without known vulnerabilities.
For further information, see:
* The CVE records for the known vulnerabilities:
* CVE-2024-45191
* CVE-2024-45192
* CVE-2024-45193
* The libolm deprecation notice:
<https://gitlab.matrix.org/matrix-org/olm/-/blob/6d4b5b07887821a95b144091c8497d09d377f985/README.md#important-libolm-is-now-deprecated>
* The warning from the cryptography code used by libolm:
<https://gitlab.matrix.org/matrix-org/olm/-/blob/6d4b5b07887821a95b144091c8497d09d377f985/lib/crypto-algorithms/README.md>
* The blog post disclosing the details of the known vulnerabilities:
<https://soatok.blog/2024/08/14/security-issues-in-matrixs-olm-library/>
* The statement about the deprecation and vulnerabilities from the
Matrix.org Foundation:
<https://matrix.org/blog/2024/08/libolm-deprecation/>
* A (likely incomplete) aggregation of client tracking issue links:
<https://github.com/NixOS/nixpkgs/pull/334638#issuecomment-2289025802>
''
];
};
}

View File

@@ -0,0 +1,60 @@
{
fetchFromGitHub,
lib,
makeBinaryWrapper,
odin,
stdenv,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "ols";
version = "0-unstable-2025-09-19";
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
rev = "7ff84eb0b24912db1b3f3b0cff323e1728f47b0b";
hash = "sha256-aKyVZARXFMBa0kbI4yeqPZIFHmPCKUy1WPr33aIHbQI=";
};
postPatch = ''
substituteInPlace build.sh \
--replace-fail "-microarch:native" ""
patchShebangs build.sh odinfmt.sh
'';
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ odin ];
buildPhase = ''
runHook preBuild
./build.sh && ./odinfmt.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 ols odinfmt -t $out/bin/
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
meta = {
inherit (odin.meta) platforms;
description = "Language server for the Odin programming language";
homepage = "https://github.com/DanielGavin/ols";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
astavie
];
mainProgram = "ols";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
bison,
flex,
}:
stdenv.mkDerivation rec {
pname = "olsrd";
version = "0.9.8";
src = fetchFromGitHub {
owner = "OLSR";
repo = "olsrd";
rev = "v${version}";
sha256 = "1xk355dm5pfjil1j4m724vkdnc178lv6hi6s1g0xgpd59avbx90j";
};
patches = [
# remove if there's ever an upstream release that incorporates
# https://github.com/OLSR/olsrd/pull/87
(fetchpatch {
url = "https://raw.githubusercontent.com/openwrt-routing/packages/b3897386771890ba1b15f672c2fed58630beedef/olsrd/patches/011-bison.patch";
sha256 = "04cl4b8dpr1yjs7wa94jcszmkdzpnrn719a5m9nhm7lvfrn1rzd0";
})
];
buildInputs = [
bison
flex
];
preConfigure = ''
makeFlags="prefix=$out ETCDIR=$out/etc"
'';
meta = {
description = "Adhoc wireless mesh routing daemon";
license = lib.licenses.bsd3;
homepage = "http://olsr.org/";
maintainers = [ ];
platforms = with lib.platforms; linux;
};
}

View File

@@ -0,0 +1,117 @@
{
stdenv,
lib,
fetchurl,
zlib,
libXext,
libX11,
libXrender,
libXtst,
libXi,
freetype,
alsa-lib,
jdk21,
openjfx21,
autoPatchelfHook,
makeBinaryWrapper,
wrapGAppsHook3,
}:
let
repo = "olvid";
javafxModules = [
"swing"
"controls"
"media"
"fxml"
"graphics"
"base"
];
classpath =
lib.concatMap (mod: [
"${openjfx21}/modules_src/javafx.${mod}/module-info.java"
"${openjfx21}/modules/javafx.${mod}"
"${openjfx21}/modules_libs/javafx.${mod}"
]) javafxModules
++ [ "$out/share/${repo}/*" ];
jvmArgs = [
"-cp"
(lib.concatStringsSep ":" classpath)
"-Djpackage.app-version=$version"
"-Dolvid.sqlcipher=true"
"-Dolvid.dev=false"
"-Dolvid.packaged=true"
"-Dolvid.multiuser=false"
"-Dolvid.debug=false"
"-Dolvid.version=$version"
"-Djava.net.useSystemProxies=true"
"-Djava.library.path=$out/lib/"
"-Xss8M"
"-XX:+ShowCodeDetailsInExceptionMessages"
"--add-opens=java.desktop/java.awt=ALL-UNNAMED"
"--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED"
"--add-opens=java.desktop/sun.awt.geom=ALL-UNNAMED"
"--add-opens=java.base/java.util=ALL-UNNAMED"
"--add-opens=java.desktop/javax.swing=ALL-UNNAMED"
"--add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED"
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "olvid";
version = "2.5.1";
dontUnpack = true;
dontWrapGApps = true;
src = fetchurl {
url = "https://static.olvid.io/linux/${repo}-${finalAttrs.version}.tar.gz";
hash = "sha256-6QEr9mB9UI+rgrG4QxxBs5hOT26Yxcmjwode+pRwYfU=";
};
nativeBuildInputs = [
autoPatchelfHook
makeBinaryWrapper
wrapGAppsHook3
];
buildInputs = [
zlib
libXext
libX11
libXrender
libXtst
libXi
freetype
alsa-lib
];
installPhase = ''
runHook preInstall
install -dm755 "$out/share/${repo}"
tar -xf "$src" -C "$out/share/${repo}" --wildcards --strip-components 3 olvid/lib/app/'*.jar'
install -dm755 "$out/lib"
tar -xf "$src" -C "$out/lib" --strip-components 4 olvid/lib/runtime/lib/
install -dm755 "$out/bin"
makeBinaryWrapper ${jdk21}/bin/java $out/bin/${repo} \
"''${gappsWrapperArgs[@]}" \
--add-flags "${lib.concatStringsSep " " jvmArgs} io.olvid.windows.messenger.start_up.Launcher"
runHook postInstall
'';
meta = with lib; {
description = "Secure french messenger";
homepage = "https://www.olvid.io";
license = licenses.agpl3Only;
mainProgram = "olvid";
maintainers = with maintainers; [ rookeur ];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,317 @@
[
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.1.0",
"hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM="
},
{
"pname": "Microsoft.NETCore.Targets",
"version": "1.1.0",
"hash": "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ="
},
{
"pname": "Mono.Cecil",
"version": "0.11.4",
"hash": "sha256-HrnRgFsOzfqAWw0fUxi/vkzZd8dMn5zueUeLQWA9qvs="
},
{
"pname": "MonoMod",
"version": "22.1.4.3",
"hash": "sha256-kindD5YUjBWsopvEnmOL4XsldgwE1zRrmMxIh6nDua8="
},
{
"pname": "MonoMod.RuntimeDetour",
"version": "22.1.4.3",
"hash": "sha256-m7FN3SGME4GRGuc7l5ClCT9W3mXqbbhAJHHpWwYqLi8="
},
{
"pname": "MonoMod.RuntimeDetour.HookGen",
"version": "22.1.4.3",
"hash": "sha256-DuOnuXQcS63Z/y5s3q5FHZiqWTPgayNpylkzRzl6pE4="
},
{
"pname": "MonoMod.Utils",
"version": "22.1.4.3",
"hash": "sha256-0KyqozOCC26+z5+Ah35iFvRwrPXvvxDlEq6gLl5lPNU="
},
{
"pname": "Newtonsoft.Json",
"version": "13.0.1",
"hash": "sha256-K2tSVW4n4beRPzPu3rlVaBEMdGvWSv/3Q1fxaDh4Mjo="
},
{
"pname": "runtime.any.System.Collections",
"version": "4.3.0",
"hash": "sha256-4PGZqyWhZ6/HCTF2KddDsbmTTjxs2oW79YfkberDZS8="
},
{
"pname": "runtime.any.System.Globalization",
"version": "4.3.0",
"hash": "sha256-PaiITTFI2FfPylTEk7DwzfKeiA/g/aooSU1pDcdwWLU="
},
{
"pname": "runtime.any.System.IO",
"version": "4.3.0",
"hash": "sha256-vej7ySRhyvM3pYh/ITMdC25ivSd0WLZAaIQbYj/6HVE="
},
{
"pname": "runtime.any.System.Reflection",
"version": "4.3.0",
"hash": "sha256-ns6f++lSA+bi1xXgmW1JkWFb2NaMD+w+YNTfMvyAiQk="
},
{
"pname": "runtime.any.System.Reflection.Extensions",
"version": "4.3.0",
"hash": "sha256-Y2AnhOcJwJVYv7Rp6Jz6ma0fpITFqJW+8rsw106K2X8="
},
{
"pname": "runtime.any.System.Reflection.Primitives",
"version": "4.3.0",
"hash": "sha256-LkPXtiDQM3BcdYkAm5uSNOiz3uF4J45qpxn5aBiqNXQ="
},
{
"pname": "runtime.any.System.Resources.ResourceManager",
"version": "4.3.0",
"hash": "sha256-9EvnmZslLgLLhJ00o5MWaPuJQlbUFcUF8itGQNVkcQ4="
},
{
"pname": "runtime.any.System.Runtime",
"version": "4.3.0",
"hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM="
},
{
"pname": "runtime.any.System.Runtime.Handles",
"version": "4.3.0",
"hash": "sha256-PQRACwnSUuxgVySO1840KvqCC9F8iI9iTzxNW0RcBS4="
},
{
"pname": "runtime.any.System.Runtime.InteropServices",
"version": "4.3.0",
"hash": "sha256-Kaw5PnLYIiqWbsoF3VKJhy7pkpoGsUwn4ZDCKscbbzA="
},
{
"pname": "runtime.any.System.Text.Encoding",
"version": "4.3.0",
"hash": "sha256-Q18B9q26MkWZx68exUfQT30+0PGmpFlDgaF0TnaIGCs="
},
{
"pname": "runtime.any.System.Threading.Tasks",
"version": "4.3.0",
"hash": "sha256-agdOM0NXupfHbKAQzQT8XgbI9B8hVEh+a/2vqeHctg4="
},
{
"pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-LXUPLX3DJxsU1Pd3UwjO1PO9NM2elNEDXeu2Mu/vNps="
},
{
"pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-qeSqaUI80+lqw5MK4vMpmO0CZaqrmYktwp6L+vQAb0I="
},
{
"pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-SrHqT9wrCBsxILWtaJgGKd6Odmxm8/Mh7Kh0CUkZVzA="
},
{
"pname": "runtime.native.System",
"version": "4.3.0",
"hash": "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y="
},
{
"pname": "runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-Jy01KhtcCl2wjMpZWH+X3fhHcVn+SyllWFY8zWlz/6I="
},
{
"pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-wyv00gdlqf8ckxEdV7E+Ql9hJIoPcmYEuyeWb5Oz3mM="
},
{
"pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-zi+b4sCFrA9QBiSGDD7xPV27r3iHGlV99gpyVUjRmc4="
},
{
"pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-gybQU6mPgaWV3rBG2dbH6tT3tBq8mgze3PROdsuWnX0="
},
{
"pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-VsP72GVveWnGUvS/vjOQLv1U80H2K8nZ4fDAmI61Hm4="
},
{
"pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-4yKGa/IrNCKuQ3zaDzILdNPD32bNdy6xr5gdJigyF5g="
},
{
"pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-HmdJhhRsiVoOOCcUvAwdjpMRiyuSwdcgEv2j9hxi+Zc="
},
{
"pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-pVFUKuPPIx0edQKjzRon3zKq8zhzHEzko/lc01V/jdw="
},
{
"pname": "runtime.unix.System.Diagnostics.Debug",
"version": "4.3.0",
"hash": "sha256-ReoazscfbGH+R6s6jkg5sIEHWNEvjEoHtIsMbpc7+tI="
},
{
"pname": "runtime.unix.System.Private.Uri",
"version": "4.3.0",
"hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs="
},
{
"pname": "runtime.unix.System.Runtime.Extensions",
"version": "4.3.0",
"hash": "sha256-l8S9gt6dk3qYG6HYonHtdlYtBKyPb29uQ6NDjmrt3V4="
},
{
"pname": "System.Collections",
"version": "4.3.0",
"hash": "sha256-afY7VUtD6w/5mYqrce8kQrvDIfS2GXDINDh73IjxJKc="
},
{
"pname": "System.Collections.NonGeneric",
"version": "4.3.0",
"hash": "sha256-8/yZmD4jjvq7m68SPkJZLBQ79jOTOyT5lyzX4SCYAx8="
},
{
"pname": "System.Collections.Specialized",
"version": "4.3.0",
"hash": "sha256-QNg0JJNx+zXMQ26MJRPzH7THdtqjrNtGLUgaR1SdvOk="
},
{
"pname": "System.ComponentModel",
"version": "4.3.0",
"hash": "sha256-i00uujMO4JEDIEPKLmdLY3QJ6vdSpw6Gh9oOzkFYBiU="
},
{
"pname": "System.ComponentModel.Primitives",
"version": "4.3.0",
"hash": "sha256-IOMJleuIBppmP4ECB3uftbdcgL7CCd56+oAD/Sqrbus="
},
{
"pname": "System.ComponentModel.TypeConverter",
"version": "4.3.0",
"hash": "sha256-PSDiPYt8PgTdTUBz+GH6lHCaM1YgfObneHnZsc8Fz54="
},
{
"pname": "System.Diagnostics.Debug",
"version": "4.3.0",
"hash": "sha256-fkA79SjPbSeiEcrbbUsb70u9B7wqbsdM9s1LnoKj0gM="
},
{
"pname": "System.Globalization",
"version": "4.3.0",
"hash": "sha256-caL0pRmFSEsaoeZeWN5BTQtGrAtaQPwFi8YOZPZG5rI="
},
{
"pname": "System.Globalization.Extensions",
"version": "4.3.0",
"hash": "sha256-mmJWA27T0GRVuFP9/sj+4TrR4GJWrzNIk2PDrbr7RQk="
},
{
"pname": "System.IO",
"version": "4.3.0",
"hash": "sha256-ruynQHekFP5wPrDiVyhNiRIXeZ/I9NpjK5pU+HPDiRY="
},
{
"pname": "System.IO.FileSystem.Primitives",
"version": "4.3.0",
"hash": "sha256-LMnfg8Vwavs9cMnq9nNH8IWtAtSfk0/Fy4s4Rt9r1kg="
},
{
"pname": "System.Linq",
"version": "4.3.0",
"hash": "sha256-R5uiSL3l6a3XrXSSL6jz+q/PcyVQzEAByiuXZNSqD/A="
},
{
"pname": "System.Private.Uri",
"version": "4.3.0",
"hash": "sha256-fVfgcoP4AVN1E5wHZbKBIOPYZ/xBeSIdsNF+bdukIRM="
},
{
"pname": "System.Reflection",
"version": "4.3.0",
"hash": "sha256-NQSZRpZLvtPWDlvmMIdGxcVuyUnw92ZURo0hXsEshXY="
},
{
"pname": "System.Reflection.Emit.ILGeneration",
"version": "4.7.0",
"hash": "sha256-GUnQeGo/DtvZVQpFnESGq7lJcjB30/KnDY7Kd2G/ElE="
},
{
"pname": "System.Reflection.Emit.Lightweight",
"version": "4.7.0",
"hash": "sha256-V0Wz/UUoNIHdTGS9e1TR89u58zJjo/wPUWw6VaVyclU="
},
{
"pname": "System.Reflection.Extensions",
"version": "4.3.0",
"hash": "sha256-mMOCYzUenjd4rWIfq7zIX9PFYk/daUyF0A8l1hbydAk="
},
{
"pname": "System.Reflection.Primitives",
"version": "4.3.0",
"hash": "sha256-5ogwWB4vlQTl3jjk1xjniG2ozbFIjZTL9ug0usZQuBM="
},
{
"pname": "System.Reflection.TypeExtensions",
"version": "4.7.0",
"hash": "sha256-GEtCGXwtOnkYejSV+Tfl+DqyGq5jTUaVyL9eMupMHBM="
},
{
"pname": "System.Resources.ResourceManager",
"version": "4.3.0",
"hash": "sha256-idiOD93xbbrbwwSnD4mORA9RYi/D/U48eRUsn/WnWGo="
},
{
"pname": "System.Runtime",
"version": "4.3.0",
"hash": "sha256-51813WXpBIsuA6fUtE5XaRQjcWdQ2/lmEokJt97u0Rg="
},
{
"pname": "System.Runtime.Extensions",
"version": "4.3.0",
"hash": "sha256-wLDHmozr84v1W2zYCWYxxj0FR0JDYHSVRaRuDm0bd/o="
},
{
"pname": "System.Runtime.Handles",
"version": "4.3.0",
"hash": "sha256-KJ5aXoGpB56Y6+iepBkdpx/AfaJDAitx4vrkLqR7gms="
},
{
"pname": "System.Runtime.InteropServices",
"version": "4.3.0",
"hash": "sha256-8sDH+WUJfCR+7e4nfpftj/+lstEiZixWUBueR2zmHgI="
},
{
"pname": "System.Text.Encoding",
"version": "4.3.0",
"hash": "sha256-GctHVGLZAa/rqkBNhsBGnsiWdKyv6VDubYpGkuOkBLg="
},
{
"pname": "System.Threading",
"version": "4.3.0",
"hash": "sha256-ZDQ3dR4pzVwmaqBg4hacZaVenQ/3yAF/uV7BXZXjiWc="
},
{
"pname": "System.Threading.Tasks",
"version": "4.3.0",
"hash": "sha256-Z5rXfJ1EXp3G32IKZGiZ6koMjRu0n8C1NGrwpdIen4w="
},
{
"pname": "YamlDotNet",
"version": "9.1.0",
"hash": "sha256-WbMPOLkbyN+SdMrBYuaXV2qKB+bLTV+6RdSFSy/iljk="
}
]

View File

@@ -0,0 +1,106 @@
{
lib,
fetchFromGitHub,
fetchzip,
buildDotnetModule,
dotnetCorePackages,
luajitPackages,
sqlite,
libarchive,
curl,
love,
xdg-utils,
}:
let
lua_cpath =
with luajitPackages;
lib.concatMapStringsSep ";" getLuaCPath [
(buildLuarocksPackage {
pname = "lsqlite3";
version = "0.9.6-1";
src = fetchzip {
url = "http://lua.sqlite.org/home/zip/lsqlite3_v096.zip";
hash = "sha256-Mq409A3X9/OS7IPI/KlULR6ZihqnYKk/mS/W/2yrGBg=";
};
buildInputs = [ sqlite.dev ];
})
lua-subprocess
nfd
];
phome = "$out/lib/olympus";
# The following variables are to be updated by the update script.
version = "25.09.30.01";
buildId = "5195"; # IMPORTANT: This line is matched with regex in update.sh.
rev = "f377dc2703a08b0871208a56a87b1796bf41b50d";
in
buildDotnetModule {
pname = "olympus-unwrapped";
inherit version;
src = fetchFromGitHub {
inherit rev;
owner = "EverestAPI";
repo = "Olympus";
fetchSubmodules = true; # Required. See upstream's README.
hash = "sha256-eE7DU4hUlawza7Q0CD3U7QQrw4T8RnT0todJz6UIZlM=";
};
nativeBuildInputs = [
libarchive # To create the .love file (zip format).
];
nugetDeps = ./deps.json;
projectFile = "sharp/Olympus.Sharp.csproj";
executables = [ ];
installPath = "${placeholder "out"}/lib/olympus/sharp";
# See the 'Dist: Update src/version.txt' step in azure-pipelines.yml from upstream.
preConfigure = ''
echo ${version}-nixos-${buildId}-${builtins.substring 0 5 rev} > src/version.txt
'';
# The script find-love is hacked to use love from nixpkgs.
# It is used to launch Loenn from Olympus.
# I assume --fused is so saves are properly made (https://love2d.org/wiki/love.filesystem).
preInstall = ''
mkdir -p ${phome}
makeWrapper ${lib.getExe love} ${phome}/find-love \
--add-flags "--fused"
install -Dm755 suppress-output.sh ${phome}/suppress-output
mkdir -p $out/bin
makeWrapper ${phome}/find-love $out/bin/olympus \
--prefix LUA_CPATH ";" "${lua_cpath}" \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ curl ]}" \
--suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
--add-flags ${phome}/olympus.love \
--set DOTNET_ROOT ${dotnetCorePackages.runtime_8_0}/share/dotnet
bsdtar --format zip --strip-components 1 -cf ${phome}/olympus.love src
'';
postInstall = ''
install -Dm644 lib-linux/olympus.desktop $out/share/applications/olympus.desktop
install -Dm644 src/data/icon.png $out/share/icons/hicolor/128x128/apps/olympus.png
install -Dm644 LICENSE $out/share/licenses/olympus/LICENSE
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Cross-platform GUI Everest installer and Celeste mod manager";
homepage = "https://github.com/EverestAPI/Olympus";
downloadPage = "https://everestapi.github.io/#olympus";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
ulysseszhan
petingoso
];
mainProgram = "olympus";
platforms = lib.platforms.unix;
badPlatforms = lib.platforms.aarch; # Celeste doesn't support aarch in the first place
};
}

View File

@@ -0,0 +1,32 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eu -o pipefail
attr=olympus-unwrapped
nix_file=$(nix-instantiate --eval --strict -A "$attr.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
api() {
curl -s "https://dev.azure.com/EverestAPI/Olympus/_apis/$1?api-version=7.1"
}
pipeline_id=$(api pipelines | jq -r '
.value
| map(select(.name == "EverestAPI.Olympus"))
| .[0].id
')
run_id=$(api pipelines/$pipeline_id/runs | jq -r '
.value
| map(select(.result == "succeeded"))
| max_by(.finishedDate)
| .id
')
sed -i 's|buildId\s*=\s*".*";|buildId = "'$run_id'";|' $nix_file
run=$(api pipelines/$pipeline_id/runs/$run_id)
commit=$(echo "$run" | jq -r '.resources.repositories.self.version')
version=$(echo "$run" | jq -r '.name')
update-source-version $attr $version --rev=$commit
"$(nix-build --attr $attr.fetch-deps --no-out-link)"

View File

@@ -0,0 +1,79 @@
{
lib,
makeWrapper,
olympus-unwrapped,
symlinkJoin,
buildFHSEnv,
writeShellScript,
# These need overriding if you launch Celeste/Loenn/MiniInstaller from Olympus.
# Some examples:
# - null: Use default wrapper.
# - "": Do not use wrapper.
# - steam-run: Use steam-run.
# - "steam-run": Use steam-run command available from PATH.
# - writeShellScriptBin { ... }: Use a custom script.
# - ./my-wrapper.sh: Use a custom script.
# In any case, it can be overridden at runtime by OLYMPUS_{CELESTE,LOENN,MINIINSTALLER}_WRAPPER.
celesteWrapper ? null,
loennWrapper ? null,
miniinstallerWrapper ? null,
skipHandlerCheck ? false, # whether to skip olympus xdg-mime check, true will override it
finderHints ? [ ],
}:
let
wrapper-to-env =
wrapper:
if lib.isDerivation wrapper then
lib.getExe wrapper
else if wrapper != null then
wrapper
else
"";
# When installing Everest, Olympus uses MiniInstaller, which is dynamically linked.
miniinstaller-fhs = buildFHSEnv {
pname = "olympus-miniinstaller-fhs";
version = "1.0.0"; # remains constant, just to prevent complains
targetPkgs =
pkgs:
(with pkgs; [
icu
openssl
dotnet-runtime # Without this, MiniInstaller will install dotnet itself.
]);
};
miniinstaller-wrapper =
if miniinstallerWrapper == null then
(writeShellScript "miniinstaller-wrapper" "exec ${lib.getExe miniinstaller-fhs} -c \"$@\"")
else
(wrapper-to-env miniinstallerWrapper);
finderHints' =
if lib.isList finderHints then
lib.concatMapStringsSep ":" (hint: "${hint}") finderHints
else
"${finderHints}";
in
symlinkJoin {
inherit (olympus-unwrapped) version meta;
pname = "olympus";
paths = [
olympus-unwrapped
];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/olympus \
--set-default OLYMPUS_CELESTE_WRAPPER "${wrapper-to-env celesteWrapper}" \
--set-default OLYMPUS_LOENN_WRAPPER "${wrapper-to-env loennWrapper}" \
--set-default OLYMPUS_MINIINSTALLER_WRAPPER "${miniinstaller-wrapper}" \
--set-default OLYMPUS_SKIP_SCHEME_HANDLER_CHECK "${if skipHandlerCheck then "1" else "0"}" \
--suffix OLYMPUS_FINDER_HINTS : "${finderHints'}"
'';
}