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,34 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation {
pname = "quadprogpp";
version = "unstable-2023-01-20";
src = fetchFromGitHub {
owner = "liuq";
repo = "QuadProgpp";
rev = "4c51d91deb5af251957edf9454bfb74279a4544e";
hash = "sha256-uozwuTAOPsRwYM9KyG3V0hwcmaPpfZPID9Wdd4olsvY=";
};
nativeBuildInputs = [
cmake
];
meta = with lib; {
description = "C++ library for Quadratic Programming";
longDescription = ''
QuadProg++ is a C++ library for Quadratic Programming which implements
the Goldfarb-Idnani active-set dual method.
'';
homepage = "https://github.com/liuq/QuadProgpp";
license = licenses.mit;
maintainers = with maintainers; [ wegank ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,54 @@
{
stdenv,
lib,
fetchFromGitHub,
boost,
cairo,
lv2,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "quadrafuzz";
version = "0.1.1";
src = fetchFromGitHub {
owner = "jpcima";
repo = "quadrafuzz";
tag = "v${version}";
sha256 = "1kjsf7il9krihwlrq08gk2xvil4b4q5zd87nnm103hby2w7ws7z1";
fetchSubmodules = true;
};
postPatch = ''
patchShebangs ./dpf/utils/generate-ttl.sh
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
boost
cairo
lv2
];
makeFlags = [
"PREFIX=$(out)"
];
installPhase = ''
runHook preInstall
mkdir -p $out/lib/lv2
cp -r bin/quadrafuzz.lv2/ $out/lib/lv2
runHook postInstall
'';
meta = with lib; {
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
homepage = "https://github.com/jpcima/quadrafuzz";
description = "Multi-band fuzz distortion plugin";
maintainers = [ maintainers.magnetophon ];
platforms = platforms.linux;
license = licenses.gpl3Plus;
};
}

View File

@@ -0,0 +1,73 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
gtk3,
gnome,
adwaita-icon-theme,
gdk-pixbuf,
librsvg,
gsound,
libmanette,
gettext,
itstool,
libxml2,
clutter,
clutter-gtk,
wrapGAppsHook3,
meson,
ninja,
python3,
vala,
desktop-file-utils,
}:
stdenv.mkDerivation rec {
pname = "quadrapassel";
version = "40.2";
src = fetchurl {
url = "mirror://gnome/sources/quadrapassel/${lib.versions.major version}/quadrapassel-${version}.tar.xz";
hash = "sha256-C9giQUIHxzEj7WpJ9yPaWsjdTfXTXtwJn/6i4TmcwAo=";
};
nativeBuildInputs = [
meson
ninja
python3
vala
desktop-file-utils
pkg-config
adwaita-icon-theme
libxml2
itstool
gettext
wrapGAppsHook3
];
buildInputs = [
gtk3
gdk-pixbuf
librsvg
libmanette
gsound
clutter
libxml2
clutter-gtk
];
passthru = {
updateScript = gnome.updateScript { packageName = "quadrapassel"; };
};
meta = {
description = "Classic falling-block game, Tetris";
mainProgram = "quadrapassel";
homepage = "https://gitlab.gnome.org/GNOME/quadrapassel";
changelog = "https://gitlab.gnome.org/GNOME/quadrapassel/-/blob/${version}/NEWS?ref_type=tags";
license = lib.licenses.gpl2Plus;
teams = [ lib.teams.gnome ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
jre,
makeWrapper,
jdk,
makeDesktopItem,
copyDesktopItems,
fetchzip,
fetchurl,
}:
let
icon = fetchurl {
url = "https://raw.githubusercontent.com/hrehfeld/QuakeInjector/b741bae9904acbf2e18cdb1ca8e71a12e7d416cf/src/main/resources/Inject2_256.png";
hash = "sha256-769YoSJ52+BTk7s+wh4oOyHwPPrR7AeOxCS58CdQ93s=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "quake-injector";
version = "07";
src = fetchzip {
url = "https://github.com/hrehfeld/QuakeInjector/releases/download/alpha${finalAttrs.version}/QuakeInjector-alpha${finalAttrs.version}.zip";
hash = "sha256-Lixac9K3+9j7QvprZGzhnYuvlJV9V+ja4EipygELkWA=";
};
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
installPhase =
let
# Explicit needed JAR filenames
filenames = [
"QuakeInjector-alpha${finalAttrs.version}.jar"
"BrowserLauncher2-1.3.jar"
"jackson-annotations-2.13.3.jar"
"jackson-core-2.13.3.jar"
"jackson-databind-2.13.3.jar"
];
mkClasspath = prefix: lib.concatMapStringsSep ":" (filename: "${prefix}/${filename}") filenames;
classpath = mkClasspath "$out/share/quake-injector";
in
''
runHook preInstall
mkdir -p $out/{bin,share/quake-injector}
cp lib/*.jar $out/share/quake-injector
mkdir -p $out/share/icons/hicolor/256x256/apps
cp ${icon} $out/share/icons/hicolor/256x256/apps/quake-injector.png
makeWrapper ${jre}/bin/java $out/bin/quake-injector \
--add-flags "-classpath ${classpath} de.haukerehfeld.quakeinjector.QuakeInjector"
runHook postInstall
'';
# There are no tests.
doCheck = false;
desktopItems = [
(makeDesktopItem {
name = "quake-injector";
exec = finalAttrs.meta.mainProgram;
icon = "quake-injector";
comment = finalAttrs.meta.description;
desktopName = "Quake Injector";
categories = [ "Game" ];
})
];
meta = {
description = "Download, install and play quake singleplayer maps from the quaddicted.com archive";
homepage = "https://github.com/hrehfeld/QuakeInjector";
changelog = "https://github.com/hrehfeld/QuakeInjector/releases";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ theobori ];
mainProgram = "quake-injector";
platforms = jdk.meta.platforms;
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
};
})

View File

@@ -0,0 +1,96 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
curl,
libGL,
libX11,
libXxf86dga,
alsa-lib,
libXrandr,
libXxf86vm,
libXext,
SDL2,
glibc,
copyDesktopItems,
makeDesktopItem,
}:
let
arch = if stdenv.hostPlatform.isx86_64 then "x64" else stdenv.hostPlatform.parsed.cpu.name;
in
stdenv.mkDerivation {
pname = "Quake3e";
version = "2024-09-02-dev";
src = fetchFromGitHub {
owner = "ec-";
repo = "Quake3e";
rev = "b6e7ce4f78711e1c9d2924044a9a9d8a9db7020f";
sha256 = "sha256-tQgrHiP+QhBzcUnHRwzaDe38Th0uDt450fra8O3Vjqc=";
};
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
buildInputs = [
curl
libGL
libX11
libXxf86dga
alsa-lib
libXrandr
libXxf86vm
libXext
SDL2
glibc
];
env.NIX_CFLAGS_COMPILE = "-I${lib.getInclude SDL2}/include/SDL2";
enableParallelBuilding = true;
postPatch = ''
sed -i -e 's#OpenGLLib = dlopen( dllname#OpenGLLib = dlopen( "${libGL}/lib/libGL.so"#' code/unix/linux_qgl.c
sed -i -e 's#Sys_LoadLibrary( "libpthread.so.0" )#Sys_LoadLibrary( "${glibc}/lib/libpthread.so.0" )#' code/unix/linux_snd.c
sed -i -e 's#Sys_LoadLibrary( "libasound.so.2" )#Sys_LoadLibrary( "${alsa-lib}/lib/libasound.so.2" )#' code/unix/linux_snd.c
sed -i -e 's#Sys_LoadLibrary( "libXxf86dga.so.1" )#Sys_LoadLibrary( "${libXxf86dga}/lib/libXxf86dga.so.1" )#' code/unix/x11_dga.c
sed -i -e 's#Sys_LoadLibrary( "libXrandr.so.2" )#Sys_LoadLibrary( "${libXrandr}/lib/libXrandr.so.2" )#' code/unix/x11_randr.c
sed -i -e 's#Sys_LoadLibrary( "libXxf86vm.so.1" )#Sys_LoadLibrary( "${libXxf86vm}/lib/libXxf86vm.so.1" )#' code/unix/x11_randr.c
sed -i -e 's#Sys_LoadLibrary( "libXxf86vm.so.1" )#Sys_LoadLibrary( "${libXxf86vm}/lib/libXxf86vm.so.1" )#' code/unix/x11_vidmode.c
sed -i -e 's#"libcurl.so.4"#"${curl.out}/lib/libcurl.so.4"#' code/client/cl_curl.h
'';
# Default value for `USE_SDL` changed (from 0 to 1) in 5f8ce6d (2020-12-26)
# Setting `USE_SDL=0` in `makeFlags` doesn't work
preConfigure = ''
sed -i 's/USE_SDL *= 1/USE_SDL = 0/' Makefile
'';
installPhase = ''
runHook preInstall
make install DESTDIR=$out/lib
makeWrapper $out/lib/quake3e.${arch} $out/bin/quake3e
makeWrapper $out/lib/quake3e.ded.${arch} $out/bin/quake3e.ded
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "Quake3e";
exec = "quake3e";
desktopName = "Quake3e";
categories = [ "Game" ];
})
];
meta = with lib; {
homepage = "https://github.com/ec-/Quake3e";
description = "Improved Quake III Arena engine";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [
pmiddend
alx
];
};
}

View File

@@ -0,0 +1,42 @@
{
cmake,
fetchFromGitHub,
fetchpatch,
lib,
stdenv,
}:
stdenv.mkDerivation {
pname = "qualisys-cpp-sdk";
version = "2024.2";
src = fetchFromGitHub {
owner = "qualisys";
repo = "qualisys_cpp_sdk";
tag = "rt_protocol_1.25";
hash = "sha256-BeG6LF1a8m9BSoILsD9EppywXlCSheKGm0fBoLR1cak=";
};
patches = [
# Fix include dir in CMake export
(fetchpatch {
url = "https://github.com/qualisys/qualisys_cpp_sdk/pull/32/commits/db5e22662b7f417b317571a7488b6dcbb82b7538.patch";
hash = "sha256-q7sNT/kQ9xlRPYKfmhiKg+UaYUsZJ4J2xMyQQNSTgxQ=";
})
# don't concatenate CMAKE_INSTALL_PREFIX and absolute CMAKE_INSTALL_INCLUDEDIR
(fetchpatch {
url = "https://github.com/nim65s/qualisys_cpp_sdk/commit/1ba8cdb9a8e3583b68d93a553a6f59ea7ee24876.patch";
hash = "sha256-5CWBvvnlXlh3UkU3S+LVG2rWC8VZ7+EVo+YFKHk6KuY=";
})
];
nativeBuildInputs = [ cmake ];
meta = {
description = "C++ sdk for talking to Qualisys Track Manager software";
homepage = "https://github.com/qualisys/qualisys_cpp_sdk";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ nim65s ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,164 @@
diff --git a/src-tauri/src/qf_client/modules/analytics.rs b/src-tauri/src/qf_client/modules/analytics.rs
index f68e185..355723e 100644
--- a/src-tauri/src/qf_client/modules/analytics.rs
+++ b/src-tauri/src/qf_client/modules/analytics.rs
@@ -37,7 +37,7 @@ impl AnalyticsModule {
current_page: "home".to_string(),
component: "Analytics".to_string(),
is_init: false,
- send_metrics: true,
+ send_metrics: false,
last_user_activity: Arc::new(Mutex::new(Instant::now())),
metricAndLabelPairsScheduledToSend: vec![],
}
@@ -77,90 +77,7 @@ impl AnalyticsModule {
}
pub fn init(&mut self) -> Result<(), AppError> {
let app = states::app_state()?;
- if self.is_init {
- return Ok(());
- }
- self.is_init = true;
- self.update_state();
-
- let is_first_install = app.is_first_install.clone();
- tauri::async_runtime::spawn({
- async move {
- // Create a new instance of the QFClient and store it in the app state
- let qf = states::qf_client().expect("Failed to get qf client");
-
- // Create Timer for sending metrics
- let mut last_metric_time = Instant::now();
-
- if is_first_install {
- qf.analytics()
- .metricAndLabelPairsScheduledToSend
- .push(HashMap::from([(
- "First_Install".to_string(),
- "true".to_string(),
- )]));
- }
- loop {
- let send_metrics = qf.analytics().send_metrics;
- if !send_metrics {
- tokio::time::sleep(std::time::Duration::from_secs(60)).await;
- continue;
- }
-
- if last_metric_time.elapsed() < Duration::from_secs(15)
- || !qf.analytics().is_user_active()
- {
- tokio::time::sleep(std::time::Duration::from_secs(5)).await;
- continue;
- }
-
- if last_metric_time.elapsed() < Duration::from_secs(60)
- && !qf.analytics().is_user_active()
- {
- tokio::time::sleep(std::time::Duration::from_secs(5)).await;
- continue;
- }
-
- last_metric_time = Instant::now();
- // logger::info_con(
- // &qf.analytics().get_component("TrySendAnalytics"),
- // "Sending user activity",
- // );
- match qf
- .analytics()
- .try_send_analytics(
- "users/metrics/periodic",
- 3,
- json!(qf.analytics().metricAndLabelPairsScheduledToSend),
- )
- .await
- {
- Ok(_) => {
- qf.analytics().clear_metrics();
- }
- Err(e) => {
- if e.cause().contains("Unauthorized")
- || e.cause().contains("Banned")
- || e.cause().contains("WFMBanned")
- {
- error::create_log_file("analytics.log", &e);
- break;
- } else if e.cause().contains("429") {
- logger::info(
- &qf.analytics().get_component("TrySendAnalytics"),
- "Rate limit reached, waiting for 60 seconds",
- LoggerOptions::default(),
- );
- tokio::time::sleep(std::time::Duration::from_secs(60)).await;
- continue;
- }
- error::create_log_file("analytics.log", &e);
- }
- };
- }
- qf.analytics().is_init = false;
- }
- });
+ self.is_init = false;
Ok(())
}
pub fn set_send_metrics(&mut self, send_metrics: bool) {
@@ -173,45 +90,6 @@ impl AnalyticsModule {
mut retry_count: i64,
data: Value,
) -> Result<(), AppError> {
- let mut parameters: Vec<String> = vec![];
- if self.is_user_active() {
- parameters.push(format!("Active_Page={}", self.current_page));
- }
-
- while retry_count >= 0 {
- let err = match self
- .client
- .post::<Value>(
- format!("{}?{}", url, parameters.join("&")).as_str(),
- data.clone(),
- )
- .await
- {
- Ok(ApiResult::Success(_, _)) => {
- return Ok(());
- }
- Ok(ApiResult::Error(e, _headers)) => AppError::new_api(
- &self.get_component("TrySendAnalytics"),
- e,
- eyre!("Failed to send analytics"),
- LogLevel::Error,
- ),
- Err(e) => e,
- };
- if retry_count == 0 {
- return Err(err);
- }
- retry_count -= 1;
- logger::warning(
- &self.get_component("TrySendAnalytics"),
- &format!(
- "Failed to send analytics, retrying in 5 seconds, retries left: {}",
- retry_count
- ),
- LoggerOptions::default(),
- );
- tokio::time::sleep(std::time::Duration::from_secs(5)).await;
- }
Ok(())
}
}
diff --git a/src/contexts/app.context.tsx b/src/contexts/app.context.tsx
index 7897db9..1945ab9 100644
--- a/src/contexts/app.context.tsx
+++ b/src/contexts/app.context.tsx
@@ -160,7 +160,7 @@ export function AppContextProvider({ children }: AppContextProviderProps) {
const id = context.substring(start, end);
console.log("OpenTos", settings?.tos_uuid, id);
- if (id == settings?.tos_uuid) return;
+ if (true) return;
modals.open({
title: useTranslateModals("tos.title"),
size: "100%",

View File

@@ -0,0 +1,80 @@
{
lib,
rustPlatform,
fetchFromGitHub,
cargo-tauri,
nodejs,
pnpm_9,
pkg-config,
glib-networking,
openssl,
webkitgtk_4_1,
wrapGAppsHook3,
libsoup_3,
libayatana-appindicator,
gtk3,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "quantframe";
version = "1.5.3";
src = fetchFromGitHub {
owner = "Kenya-DK";
repo = "quantframe-react";
tag = "v${finalAttrs.version}";
hash = "sha256-afTiQzHat6k+BF8EhYhd0o0FzYjq7GpnOnjRhjXASG8=";
};
postPatch = ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
substituteInPlace src-tauri/tauri.conf.json \
--replace-fail '"createUpdaterArtifacts": "v1Compatible"' '"createUpdaterArtifacts": false'
'';
patches = [ ./0001-disable-telemetry.patch ];
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-ncoxliXnLxWEXL1Z7ixOULI/uYkxmfLiDWu1tDSRsrM=";
};
cargoHash = "sha256-0IgQK0jMVN6u5i4lBKK8njbMyRQCLguTdDcSBnFnyso=";
nativeBuildInputs = [
cargo-tauri.hook
pkg-config
wrapGAppsHook3
nodejs
pnpm_9.configHook
];
buildInputs = [
openssl
libsoup_3
glib-networking
gtk3
libayatana-appindicator
webkitgtk_4_1
];
cargoRoot = "src-tauri";
buildAndTestSubdir = finalAttrs.cargoRoot;
passthru.updateScript = nix-update-script { };
meta = {
description = "Warframe Market listings and transactions manager";
mainProgram = "quantframe";
homepage = "https://quantframe.app/";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
nyukuru
enkarterisi
];
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quantlib";
version = "1.39";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "lballabio";
repo = "QuantLib";
rev = "v${finalAttrs.version}";
hash = "sha256-UrFamEIeFTR0finNGESlDYbvrmD8jtv73tDUJ17P7WA=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ boost ];
# Required by RQuantLib, may be beneficial for others too
cmakeFlags = [ "-DQL_HIGH_RESOLUTION_DATE=ON" ];
# Needed for RQuantLib and possible others
postInstall = ''
cp ./quantlib-config $out/bin/
'';
meta = with lib; {
description = "Free/open-source library for quantitative finance";
homepage = "https://quantlib.org";
changelog = "https://github.com/lballabio/QuantLib/releases/tag/v${finalAttrs.version}";
platforms = platforms.unix;
license = licenses.bsd3;
maintainers = [ maintainers.kupac ];
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchurl,
jre,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "quantomatic";
version = "0.7";
src = fetchurl {
url = "https://github.com/Quantomatic/quantomatic/releases/download/v${version}/Quantomatic-v${version}.jar";
sha256 = "04dd5p73a7plb4l4x2balam8j7mxs8df06rjkalxycrr1id52q4r";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/libexec/quantomatic
cp $src $out/libexec/quantomatic/quantomatic.jar
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/quantomatic --add-flags "-jar $out/libexec/quantomatic/quantomatic.jar"
'';
meta = with lib; {
description = "Piece of software for reasoning about monoidal theories; in particular, quantum information processing";
mainProgram = "quantomatic";
license = licenses.gpl3;
homepage = "https://quantomatic.github.io/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ nickhu ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchurl,
fftwSinglePrec,
freetype,
SDL,
SDL_ttf,
}:
stdenv.mkDerivation rec {
pname = "quantumminigolf";
version = "1.1.1";
src = fetchurl {
url = "mirror://sourceforge/project/quantumminigolf/quantumminigolf/${version}/quantumminigolf-${version}.src.tar.gz";
sha256 = "sha256-Y3LUGk6pAuNGVOYkc0WYDbgJFtwJJn+aLRHmCKY7W5k=";
};
buildInputs = [
fftwSinglePrec
freetype
SDL
SDL_ttf
];
preBuild = ''
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL -I${SDL_ttf}/include/SDL"
sed -re 's@"(gfx|fonts|tracks)/@"'"$out"'/share/quantumminigolf/\1/@g' -i *.cpp
'';
installPhase = ''
mkdir -p "$out"/{share/doc,share/quantumminigolf,bin}
cp README THANKS LICENSE "$out/share/doc"
cp -r fonts gfx tracks "$out/share/quantumminigolf"
cp quantumminigolf "$out/bin"
'';
meta = with lib; {
description = "Quantum mechanics-based minigolf-like game";
mainProgram = "quantumminigolf";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
# never built on aarch64-linux since first introduction in nixpkgs
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
fetchFromGitHub,
gitMinimal,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "quark-engine";
version = "25.6.1";
pyproject = true;
src = fetchFromGitHub {
owner = "quark-engine";
repo = "quark-engine";
tag = "v${version}";
hash = "sha256-DAD37fzswY3c0d+ubOCYImxs4qyD4fhC3m2l0iD977A=";
};
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
androguard
click
colorama
gitMinimal
graphviz
pandas
plotly
prettytable
prompt-toolkit
r2pipe
rzpipe
setuptools
tqdm
];
pythonRelaxDeps = [
"r2pipe"
"androguard"
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "quark" ];
meta = with lib; {
description = "Android malware (analysis and scoring) system";
homepage = "https://quark-engine.readthedocs.io/";
changelog = "https://github.com/quark-engine/quark-engine/releases/tag/${src.tag}";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,2 @@
# Nintendo Switch HOS
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", MODE="0666"

View File

@@ -0,0 +1,88 @@
diff --git a/pom.xml b/pom.xml
index 5a683ca..be71e5d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -104,7 +105,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
+ <version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@@ -113,7 +114,7 @@
<plugin>
<artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
+ <version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
@@ -134,7 +135,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>3.1.0</version>
+ <version>3.6.0</version>
<configuration>
<finalName>Quark</finalName>
<appendAssemblyId>false</appendAssemblyId>
@@ -157,6 +158,56 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>3.3.0</version>
+ <executions>
+ <execution>
+ <id>require-all-plugin-versions-to-be-set</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requirePluginVersions />
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>3.1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>4.0.0-M9</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>3.1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>3.1.2</version>
+ </plugin>
</plugins>
</build>

View File

@@ -0,0 +1,125 @@
{
lib,
jdk,
maven,
fetchFromGitHub,
fetchpatch,
makeDesktopItem,
copyDesktopItems,
imagemagick,
wrapGAppsHook3,
gtk3,
udevCheckHook,
}:
let
jdk' = jdk.override { enableJavaFX = true; };
in
maven.buildMavenPackage rec {
pname = "quark-goldleaf";
version = "1.0.0";
src = fetchFromGitHub {
owner = "XorTroll";
repo = "Goldleaf";
rev = version;
hash = "sha256-gagIQGOiygJ0Onm0SrkbFWaovqWX2WJNx7LpSRheCLM=";
};
sourceRoot = "${src.name}/Quark";
patches = [
./fix-maven-plugin-versions.patch
./remove-pom-jfx.patch
(fetchpatch {
name = "fix-config-path.patch";
url = "https://github.com/XorTroll/Goldleaf/commit/714ecc2755df9c1252615ad02cafff9c0311a739.patch";
hash = "sha256-4j+6uLIOdltZ4XIb3OtOzZg9ReH9660gZMMNQpHnn4o=";
relative = "Quark";
})
];
mvnJdk = jdk';
mvnHash = "sha256-gA3HsQZFa2POP9cyJLb1l8t3hrJYzDowhJU+5Xl79p4=";
# set fixed build timestamp for deterministic jar
mvnParameters = "-Dproject.build.outputTimestamp=1980-01-01T00:00:02Z";
nativeBuildInputs = [
imagemagick # for icon conversion
copyDesktopItems
wrapGAppsHook3
udevCheckHook
];
buildInputs = [ gtk3 ];
# don't double-wrap
dontWrapGApps = true;
doInstallCheck = true;
installPhase = ''
runHook preInstall
install -Dm644 ${./99-quark-goldleaf.rules} $out/etc/udev/rules.d/99-quark-goldleaf.rules
install -Dm644 target/Quark.jar $out/share/java/quark-goldleaf.jar
for size in 16 24 32 48 64 128; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
convert -resize "$size"x"$size" src/main/resources/Icon.png $out/share/icons/hicolor/"$size"x"$size"/apps/quark-goldleaf.png
done
runHook postInstall
'';
postFixup = ''
# This is in postFixup because gappsWrapperArgs are generated during preFixup
makeWrapper ${jdk'}/bin/java $out/bin/quark-goldleaf \
"''${gappsWrapperArgs[@]}" \
--add-flags "-jar $out/share/java/quark-goldleaf.jar"
'';
desktopItems = [
(makeDesktopItem {
name = "quark-goldleaf";
exec = "quark-goldleaf";
icon = "quark-goldleaf";
desktopName = "Quark";
comment = meta.description;
terminal = false;
categories = [
"Utility"
"FileTransfer"
];
keywords = [
"nintendo"
"switch"
"goldleaf"
];
})
];
meta = {
changelog = "https://github.com/XorTroll/Goldleaf/releases/tag/${src.rev}";
description = "GUI tool for transfering files between a computer and a Nintendo Switch running Goldleaf";
homepage = "https://github.com/XorTroll/Goldleaf#quark-and-remote-browsing";
longDescription = ''
${meta.description}
For the program to work properly, you will have to install Nintendo Switch udev rules.
You can either do this by enabling the NixOS module:
`programs.quark-goldleaf.enable = true;`
or by adding the package manually to udev packages:
`services.udev.packages = [ pkgs.quark-goldleaf ];
'';
license = lib.licenses.gpl3Only;
mainProgram = "quark-goldleaf";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = with lib.platforms; linux ++ darwin;
};
}

View File

@@ -0,0 +1,93 @@
diff --git a/pom.xml b/pom.xml
index 51ce56b..44dcd09 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,72 +15,6 @@
</properties>
<dependencies>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-controls</artifactId>
- <version>17</version>
- <classifier>linux</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-controls</artifactId>
- <version>17</version>
- <classifier>win</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-controls</artifactId>
- <version>17</version>
- <classifier>mac</classifier>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-fxml</artifactId>
- <version>17</version>
- <classifier>linux</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-fxml</artifactId>
- <version>17</version>
- <classifier>win</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-fxml</artifactId>
- <version>17</version>
- <classifier>mac</classifier>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-graphics</artifactId>
- <version>17</version>
- <classifier>linux</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-graphics</artifactId>
- <version>17</version>
- <classifier>win</classifier>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-graphics</artifactId>
- <version>17</version>
- <classifier>mac</classifier>
- <scope>compile</scope>
- </dependency>
-
<dependency>
<groupId>org.usb4java</groupId>
<artifactId>usb4java-javax</artifactId>
@@ -123,15 +57,6 @@
</executions>
</plugin>
- <plugin>
- <groupId>org.openjfx</groupId>
- <artifactId>javafx-maven-plugin</artifactId>
- <version>0.0.8</version>
- <configuration>
- <mainClass>xortroll.goldleaf.quark.Main</mainClass>
- </configuration>
- </plugin>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchgit,
patches ? null,
}:
stdenv.mkDerivation {
pname = "quark";
version = "unstable-2021-02-22";
src = fetchgit {
url = "git://git.suckless.org/quark";
rev = "68b4f733b2755762e43df90f73db5a6ec8d14104";
sha256 = "sha256-Jtu5zJfHd+6Oq572nVem5msMDCOjdqDNH4SQck8/O5A=";
};
inherit patches;
makeFlags = [ "CC:=$(CC)" ];
installFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "Extremely small and simple HTTP GET/HEAD-only web server for static content";
mainProgram = "quark";
homepage = "http://tools.suckless.org/quark";
license = licenses.isc;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
jdk,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quarkus-cli";
version = "3.28.2";
src = fetchurl {
url = "https://github.com/quarkusio/quarkus/releases/download/${finalAttrs.version}/quarkus-cli-${finalAttrs.version}.tar.gz";
hash = "sha256-d5OrUShc8TKJAcFd0Y3Cu1nkuj+dJBOg5uCrEbssNyw=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/{lib,bin}
cp ./lib/quarkus-cli-${finalAttrs.version}-runner.jar $out/lib
makeWrapper ${jdk}/bin/java $out/bin/quarkus \
--add-flags "-classpath $out/lib/quarkus-cli-${finalAttrs.version}-runner.jar" \
--add-flags "-Dapp.name=quarkus" \
--add-flags "-Dapp-pid='\$\$'" \
--add-flags "-Dapp.repo=$out/lib" \
--add-flags "-Dapp.home=$out" \
--add-flags "-Dbasedir=$out" \
--add-flags "io.quarkus.cli.Main"
runHook postInstall
'';
meta = with lib; {
description = "Kubernetes-native Java framework tailored for GraalVM and HotSpot, crafted from best-of-breed Java libraries and standards";
homepage = "https://quarkus.io";
changelog = "https://github.com/quarkusio/quarkus/releases/tag/${finalAttrs.version}";
license = licenses.asl20;
maintainers = [ maintainers.vinetos ];
platforms = platforms.all;
mainProgram = "quarkus";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
};
})

View File

@@ -0,0 +1,230 @@
{
lib,
buildFHSEnv,
callPackage,
makeDesktopItem,
runtimeShell,
runCommand,
unstick,
quartus-prime-lite,
libfaketime,
pkgsi686Linux,
withQuesta ? true,
supportedDevices ? [
"Arria II"
"Cyclone V"
"Cyclone IV"
"Cyclone 10 LP"
"MAX II/V"
"MAX 10 FPGA"
],
unwrapped ? callPackage ./quartus.nix { inherit unstick supportedDevices withQuesta; },
extraProfile ? "",
}:
let
desktopItem = makeDesktopItem {
name = "quartus-prime-lite";
exec = "quartus";
icon = "quartus";
desktopName = "Quartus";
genericName = "Quartus Prime";
categories = [ "Development" ];
};
in
# I think questa_fse/linux/vlm checksums itself, so use FHSUserEnv instead of `patchelf`
buildFHSEnv rec {
pname = "quartus-prime-lite"; # wrapped
inherit (unwrapped) version;
targetPkgs =
pkgs: with pkgs; [
(runCommand "ld-lsb-compat" { } (
''
mkdir -p "$out/lib"
ln -sr "${glibc}/lib/ld-linux-x86-64.so.2" "$out/lib/ld-lsb-x86-64.so.3"
''
+ lib.optionalString withQuesta ''
ln -sr "${pkgsi686Linux.glibc}/lib/ld-linux.so.2" "$out/lib/ld-lsb.so.3"
''
))
# quartus requirements
glib
xorg.libICE
xorg.libSM
xorg.libXau
xorg.libXdmcp
xorg.libXScrnSaver
libudev0-shim
bzip2
brotli
expat
dbus
# qsys requirements
xorg.libXtst
xorg.libXi
dejavu_fonts
gnumake
];
# Also support 32-bit executables used by simulator.
multiArch = withQuesta;
# these libs are installed as 64 bit, plus as 32 bit when multiArch is true
multiPkgs =
pkgs:
with pkgs;
let
# This seems ugly - can we override `libpng = libpng12` for all `pkgs`?
freetype = pkgs.freetype.override { libpng = libpng12; };
fontconfig = pkgs.fontconfig.override { inherit freetype; };
libXft = pkgs.xorg.libXft.override { inherit freetype fontconfig; };
in
[
# questa requirements
libxml2
ncurses5
unixODBC
libXft
# common requirements
freetype
fontconfig
xorg.libX11
xorg.libXext
xorg.libXrender
libxcrypt-legacy
];
extraInstallCommands = ''
mkdir -p $out/share/applications $out/share/icons/hicolor/64x64/apps
ln -s ${desktopItem}/share/applications/* $out/share/applications
ln -s ${unwrapped}/quartus/adm/quartusii.png $out/share/icons/hicolor/64x64/apps/quartus.png
progs_to_wrap=(
"${unwrapped}"/quartus/bin/*
"${unwrapped}"/quartus/sopc_builder/bin/qsys-{generate,edit,script}
"${unwrapped}"/questa_fse/bin/*
"${unwrapped}"/questa_fse/linux_x86_64/lmutil
)
wrapper=$out/bin/${pname}
progs_wrapped=()
for prog in ''${progs_to_wrap[@]}; do
relname="''${prog#"${unwrapped}/"}"
bname="$(basename "$relname")"
wrapped="$out/$relname"
progs_wrapped+=("$wrapped")
mkdir -p "$(dirname "$wrapped")"
echo "#!${runtimeShell}" >> "$wrapped"
NIXPKGS_QUARTUS_THIS_PROG_SUPPORTS_FIXED_CLOCK=1
case "$relname" in
questa_fse/*)
echo "export NIXPKGS_IS_QUESTA_WRAPPER=1" >> "$wrapped"
# Any use of LD_PRELOAD breaks Questa, so disable the
# SOURCE_DATE_EPOCH code path.
NIXPKGS_QUARTUS_THIS_PROG_SUPPORTS_FIXED_CLOCK=0
;;
esac
# SOURCE_DATE_EPOCH blocklist for programs that are known to hang/break
# with fixed/static clock.
case "$bname" in
jtagd|quartus_pgm|quartus)
NIXPKGS_QUARTUS_THIS_PROG_SUPPORTS_FIXED_CLOCK=0
;;
esac
echo "export NIXPKGS_QUARTUS_THIS_PROG_SUPPORTS_FIXED_CLOCK=$NIXPKGS_QUARTUS_THIS_PROG_SUPPORTS_FIXED_CLOCK" >> "$wrapped"
echo "exec $wrapper $prog \"\$@\"" >> "$wrapped"
done
cd $out
chmod +x ''${progs_wrapped[@]}
# link into $out/bin so executables become available on $PATH
ln --symbolic --relative --target-directory ./bin ''${progs_wrapped[@]}
'';
profile = ''
# LD_PRELOAD fixes issues in the licensing system that cause memory corruption and crashes when
# starting most operations in many containerized environments, including WSL2, Docker, and LXC
# (a similiar fix involving LD_PRELOADing tcmalloc did not solve the issue in my situation)
# https://community.intel.com/t5/Intel-FPGA-Software-Installation/Running-Quartus-Prime-Standard-on-WSL-crashes-in-libudev-so/m-p/1189032
#
# But, as can be seen in the above resource, LD_PRELOADing libudev breaks
# compiling encrypted device libraries in Questa (with error
# `(vlog-2163) Macro `<protected> is undefined.`), so only use LD_PRELOAD
# for non-Questa wrappers.
if [ "$NIXPKGS_IS_QUESTA_WRAPPER" != 1 ]; then
export LD_PRELOAD=''${LD_PRELOAD:+$LD_PRELOAD:}/usr/lib/libudev.so.0
fi
# Implement the SOURCE_DATE_EPOCH specification for reproducible builds
# (https://reproducible-builds.org/specs/source-date-epoch).
# Require opt-in with NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD=1 for now, in case
# the blocklist is incomplete.
if [ -n "$SOURCE_DATE_EPOCH" ] && [ "$NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD" = 1 ] && [ "$NIXPKGS_QUARTUS_THIS_PROG_SUPPORTS_FIXED_CLOCK" = 1 ]; then
export LD_LIBRARY_PATH="${
lib.makeLibraryPath [
libfaketime
pkgsi686Linux.libfaketime
]
}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export LD_PRELOAD=libfaketime.so.1''${LD_PRELOAD:+:$LD_PRELOAD}
export FAKETIME_FMT="%s"
export FAKETIME="$SOURCE_DATE_EPOCH"
fi
''
+ extraProfile;
# Run the wrappers directly, instead of going via bash.
runScript = "";
passthru = {
inherit unwrapped;
tests = {
buildSof =
runCommand "quartus-prime-lite-test-build-sof"
{
nativeBuildInputs = [ quartus-prime-lite ];
env.NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD = "1";
}
''
cat >mydesign.vhd <<EOF
library ieee;
use ieee.std_logic_1164.all;
entity mydesign is
port (
in_0: in std_logic;
in_1: in std_logic;
out_1: out std_logic
);
end mydesign;
architecture dataflow of mydesign is
begin
out_1 <= in_0 and in_1;
end dataflow;
EOF
quartus_sh --flow compile mydesign
if ! [ -f mydesign.sof ]; then
echo "error: failed to produce mydesign.sof" >&2
exit 1
fi
sha1sum mydesign.sof > "$out"
'';
questaEncryptedModel =
runCommand "quartus-prime-lite-test-questa-encrypted-model"
{
env.NIXPKGS_QUARTUS_REPRODUCIBLE_BUILD = "1";
}
''
"${quartus-prime-lite}/bin/vlog" "${quartus-prime-lite.unwrapped}/questa_fse/intel/verilog/src/arriav_atoms_ncrypt.v"
touch "$out"
'';
};
};
inherit (unwrapped) meta;
}

View File

@@ -0,0 +1,139 @@
{
stdenv,
lib,
unstick,
fetchurl,
withQuesta ? true,
supportedDevices ? [
"Arria II"
"Cyclone V"
"Cyclone IV"
"Cyclone 10 LP"
"MAX II/V"
"MAX 10 FPGA"
],
}:
let
deviceIds = {
"Arria II" = "arria_lite";
"Cyclone V" = "cyclonev";
"Cyclone IV" = "cyclone";
"Cyclone 10 LP" = "cyclone10lp";
"MAX II/V" = "max";
"MAX 10 FPGA" = "max10";
};
supportedDeviceIds =
assert lib.assertMsg (lib.all (
name: lib.hasAttr name deviceIds
) supportedDevices) "Supported devices are: ${lib.concatStringsSep ", " (lib.attrNames deviceIds)}";
lib.listToAttrs (
map (name: {
inherit name;
value = deviceIds.${name};
}) supportedDevices
);
unsupportedDeviceIds = lib.filterAttrs (
name: value: !(lib.hasAttr name supportedDeviceIds)
) deviceIds;
componentHashes = {
"arria_lite" = "sha256-ASvi9YX15b4XXabGjkuR5wl9wDwCijl8s750XTR/4XU=";
"cyclone" = "sha256-iNA4S5mssffgn29NUhibJk6iKnmJ+vG9LYY3W+nnqcI=";
"cyclone10lp" = "sha256-247yR2fm5A3LWRjePJU99z1NBYziV8WkPL05wHJ4Z1Q=";
"cyclonev" = "sha256-Fa1PQ3pp9iTPYQljeKGyxHIXHaSolJZR8vXVb3gEN7g=";
"max" = "sha256-lAA1CgSfAjfilLDhRzfU2OkzGAChk7TMFckeboMB4mI=";
"max10" = "sha256-edycBj0P3qwLN2YS//QpCHQeGOW8WM0RqTIWdGAkEv8=";
};
version = "24.1std.0.1077";
download =
{ name, sha256 }:
fetchurl {
inherit name sha256;
# e.g. "23.1std.1.993" -> "23.1std/993"
url = "https://downloads.intel.com/akdlm/software/acdsinst/${lib.versions.majorMinor version}std/${lib.elemAt (lib.splitVersion version) 4}/ib_installers/${name}";
};
installers = map download (
[
{
name = "QuartusLiteSetup-${version}-linux.run";
sha256 = "sha256-NFWT1VWcb3gun7GhpPbHzR3SIYBMpK40jESXS/vC5II=";
}
]
++ lib.optional withQuesta {
name = "QuestaSetup-${version}-linux.run";
sha256 = "sha256-4+Y34UiJwenlIp/XKzMs+2aYZt/Y6XmNmiYyXVmOQkc=";
}
);
components = map (
id:
download {
name = "${id}-${version}.qdz";
sha256 = lib.getAttr id componentHashes;
}
) (lib.attrValues supportedDeviceIds);
in
stdenv.mkDerivation {
inherit version;
pname = "quartus-prime-lite-unwrapped";
nativeBuildInputs = [ unstick ];
buildCommand =
let
copyInstaller = installer: ''
# `$(cat $NIX_CC/nix-support/dynamic-linker) $src[0]` often segfaults, so cp + patchelf
cp ${installer} $TEMP/${installer.name}
chmod u+w,+x $TEMP/${installer.name}
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $TEMP/${installer.name}
'';
copyComponent = component: "cp ${component} $TEMP/${component.name}";
# leaves enabled: quartus, devinfo
disabledComponents = [
"quartus_help"
"quartus_update"
"questa_fe"
]
++ (lib.optional (!withQuesta) "questa_fse")
++ (lib.attrValues unsupportedDeviceIds);
in
''
echo "setting up installer..."
${lib.concatMapStringsSep "\n" copyInstaller installers}
${lib.concatMapStringsSep "\n" copyComponent components}
echo "executing installer..."
# "Could not load seccomp program: Invalid argument" might occur if unstick
# itself is compiled for x86_64 instead of the non-x86 host. In that case,
# override the input.
unstick $TEMP/${(builtins.head installers).name} \
--disable-components ${lib.concatStringsSep "," disabledComponents} \
--mode unattended --installdir $out --accept_eula 1
echo "cleaning up..."
rm -r $out/uninstall $out/logs
# replace /proc pentium check with a true statement. this allows usage under emulation.
substituteInPlace $out/quartus/adm/qenv.sh \
--replace-fail 'grep sse /proc/cpuinfo > /dev/null 2>&1' ':'
'';
meta = with lib; {
homepage = "https://fpgasoftware.intel.com";
description = "FPGA design and simulation software";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [
bjornfor
kwohlfahrt
zainkergaye
];
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchurl,
python3Packages,
zlib,
bash,
}:
let
pythonPackages = python3Packages;
inherit (pythonPackages) python;
in
pythonPackages.buildPythonApplication rec {
pname = "quast";
version = "5.3.0";
format = "setuptools";
src = fetchurl {
url = "https://github.com/ablab/quast/releases/download/${pname}_${version}/${pname}-${version}.tar.gz";
hash = "sha256-rJ26A++dClHXqeLFaCYQTnjzQPYmOjrTk2SEQt68dOw=";
};
pythonPath = with pythonPackages; [
simplejson
joblib
setuptools
distutils
matplotlib
];
buildInputs = [ zlib ] ++ pythonPath;
dontConfigure = true;
dontBuild = true;
installPhase = ''
substituteInPlace quast_libs/bedtools/Makefile \
--replace "/bin/bash" "${bash}/bin/bash"
mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
${python.pythonOnBuildForHost.interpreter} setup.py install \
--install-lib=$out/${python.sitePackages} \
--prefix="$out"
'';
postFixup = ''
for file in $(find $out -type f -type f -perm /0111); do
old_rpath=$(patchelf --print-rpath $file) && \
patchelf --set-rpath $old_rpath:${lib.getLib stdenv.cc.cc}/lib $file || true
done
# Link to the master program
ln -s $out/bin/quast.py $out/bin/quast
'';
dontPatchELF = true;
# Tests need to download data files, so manual run after packaging is needed
doCheck = false;
meta = {
description = "Evaluates genome assemblies by computing various metrics";
homepage = "https://github.com/ablab/quast";
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryNativeCode # source bundles binary dependencies
];
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.bzizou ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "quattrocento-sans";
version = "2.0";
src = fetchzip {
url = "https://web.archive.org/web/20170709124317/http://www.impallari.com/media/releases/quattrocento-sans-v${version}.zip";
stripRoot = false;
hash = "sha256-L3aFZmaA94B9APxsp8bSBpocIlK3Ehvj/RFXVcW2nso=";
};
installPhase = ''
runHook preInstall
install -Dm644 */*/QuattrocentoSans*.otf -t $out/share/fonts/opentype
install -Dm644 */FONTLOG.txt -t $out/share/doc/${pname}-${version}
runHook postInstall
'';
meta = with lib; {
homepage = "http://www.impallari.com/quattrocentosans/";
description = "Classic, elegant and sober sans-serif typeface";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.rycee ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "quattrocento";
version = "1.1";
src = fetchzip {
url = "https://web.archive.org/web/20170707001804/http://www.impallari.com/media/releases/quattrocento-v${version}.zip";
hash = "sha256-ntY6Wl6TI8F7SShMyD8mdOxVg4oz9kvJ7vKTyGdPLtE=";
};
installPhase = ''
runHook preInstall
install -Dm644 */*.otf -t $out/share/fonts/opentype
install -Dm644 FONTLOG.txt -t $out/share/doc/${pname}-${version}
runHook postInstall
'';
meta = with lib; {
homepage = "http://www.impallari.com/quattrocento/";
description = "Classic, elegant, sober and strong serif typeface";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.rycee ];
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
stdenvNoCC,
appimageTools,
fetchurl,
_7zz,
}:
let
pname = "quba";
version = "1.4.2";
meta = {
description = "Viewer for electronic invoices";
homepage = "https://github.com/ZUGFeRD/quba-viewer";
downloadPage = "https://github.com/ZUGFeRD/quba-viewer/releases";
license = lib.licenses.asl20;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ onny ];
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
};
src = fetchurl {
url = "https://github.com/ZUGFeRD/quba-viewer/releases/download/v${version}/Quba-${version}.AppImage";
hash = "sha256-3goMWN5GeQaLJimUKbjozJY/zJmqc9Mvy2+6bVSt1p0=";
};
appimageContents = appimageTools.extractType1 { inherit pname version src; };
linux = appimageTools.wrapType1 {
inherit
pname
version
src
meta
;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/quba.desktop -t $out/share/applications
substituteInPlace $out/share/applications/quba.desktop \
--replace-fail 'Exec=AppRun' 'Exec=quba'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
};
darwin = stdenvNoCC.mkDerivation {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/ZUGFeRD/quba-viewer/releases/download/v${version}/Quba-${version}-universal.dmg";
hash = "sha256-q7va2D9AT0BoPhfkub/RFQxGyF12uFaCDpSYIxslqMc=";
};
unpackCmd = "7zz x -bd -osource -xr'!*/Applications' -xr'!*com.apple.provenance' $curSrc";
nativeBuildInputs = [ _7zz ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
mv Quba.app $out/Applications
runHook postInstall
'';
};
in
if stdenvNoCC.hostPlatform.isLinux then linux else darwin

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
xen,
}:
stdenv.mkDerivation rec {
pname = "qubes-core-vchan-xen";
version = "4.1.4";
src = fetchFromGitHub {
owner = "QubesOS";
repo = "qubes-core-vchan-xen";
rev = "v${version}";
hash = "sha256:02l1vs5c2jfw22gxvl2fb66m0d99n8ya1i7rphsb5cxsljvxary0";
};
buildInputs = [ xen ];
buildPhase = ''
make all PREFIX=/ LIBDIR="$out/lib" INCLUDEDIR="$out/include"
'';
installPhase = ''
make install DESTDIR=$out PREFIX=/
'';
meta = with lib; {
description = "Libraries required for the higher-level Qubes daemons and tools";
homepage = "https://qubes-os.org";
license = licenses.gpl2Plus;
maintainers = [ ];
platforms = platforms.linux;
broken = true;
};
}

View File

@@ -0,0 +1,109 @@
{
stdenv,
lib,
fetchFromGitHub,
flex,
bison,
libX11,
cmake,
gperf,
adms,
ngspice,
qucsator-rf,
qt6Packages,
kernels ? [
ngspice
qucsator-rf
],
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qucs-s";
version = "25.2.0";
src = fetchFromGitHub {
owner = "ra3xdh";
repo = "qucs_s";
tag = finalAttrs.version;
hash = "sha256-U5XLjWKOXNjgYtlccNsPT1nUnEGi3NhkJ36jan2OSAw=";
};
postPatch = ''
# Workaround a CMake bug (we don't generally do distributable bundles in nixpkgs anyway):
# warning: cannot resolve item '/usr/lib/libSystem.B.dylib'
#
# possible problems:
# need more directories?
# need to use InstallRequiredSystemLibraries?
# run in install tree instead of build tree?
for filename in \
qucs/CMakeLists.txt \
qucs-transcalc/CMakeLists.txt \
qucs-attenuator/CMakeLists.txt \
qucs-s-spar-viewer/CMakeLists.txt \
; do
substituteInPlace "$filename" \
--replace-fail 'fixup_bundle(' 'message(\"nixpkgs will not fixup_bundle: \" '
done
'';
nativeBuildInputs = [
flex
bison
qt6Packages.wrapQtAppsHook
cmake
];
buildInputs =
with qt6Packages;
[
qtbase
qttools
qtcharts
qtsvg
]
++ [
gperf
adms
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qtwayland
libX11
]
++ kernels;
cmakeFlags = [
"-DWITH_QT6=ON"
];
# Make custom kernels available from qucs-s
qtWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath kernels)
];
QTDIR = qt6Packages.qtbase.dev;
doInstallCheck = true;
installCheck = ''
$out/bin/qucs-s --version
'';
meta = {
description = "Spin-off of Qucs that allows custom simulation kernels";
longDescription = ''
Spin-off of Qucs that allows custom simulation kernels.
Default version is installed with ngspice.
'';
homepage = "https://ra3xdh.github.io/";
license = lib.licenses.gpl2Plus;
mainProgram = "qucs-s";
maintainers = with lib.maintainers; [
mazurel
kashw2
thomaslepoix
];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,54 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
bison,
flex,
dos2unix,
gperf,
adms,
withAdms ? false,
}:
stdenv.mkDerivation rec {
pname = "qucsator-rf";
version = "1.0.7";
src = fetchFromGitHub {
owner = "ra3xdh";
repo = "qucsator_rf";
rev = version;
hash = "sha256-ZH26+FOiBaf20Od9HVHMG8ey0z6XKBnmzUyCjAKB0eM=";
};
# Upstream forces NO_DEFAULT_PATH on APPLE
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail '"/usr/local/opt/bison/bin/"' '"${bison}/bin"'
'';
nativeBuildInputs = [
cmake
flex
bison
gperf
dos2unix
];
buildInputs = lib.optionals withAdms [ adms ];
cmakeFlags = [
"-DBISON_DIR=${bison}/bin"
(lib.cmakeBool "WITH_ADMS" withAdms)
];
meta = {
description = "RF circuit simulation kernel for Qucs-S";
homepage = "https://github.com/ra3xdh/qucsator_rf";
license = lib.licenses.gpl2Plus;
mainProgram = "qucsator_rf";
maintainers = with lib.maintainers; [ thomaslepoix ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
libGLU,
libGL,
glew,
freetype,
fontconfig,
fribidi,
libX11,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quesoglc";
version = "0.7.2";
src = fetchurl {
url = "mirror://sourceforge/quesoglc/quesoglc-${finalAttrs.version}.tar.bz2";
hash = "sha256-VP7y7mhRct80TQb/RpmkQRQ7h6vtDVFFJK3E+JukyTE=";
};
buildInputs = [
libGLU
libGL
glew
freetype
fontconfig
fribidi
libX11
];
# required for cross builds
configureFlags = [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
"ac_cv_func_memcmp_working=yes"
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
# FIXME: Configure fails to use system glew.
meta = {
description = "Free implementation of the OpenGL Character Renderer";
longDescription = ''
QuesoGLC is a free (as in free speech) implementation of the OpenGL
Character Renderer (GLC). QuesoGLC is based on the FreeType library,
provides Unicode support and is designed to be easily ported to any
platform that supports both FreeType and the OpenGL API.
'';
homepage = "https://quesoglc.sourceforge.net/";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,45 @@
{
fetchurl,
jdk17_headless,
lib,
makeBinaryWrapper,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "questdb";
version = "9.0.3";
src = fetchurl {
url = "https://github.com/questdb/questdb/releases/download/${finalAttrs.version}/questdb-${finalAttrs.version}-no-jre-bin.tar.gz";
hash = "sha256-/EkqBK/mero219VUylNLVGD1ZzxBMAYpJ7NcU7BC+aw=";
};
nativeBuildInputs = [
makeBinaryWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/java
cp questdb.sh $out/bin
cp env.sh $out/bin
cp print-hello.sh $out/bin
cp questdb.jar $out/share/java
ln -s $out/share/java/questdb.jar $out/bin
wrapProgram $out/bin/questdb.sh --set JAVA_HOME "${jdk17_headless}"
runHook postInstall
'';
meta = {
description = "High-performance, open-source SQL database for applications in financial services, IoT, machine learning, DevOps and observability";
homepage = "https://questdb.io/";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.jacfal ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "quich";
version = "4.0.0";
src = fetchFromGitHub {
owner = "Usbac";
repo = "quich";
rev = "v${version}";
sha256 = "sha256-4gsSjLZ7Z4ErNqe86Fy5IrzLMfvDyY18sE0yBnj9bvM=";
};
doCheck = true;
makeFlags = [
"DESTDIR="
"PREFIX=$(out)"
"CC=${stdenv.cc.targetPrefix}cc"
];
meta = with lib; {
description = "Advanced terminal calculator";
longDescription = ''
Quich is a compact, fast, powerful and useful calculator for your terminal
with numerous features, supporting Windows and Linux Systems,
written in ANSI C.
'';
homepage = "https://github.com/Usbac/quich";
license = licenses.mit;
maintainers = [ maintainers.xdhampus ];
platforms = platforms.all;
mainProgram = "quich";
};
}

View File

@@ -0,0 +1,77 @@
{
buildPackages,
cmake,
fetchFromGitHub,
lib,
ninja,
stdenv,
testers,
quick-lint-js,
}:
let
version = "3.2.0";
src = fetchFromGitHub {
owner = "quick-lint";
repo = "quick-lint-js";
rev = version;
hash = "sha256-L2LCRm1Fsg+xRdPc8YmgxDnuXJo92nxs862ewzObZ3I=";
};
quick-lint-js-build-tools = buildPackages.stdenv.mkDerivation {
pname = "quick-lint-js-build-tools";
inherit version src;
nativeBuildInputs = [
cmake
ninja
];
doCheck = false;
cmakeFlags = [
"-DQUICK_LINT_JS_ENABLE_BUILD_TOOLS=ON"
# Temporary workaround for https://github.com/NixOS/nixpkgs/pull/108496#issuecomment-1192083379
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
ninjaFlags = "quick-lint-js-build-tools";
installPhase = ''
runHook preInstall
cmake --install . --component build-tools
runHook postInstall
'';
};
in
stdenv.mkDerivation {
pname = "quick-lint-js";
inherit version src;
nativeBuildInputs = [
cmake
ninja
];
doCheck = true;
cmakeFlags = [
"-DQUICK_LINT_JS_USE_BUILD_TOOLS=${quick-lint-js-build-tools}/bin"
# Temporary workaround for https://github.com/NixOS/nixpkgs/pull/108496#issuecomment-1192083379
"-DCMAKE_SKIP_BUILD_RPATH=ON"
];
passthru.tests = {
version = testers.testVersion { package = quick-lint-js; };
};
meta = with lib; {
description = "Find bugs in Javascript programs";
mainProgram = "quick-lint-js";
homepage = "https://quick-lint-js.com";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ratsclub ];
platforms = platforms.all;
};
# Expose quick-lint-js-build-tools to nix repl as quick-lint-js.build-tools.
passthru.build-tools = quick-lint-js-build-tools;
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
gobject-introspection,
wrapGAppsHook4,
desktop-file-utils,
libadwaita,
gjs,
webkitgtk_6_0,
glib-networking,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quick-lookup";
version = "2.1.2";
src = fetchFromGitHub {
owner = "johnfactotum";
repo = "quick-lookup";
tag = finalAttrs.version;
hash = "sha256-KENHYdhB1OHIB1RKyv78QFdsq3fYRqKgBDCFPLxHZ+k=";
};
postPatch = ''
substituteInPlace post_install.py \
--replace-fail 'gtk-update-icon-cache' 'gtk4-update-icon-cache'
'';
nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection
wrapGAppsHook4
desktop-file-utils
];
buildInputs = [
libadwaita
gjs
webkitgtk_6_0
glib-networking
];
meta = {
description = "Simple GTK dictionary application powered by Wiktionary";
homepage = "https://github.com/johnfactotum/quick-lookup";
license = lib.licenses.gpl3Plus;
mainProgram = "quick-lookup";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitLab,
pkg-config,
cmake,
arpa2cm,
arpa2common,
quickmem,
cyrus_sasl,
quickder,
libkrb5,
libev,
e2fsprogs,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quick-sasl";
version = "0.13.2";
src = fetchFromGitLab {
owner = "arpa2";
repo = "quick-sasl";
tag = "v${finalAttrs.version}";
hash = "sha256-kMKZRromm/hb9PZwvWAzmJorSqTB8xMIbWASfSjajiQ=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
libkrb5
];
buildInputs = [
arpa2cm
arpa2common
quickmem
cyrus_sasl
quickder
libev
e2fsprogs
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Gentle wrapper around any SASL implementation";
homepage = "https://gitlab.com/arpa2/Quick-SASL";
changelog = "https://gitlab.com/arpa2/Quick-SASL/-/blob/v${finalAttrs.version}/CHANGES";
license = lib.licenses.bsd2;
platforms = lib.platforms.linux;
teams = with lib.teams; [ ngi ];
maintainers = with lib.maintainers; [ ethancedwards8 ];
mainProgram = "qsasl-server";
};
})

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
just,
pkg-config,
makeBinaryWrapper,
libcosmicAppHook,
libxkbcommon,
openssl,
wayland,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "quick-webapps";
version = "1.0.2";
src = fetchFromGitHub {
owner = "cosmic-utils";
repo = "web-apps";
tag = finalAttrs.version;
hash = "sha256-yd4lALm7eG4NxrvaduZC1SZEE83j/nRsG2ufrfUMJJM=";
};
cargoHash = "sha256-gg8WCzKbpFT8SRzMxC7ezvv+uN9IpIbGy/yytFC9uaM=";
nativeBuildInputs = [
just
pkg-config
libcosmicAppHook
];
buildInputs = [
libxkbcommon
openssl
];
env.VERGEN_GIT_SHA = finalAttrs.src.tag;
dontUseJustBuild = true;
dontUseJustCheck = true;
justFlags = [
"--set"
"prefix"
(placeholder "out")
"--set"
"bin-src"
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/quick-webapps"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Web App Manager for the COSMIC desktop";
homepage = "https://github.com/cosmic-utils/web-apps";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ pluiedev ];
mainProgram = "quick-webapps";
};
})

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchFromGitLab,
python3,
cmake,
doxygen,
graphviz,
quickmem,
arpa2common,
arpa2cm,
ensureNewerSourcesForZipFilesHook,
}:
let
python =
let
packageOverrides = self: super: {
pyparsing = super.pyparsing.overridePythonAttrs (old: rec {
version = "3.1.2";
src = fetchFromGitHub {
owner = "pyparsing";
repo = "pyparsing";
rev = "refs/tags/${version}";
hash = "sha256-0B8DjO4kLgvt4sYsk8CZI+5icdKy73XE2tWeqVLqO5A=";
};
});
};
in
python3.override {
inherit packageOverrides;
self = python;
};
in
stdenv.mkDerivation rec {
pname = "quickder";
version = "1.7.1";
src = fetchFromGitLab {
owner = "arpa2";
repo = "quick-der";
rev = "v${version}";
hash = "sha256-f+ph5PL+uWRkswpOLDwZFWjh938wxoJ6xocJZ2WZLEk=";
};
nativeBuildInputs = [
cmake
doxygen
graphviz
ensureNewerSourcesForZipFilesHook
];
buildInputs = [
arpa2cm
arpa2common
(python.withPackages (
ps: with ps; [
asn1ate
colored
pyparsing
setuptools
six
]
))
quickmem
];
postPatch = ''
substituteInPlace setup.py --replace 'pyparsing==' 'pyparsing>='
'';
doCheck = true;
meta = with lib; {
description = "Quick (and Easy) DER, a Library for parsing ASN.1";
homepage = "https://gitlab.com/arpa2/quick-der/";
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ leenaars ];
};
}

View File

@@ -0,0 +1,126 @@
{
lib,
fetchFromGitHub,
fetchpatch,
stdenv,
makeWrapper,
gitUpdater,
cdrtools,
curl,
gawk,
mesa-demos,
gnugrep,
gnused,
jq,
pciutils,
procps,
python3,
qemu,
socat,
spice-gtk,
swtpm,
usbutils,
util-linux,
unzip,
xdg-user-dirs,
xrandr,
zsync,
OVMF,
OVMFFull,
testers,
installShellFiles,
}:
let
runtimePaths = [
cdrtools
curl
gawk
gnugrep
gnused
jq
pciutils
procps
python3
(qemu.override { smbdSupport = true; })
socat
swtpm
util-linux
unzip
xrandr
zsync
]
++ lib.optionals stdenv.hostPlatform.isLinux [
mesa-demos
usbutils
xdg-user-dirs
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "quickemu";
version = "4.9.7";
src = fetchFromGitHub {
owner = "quickemu-project";
repo = "quickemu";
rev = finalAttrs.version;
hash = "sha256-sCoCcN6950pH33bRZsLoLc1oSs5Qfpj9Bbywn/uA6Bc=";
};
patches = [
(fetchpatch {
name = "correctly-handle-version-10.0.0-of-qemu.patch";
url = "https://github.com/quickemu-project/quickemu/commit/f25205f4513c4fa72be6940081c62e613d1fddc6.patch";
hash = "sha256-OAXGyhMVDwbUypEPj/eRnH0wZYaL9WLGjbyoobe20UY=";
})
];
postPatch = ''
sed -i \
-e '/OVMF_CODE_4M.secboot.fd/s|ovmfs=(|ovmfs=("${OVMFFull.firmware}","${OVMFFull.variables}" |' \
-e '/OVMF_CODE_4M.fd/s|ovmfs=(|ovmfs=("${OVMF.firmware}","${OVMF.variables}" |' \
-e '/cp "''${VARS_IN}" "''${VARS_OUT}"/a chmod +w "''${VARS_OUT}"' \
-e 's/Icon=.*qemu.svg/Icon=qemu/' \
-e 's,\[ -x "\$(command -v smbd)" \],true,' \
quickemu
'';
nativeBuildInputs = [
makeWrapper
installShellFiles
];
installPhase = ''
runHook preInstall
installManPage docs/quickget.1 docs/quickemu.1 docs/quickemu_conf.5
install -Dm755 -t "$out/bin" chunkcheck quickemu quickget quickreport
# spice-gtk needs to be put in suffix so that when virtualisation.spiceUSBRedirection
# is enabled, the wrapped spice-client-glib-usb-acl-helper is used
for f in chunkcheck quickget quickemu quickreport; do
wrapProgram $out/bin/$f \
--prefix PATH : "${lib.makeBinPath runtimePaths}" \
--suffix PATH : "${lib.makeBinPath [ spice-gtk ]}"
done
runHook postInstall
'';
passthru = {
tests = testers.testVersion { package = finalAttrs.finalPackage; };
updateScript = gitUpdater { };
};
meta = {
description = "Quickly create and run optimised Windows, macOS and Linux virtual machines";
homepage = "https://github.com/quickemu-project/quickemu";
changelog = "https://github.com/quickemu-project/quickemu/releases/tag/${finalAttrs.version}";
mainProgram = "quickemu";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
fedx-sudo
flexiondotorg
];
};
})

View File

@@ -0,0 +1,65 @@
diff -u -r source-baseline-patchPhase/configure.ac source/configure.ac
--- source-baseline-patchPhase/configure.ac 1970-01-01 00:00:01.000000000 +0000
+++ source/configure.ac 2021-01-12 22:49:28.948861699 +0000
@@ -43,7 +43,7 @@
AC_CANONICAL_HOST
-build_no_unit_test = no
+build_no_unit_test = yes
# Detect the target system
case "${host_os}" in
@@ -344,8 +344,6 @@
examples/Makefile
examples/executor/Makefile
examples/executor/C++/Makefile
- examples/ordermatch/Makefile
- examples/ordermatch/test/Makefile
examples/tradeclient/Makefile
examples/tradeclientgui/Makefile
examples/tradeclientgui/banzai/Makefile
diff -u -r source-baseline-patchPhase/examples/Makefile.am source/examples/Makefile.am
--- source-baseline-patchPhase/examples/Makefile.am 1970-01-01 00:00:01.000000000 +0000
+++ source/examples/Makefile.am 2021-01-12 22:51:55.782568550 +0000
@@ -1,3 +1,3 @@
-SUBDIRS = executor ordermatch tradeclient tradeclientgui
+SUBDIRS = executor tradeclient tradeclientgui
-EXTRA_DIST = examples.dsw configure configure.in bootstrap Makefile.am
\ No newline at end of file
+EXTRA_DIST = examples.dsw configure configure.in bootstrap Makefile.am
diff -u -r source-baseline-patchPhase/src/Makefile.am source/src/Makefile.am
--- source-baseline-patchPhase/src/Makefile.am 1970-01-01 00:00:01.000000000 +0000
+++ source/src/Makefile.am 2021-01-12 22:53:02.593432380 +0000
@@ -15,27 +15,23 @@
if NO_UNIT_TEST
noinst_PROGRAMS =
else
-noinst_PROGRAMS = at ut pt
+noinst_PROGRAMS = at pt
endif
at_SOURCES = at.cpp at_application.h
-ut_SOURCES = ut.cpp
pt_SOURCES = pt.cpp
EXTRA_DIST = getopt.c getopt-repl.h
at_LDADD = C++/libquickfix.la
-ut_LDADD = C++/test/libquickfixcpptest.la C++/libquickfix.la
pt_LDADD = C++/libquickfix.la
INCLUDES =-IC++ -IC++/test -I../UnitTest++/src
-LDFLAGS =-L../UnitTest++ -lUnitTest++
+
all-local:
- rm -f ../test/ut ../test/pt ../test/at ../test/ut_debug
- ln -s ../src/ut ../test/ut
+ rm -rf ../test/pt ../test/at ../test/ut_debug
ln -s ../src/pt ../test/pt
ln -s ../src/at ../test/at
- ln -s ../src/.libs/ut ../test/ut_debug
clean-local:

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoconf,
automake,
libtool,
}:
stdenv.mkDerivation rec {
pname = "quickfix";
version = "1.15.1";
src = fetchFromGitHub {
owner = "quickfix";
repo = "quickfix";
rev = "v${version}";
sha256 = "1fgpwgvyw992mbiawgza34427aakn5zrik3sjld0i924a9d17qwg";
};
patches = [
# Improved C++17 compatibility
(fetchpatch {
url = "https://github.com/quickfix/quickfix/commit/a46708090444826c5f46a5dbf2ba4b069b413c58.diff";
sha256 = "1wlk4j0wmck0zm6a70g3nrnq8fz0id7wnyxn81f7w048061ldhyd";
})
./disableUnitTests.patch
];
# autoreconfHook does not work
nativeBuildInputs = [
autoconf
automake
libtool
];
enableParallelBuilding = true;
postPatch = ''
substituteInPlace bootstrap --replace-fail glibtoolize libtoolize
'';
preConfigure = ''
./bootstrap
'';
# More hacking out of the unittests
preBuild = ''
substituteInPlace Makefile --replace 'UnitTest++' ' '
'';
meta = with lib; {
description = "C++ Fix Engine Library";
homepage = "http://www.quickfixengine.org";
license = licenses.free; # similar to BSD 4-clause
maintainers = with maintainers; [ bhipple ];
broken = stdenv.hostPlatform.isAarch64;
};
}

View File

@@ -0,0 +1,67 @@
{
fetchFromGitHub,
makeDesktopItem,
copyDesktopItems,
lib,
flutter332,
quickemu,
}:
flutter332.buildFlutterApplication rec {
pname = "quickgui";
version = "1.2.10";
src = fetchFromGitHub {
owner = "quickemu-project";
repo = "quickgui";
rev = version;
hash = "sha256-M2Qy66RqsjXg7ZpHwaXCN8qXRIsisnIyaENx3KqmUfQ=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
};
extraWrapProgramArgs = "--prefix PATH : ${
lib.makeBinPath [
quickemu
]
}";
nativeBuildInputs = [ copyDesktopItems ];
postFixup = ''
for n in 16 32 48 64 128 256 512; do
size=$n"x"$n
mkdir -p $out/share/icons/hicolor/$size/apps/
cp -av assets/resources/quickgui_$n.png $out/share/icons/hicolor/$size/apps/quickgui.png
done
'';
desktopItems = [
(makeDesktopItem {
name = "quickgui";
exec = "quickgui";
icon = "quickgui";
desktopName = "Quickgui";
comment = "An elegant virtual machine manager for the desktop";
categories = [
"Development"
"System"
];
})
];
meta = with lib; {
description = "Elegant virtual machine manager for the desktop";
homepage = "https://github.com/quickemu-project/quickgui";
changelog = "https://github.com/quickemu-project/quickgui/releases/";
license = licenses.mit;
maintainers = with maintainers; [
flexiondotorg
heyimnova
];
platforms = [ "x86_64-linux" ];
mainProgram = "quickgui";
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,74 @@
{
lib,
cmake,
fetchFromGitHub,
stdenv,
testers,
texinfo,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quickjs-ng";
version = "0.10.1";
src = fetchFromGitHub {
owner = "quickjs-ng";
repo = "quickjs";
tag = "v${finalAttrs.version}";
hash = "sha256-WtjHyqxibP6bAO9HsXuqAW/Y1qgt/Tpj401CIk4bY7o=";
};
outputs = [
"out"
"bin"
"dev"
"doc"
"info"
];
nativeBuildInputs = [
cmake
texinfo
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "BUILD_STATIC_QJS_EXE" stdenv.hostPlatform.isStatic)
];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
"-Wno-error=stringop-overflow"
]
);
strictDeps = true;
postBuild = ''
pushd ../docs
makeinfo *texi
popd
'';
postInstall = ''
pushd ../docs
install -Dm644 -t ''${!outputInfo}/share/info *info
popd
'';
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "qjs --help || true";
};
};
meta = {
homepage = "https://github.com/quickjs-ng/quickjs";
description = "Mighty JavaScript engine";
license = lib.licenses.mit;
mainProgram = "qjs";
maintainers = [ ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,123 @@
{
lib,
fetchurl,
stdenv,
testers,
texinfo,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quickjs";
version = "2025-04-26";
src = fetchurl {
url = "https://bellard.org/quickjs/quickjs-${finalAttrs.version}.tar.xz";
hash = "sha256-LyAHTCUWbvb3gfOBxQ1XtQLLhdRw1jmrzOu+95VMg78=";
};
outputs = [
"out"
"info"
];
nativeBuildInputs = [
texinfo
];
makeFlags = [ "PREFIX=$(out)" ];
doInstallCheck = true;
enableParallelBuilding = true;
strictDeps = true;
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile \
--replace "CONFIG_LTO=y" ""
'';
postBuild = ''
make doc/version.texi
pushd doc
makeinfo *texi
popd
'';
postInstall = ''
pushd doc
install -Dm644 -t ''${!outputInfo}/share/info *info
popd
'';
installCheckPhase = lib.concatStringsSep "\n" [
''
runHook preInstallCheck
''
''
PATH="$out/bin:$PATH"
''
# Programs exit with code 1 when testing help, so grep for a string
''
set +o pipefail
qjs --help 2>&1 | grep "QuickJS version"
set -o pipefail
''
''
temp=$(mktemp).js
echo "console.log('Output from compiled program');" > "$temp"
set -o verbose
out=$(mktemp) && qjsc -o "$out" "$temp" && "$out" | grep -q "Output from compiled program"
out=$(mktemp) && qjsc -flto -o "$out" "$temp" && "$out" | grep -q "Output from compiled program"
''
''
runHook postInstallCheck
''
];
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "qjs --help || true";
};
};
meta = {
homepage = "https://bellard.org/quickjs/";
description = "Small and embeddable Javascript engine";
longDescription = ''
QuickJS is a small and embeddable Javascript engine. It supports the
ES2023 specification including modules, asynchronous generators, proxies
and BigInt.
Main Features:
- Small and easily embeddable: just a few C files, no external
dependency, 210 KiB of x86 code for a simple hello world program.
- Fast interpreter with very low startup time: runs the 76000 tests of
the ECMAScript Test Suite in less than 2 minutes on a single core of a
desktop PC. The complete life cycle of a runtime instance completes in
less than 300 microseconds.
- Almost complete ES2023 support including modules, asynchronous
generators and full Annex B support (legacy web compatibility).
- Passes nearly 100% of the ECMAScript Test Suite tests when selecting
the ES2023 features. A summary is available at Test262 Report.
- Can compile Javascript sources to executables with no external dependency.
- Garbage collection using reference counting (to reduce memory usage and
have deterministic behavior) with cycle removal.
- Command line interpreter with contextual colorization implemented in
Javascript.
- Small built-in standard library with C library wrappers.
'';
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
stesie
];
mainProgram = "qjs";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitLab,
cmake,
doxygen,
graphviz,
arpa2common,
arpa2cm,
}:
stdenv.mkDerivation rec {
pname = "quickmem";
version = "0.3.0";
src = fetchFromGitLab {
owner = "arpa2";
repo = "Quick-MEM";
rev = "v${version}";
hash = "sha256-cqg8QN4/I+zql7lVDDAgFA05Dmg4ylBTvPSPP7WATdc=";
};
nativeBuildInputs = [
cmake
doxygen
graphviz
];
buildInputs = [
arpa2cm
arpa2common
];
doCheck = true;
meta = with lib; {
description = "Memory pooling for ARPA2 projects";
homepage = "https://gitlab.com/arpa2/Quick-MEM/";
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ leungbk ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "quicksand";
version = "2.0-unstable-2021-01-15";
src = fetchFromGitHub {
owner = "andrew-paglinawan";
repo = "QuicksandFamily";
rev = "be4b9d638e1c79fa42d4a0ab0aa7fe29466419c7";
hash = "sha256-zkxm2u35Ll2qyCoUeuA0eumVjNSel+y1kkWoHxeNI/g=";
sparseCheckout = [ "fonts" ];
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/quicksand
install -Dm444 fonts/*.ttf -t $out/share/fonts/quicksand/
install -Dm444 fonts/statics/*.ttf -t $out/share/fonts/quicksand/
runHook postInstall
'';
meta = {
homepage = "https://github.com/andrew-paglinawan/QuicksandFamily";
description = "Sans serif font designed using geometric shapes";
longDescription = ''
Quicksand is a sans serif typeface designed by Andrew Paglinawan
in 2008 using geometric shapes as it's core foundation. It is
designed for display purposes but legible enough to use in small
sizes as well. Quicksand Family is available in three styles
which are Light, Regular and Bold including true italics for each weight.
'';
license = with lib.licenses; [ ofl ];
maintainers = with lib.maintainers; [ hubble ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchFromGitea,
pkg-config,
cmake,
ninja,
spirv-tools,
qt6,
breakpad,
jemalloc,
cli11,
wayland,
wayland-protocols,
wayland-scanner,
xorg,
libdrm,
libgbm,
pipewire,
pam,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quickshell";
version = "0.2.0";
# github mirror: https://github.com/quickshell-mirror/quickshell
src = fetchFromGitea {
domain = "git.outfoxxed.me";
owner = "quickshell";
repo = "quickshell";
tag = "v${finalAttrs.version}";
hash = "sha256-vqkSDvh7hWhPvNjMjEDV4KbSCv2jyl2Arh73ZXe274k=";
};
nativeBuildInputs = [
cmake
ninja
qt6.qtshadertools
spirv-tools
wayland-scanner
qt6.wrapQtAppsHook
pkg-config
];
buildInputs = [
qt6.qtbase
qt6.qtdeclarative
qt6.qtwayland
qt6.qtsvg
cli11
wayland
wayland-protocols
libdrm
libgbm
breakpad
jemalloc
xorg.libxcb
pam
pipewire
];
cmakeFlags = [
(lib.cmakeFeature "DISTRIBUTOR" "Nixpkgs")
(lib.cmakeBool "DISTRIBUTOR_DEBUGINFO_AVAILABLE" true)
(lib.cmakeFeature "INSTALL_QML_PREFIX" qt6.qtbase.qtQmlPrefix)
(lib.cmakeFeature "GIT_REVISION" "tag-v${finalAttrs.version}")
];
cmakeBuildType = "RelWithDebInfo";
separateDebugInfo = true;
dontStrip = false;
meta = {
homepage = "https://quickshell.org";
description = "Flexbile QtQuick based desktop shell toolkit";
license = lib.licenses.lgpl3Only;
platforms = lib.platforms.linux;
mainProgram = "quickshell";
maintainers = with lib.maintainers; [ outfoxxed ];
};
})

View File

@@ -0,0 +1,25 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "quicktemplate";
version = "1.8.0";
src = fetchFromGitHub {
owner = "valyala";
repo = "quicktemplate";
rev = "v${version}";
sha256 = "cra3LZ3Yq0KNQErQ2q0bVSy7rOLKdSkIryIgQsNRBHw=";
};
vendorHash = null;
meta = with lib; {
homepage = "https://github.com/valyala/quicktemplate";
description = "Fast, powerful, yet easy to use template engine for Go";
license = licenses.mit;
mainProgram = "qtc";
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
libsodium,
nixosTests,
}:
stdenv.mkDerivation {
pname = "quicktun";
version = "2.2.5";
src = fetchFromGitHub {
owner = "UCIS";
repo = "QuickTun";
rev = "2d0c6a9cda8c21f921a5d1197aeee92e9568ca39";
sha256 = "1ydvwasj84qljfbzh6lmhyzjc20yw24a0v2mykp8afsm97zzlqgx";
};
patches = [ ./tar-1.30.diff ]; # quicktun master seems not to need this
buildInputs = [ libsodium ];
postPatch = ''
substituteInPlace build.sh \
--replace "cc=\"cc\"" "cc=\"$CC\""
'';
buildPhase = ''
runHook preBuild
bash build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
rm out/quicktun*tgz
install -vD out/quicktun* -t $out/bin
runHook postInstall
'';
passthru.tests.quicktun = nixosTests.quicktun;
meta = with lib; {
broken = stdenv.hostPlatform.isDarwin;
description = "Very simple, yet secure VPN software";
homepage = "http://wiki.ucis.nl/QuickTun";
maintainers = with maintainers; [ h7x4 ];
platforms = platforms.unix;
license = licenses.bsd2;
};
}

View File

@@ -0,0 +1,19 @@
Fix build with gnutar-1.30
Creating source archive...
tar: The following options were used after any non-optional arguments in archive create or update mode. These options are positional and affect only arguments that follow them. Please, rearrange them properly.
tar: --exclude 'debian/data' has no effect
tar: Exiting with failure status due to previous errors
diff --git a/build.sh b/build.sh
index 0ea0403..725178c 100755
--- a/build.sh
+++ b/build.sh
@@ -25,7 +25,7 @@ rm -rf out/ obj/ tmp/
mkdir -p out
if [ "$1" != "debian" ]; then
echo Creating source archive...
- $tar --transform "s,^,quicktun-`cat version`/," -czf "out/quicktun-`cat version`.tgz" build.sh clean.sh debian src version --exclude "debian/data"
+ $tar --transform "s,^,quicktun-`cat version`/," -czf "out/quicktun-`cat version`.tgz" --exclude "debian/data" build.sh clean.sh debian src version
fi
mkdir -p obj tmp tmp/include tmp/lib

View File

@@ -0,0 +1,42 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
jq,
quicktype,
testers,
}:
buildNpmPackage rec {
pname = "quicktype";
version = "23.0.105"; # version from https://npm.im/quicktype
src = fetchFromGitHub {
owner = "glideapps";
repo = "quicktype";
rev = "0b5924db1d3858d6f4abe5923cce53b2f4e581aa"; # version not tagged
hash = "sha256-JqpTnIhxLxLECqW8DjG1Oig/HOs9PpwmjdfhwE8sJAA=";
};
postPatch = ''
cat <<< $(${jq}/bin/jq '.version = "${version}"' package.json) > package.json
'';
npmDepsHash = "sha256-RA4HVQfB/ge1aIKl9HiUT7vUM5n+Ro6N2D6xj1dgSu8=";
postInstall = ''
mv packages/ $out/lib/node_modules/quicktype/
'';
passthru.tests = {
version = testers.testVersion { package = quicktype; };
};
meta = with lib; {
description = "Generate types and converters from JSON, Schema, and GraphQL";
homepage = "https://quicktype.io/";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "quicktype";
};
}

9761
pkgs/by-name/qu/quickwit/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,149 @@
{
stdenv,
lib,
fetchFromGitHub,
rustPlatform,
nixosTests,
nix-update-script,
protobuf,
rust-jemalloc-sys,
nodejs,
yarn,
fetchYarnDeps,
fixup-yarn-lock,
}:
let
pname = "quickwit";
version = "0.8.2";
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/quickwit/quickwit-ui/yarn.lock";
hash = "sha256-HppK9ycUxCOIagvzCmE+VfcmfMQfPIC8WeWM6WbA6fQ=";
};
src = fetchFromGitHub {
owner = "quickwit-oss";
repo = "quickwit";
rev = "v${version}";
hash = "sha256-OrCO0mCFmhYBdpr4Gps56KJJ37uuJpV6ZJHWspOScyw=";
};
quickwit-ui = stdenv.mkDerivation {
name = "quickwit-ui";
src = "${src}/quickwit/quickwit-ui";
nativeBuildInputs = [
nodejs
yarn
fixup-yarn-lock
];
configurePhase = ''
export HOME=$(mktemp -d)
'';
buildPhase = ''
yarn config --offline set yarn-offline-mirror ${yarnOfflineCache}
fixup-yarn-lock yarn.lock
yarn install --offline \
--frozen-lockfile --no-progress \
--ignore-engines --ignore-scripts
patchShebangs .
yarn build
'';
installPhase = ''
mkdir $out
mv build/* $out
'';
};
in
rustPlatform.buildRustPackage rec {
inherit pname version src;
postPatch = ''
substituteInPlace ./quickwit-ingest/build.rs \
--replace-fail '.with_protos' '.with_includes(&["."]).with_protos'
substituteInPlace ./quickwit-codegen/example/build.rs \
--replace-fail '.with_protos' '.with_includes(&["."]).with_protos'
substituteInPlace ./quickwit-proto/build.rs \
--replace-fail '.with_protos' '.with_includes(&["."]).with_protos'
cp /build/cargo-vendor-dir/Cargo.lock /build/source/quickwit/Cargo.lock
'';
sourceRoot = "${src.name}/quickwit";
preBuild = ''
mkdir -p quickwit-ui/build
cp -r ${quickwit-ui}/* quickwit-ui/build
'';
buildInputs = [
rust-jemalloc-sys
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"chitchat-0.8.0" = "sha256-6K2noPoFaDnOxQIEV1WbmVPfRGwlI/WS1OWSBH2qb1Q=";
"mrecordlog-0.4.0" = "sha256-9LIVs+BqK9FLSfHL3vm9LL+/FXIXJ6v617QLv4luQik=";
"ownedbytes-0.6.0" = "sha256-in18/NYYIgUiZ9sm8NgJlebWidRp34DR7AhOD1Nh0aw=";
"pulsar-5.0.2" = "sha256-j7wpsAro6x4fk3pvSL4fxLkddJFq8duZ7jDj0Edf3YQ=";
"sasl2-sys-0.1.20+2.1.28" = "sha256-u4BsfmTDFxuY3i1amLCsr7MDv356YPThMHclura0Sxs=";
"whichlang-0.1.0" = "sha256-7AvLGjtWHjG0TnZdg9p5D+O0H19uo2sqPxJMn6mOU0k=";
};
};
CARGO_PROFILE_RELEASE_LTO = "fat";
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
# needed for internal protobuf c wrapper library
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
passthru = {
tests = {
inherit (nixosTests) quickwit;
inherit (nixosTests.vector) syslog-quickwit;
};
updateScript = nix-update-script { };
};
checkFlags = [
# tries to make a network access
"--skip=test_all_local_index"
"--skip=test_cmd_create"
"--skip=test_cmd_create_no_index_uri"
"--skip=test_cmd_search_aggregation"
"--skip=test_cmd_search_with_snippets"
"--skip=test_delete_index_cli"
"--skip=test_delete_index_cli_dry_run"
"--skip=test_ingest_docs_cli"
"--skip=test_ingest_docs_cli_keep_cache"
"--skip=test_search_index_cli"
"--skip=test_garbage_collect_cli_no_grace"
"--skip=actors::indexing_service::tests::test_indexing_service_spawn_observe_detach"
"--skip=object_storage::s3_compatible_storage::tests::test_s3_compatible_storage_relative_path"
# flaky test
"--skip=actors::indexer::tests::test_indexer_triggers_commit_on_drained_mailbox"
"--skip=actors::indexer::tests::test_indexer_triggers_commit_on_timeout"
"--skip=actors::indexer::tests::test_indexer_partitioning"
"--skip=actors::indexing_pipeline::tests::test_merge_pipeline_does_not_stop_on_indexing_pipeline_failure"
"--skip=actors::indexer::tests::test_indexer_triggers_commit_on_target_num_docs"
"--skip=actors::packager::tests::test_packager_simple"
# fail on darwin for some reason
"--skip=io::tests::test_controlled_writer_limited_async"
"--skip=io::tests::test_controlled_writer_limited_sync"
];
meta = with lib; {
description = "Sub-second search & analytics engine on cloud storage";
homepage = "https://quickwit.io/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ happysalada ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchurl,
appimageTools,
makeWrapper,
_7zz,
}:
let
pname = "quiet";
version = "6.0.0";
meta = {
description = "Private, p2p alternative to Slack and Discord built on Tor & IPFS";
homepage = "https://github.com/TryQuiet/quiet";
changelog = "https://github.com/TryQuiet/quiet/releases/tag/@quiet/desktop@${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ kashw2 ];
};
linux = appimageTools.wrapType2 {
inherit pname version;
src = fetchurl {
url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.AppImage";
hash = "sha256-YIkbS3L6DIof9gsgHKaguHIwGggVLjQXPM8o7810Wgs=";
};
meta = meta // {
platforms = lib.platforms.linux;
};
};
darwin = stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/TryQuiet/quiet/releases/download/@quiet/desktop@${version}/Quiet-${version}.dmg";
hash = "sha256-B1rT+6U0gjScr1FPuh3xGxkpfumT/8feTJbEbCgXPpo=";
};
nativeBuildInputs = [
_7zz
makeWrapper
];
sourceRoot = "Quiet ${version}";
unpackPhase = ''
runHook preUnpack
7zz x $src -x!Quiet\ ${version}/Applications
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{Applications,bin}
mv Quiet.app $out/Applications
makeWrapper $out/Applications/Quiet.app/Contents/MacOS/Quiet $out/bin/${pname}
runHook postInstall
'';
meta = meta // {
platforms = lib.platforms.darwin;
};
};
in
if stdenv.hostPlatform.isDarwin then darwin else linux

View File

@@ -0,0 +1,30 @@
{
cmake,
fetchFromGitHub,
lib,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quill-log";
version = "10.1.0";
src = fetchFromGitHub {
owner = "odygrd";
repo = "quill";
tag = "v${finalAttrs.version}";
hash = "sha256-nCU+7y2ssvV8VDxQ51fjG4d/vsmWRkHpWWoUaXNTQcQ=";
};
nativeBuildInputs = [ cmake ];
meta = {
homepage = "https://github.com/odygrd/quill";
changelog = "https://github.com/odygrd/quill/blob/master/CHANGELOG.md";
downloadPage = "https://github.com/odygrd/quill";
description = "Asynchronous Low Latency C++17 Logging Library";
platforms = lib.platforms.all;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.odygrd ];
};
})

View File

@@ -0,0 +1,49 @@
{
coreutils,
fetchFromGitHub,
gzip,
jq,
lib,
makeWrapper,
qrencode,
stdenvNoCC,
}:
stdenvNoCC.mkDerivation rec {
pname = "quill-qr";
version = "0.1.0";
src = fetchFromGitHub {
owner = "IvanMalison";
repo = "quill-qr";
rev = "v${version}";
sha256 = "1kdsq6csmxfvs2wy31bc9r92l5pkmzlzkyqrangvrf4pbk3sk0r6";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -a quill-qr.sh $out/bin/quill-qr.sh
patchShebangs $out/bin
wrapProgram $out/bin/quill-qr.sh --prefix PATH : "${
lib.makeBinPath [
qrencode
coreutils
jq
gzip
]
}"
'';
meta = with lib; {
description = "Print QR codes for use with https://p5deo-6aaaa-aaaab-aaaxq-cai.raw.ic0.app";
mainProgram = "quill-qr.sh";
homepage = "https://github.com/IvanMalison/quill-qr";
maintainers = with maintainers; [ imalison ];
platforms = with platforms; linux;
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
openssl,
libiconv,
udev,
pkg-config,
protobuf,
buildPackages,
}:
rustPlatform.buildRustPackage rec {
pname = "quill";
version = "0.5.3";
src = fetchFromGitHub {
owner = "dfinity";
repo = "quill";
rev = "v${version}";
hash = "sha256-lCDKM9zzGcey4oWp6imiHvGSNRor0xhlmlhRkSXFLlU=";
};
ic = fetchFromGitHub {
owner = "dfinity";
repo = "ic";
rev = "2f9ae6bf5eafed03599fd29475100aca9f78ae81";
hash = "sha256-QWJFsWZ9miWN4ql4xFXMQM1Y71nzgGCL57yAa0j7ch4=";
};
registry = "file://local-registry";
preBuild = ''
export REGISTRY_TRANSPORT_PROTO_INCLUDES=${ic}/rs/registry/transport/proto
export IC_BASE_TYPES_PROTO_INCLUDES=${ic}/rs/types/base_types/proto
export IC_PROTOBUF_PROTO_INCLUDES=${ic}/rs/protobuf/def
export IC_NNS_COMMON_PROTO_INCLUDES=${ic}/rs/nns/common/proto
export IC_ICRC1_ARCHIVE_WASM_PATH=${ic}/rs/rosetta-api/icrc1/wasm/ic-icrc1-archive.wasm.gz
export LEDGER_ARCHIVE_NODE_CANISTER_WASM_PATH=${ic}/rs/rosetta-api/icp_ledger/wasm/ledger-archive-node-canister.wasm
cp ${ic}/rs/rosetta-api/icp_ledger/ledger.did /build/quill-${version}-vendor/ledger.did
export PROTOC=${buildPackages.protobuf}/bin/protoc
export OPENSSL_DIR=${openssl.dev}
export OPENSSL_LIB_DIR=${lib.getLib openssl}/lib
'';
cargoHash = "sha256-rpsbQYA6RBYSo2g+YhYG02CYlboRQvIwMqPAybayCOs=";
nativeBuildInputs = [
pkg-config
protobuf
];
buildInputs = [
openssl
udev
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
meta = {
homepage = "https://github.com/dfinity/quill";
changelog = "https://github.com/dfinity/quill/releases/tag/v${version}";
description = "Minimalistic ledger and governance toolkit for cold wallets on the Internet Computer";
mainProgram = "quill";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ imalison ];
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
bash,
coreutils,
diffstat,
diffutils,
findutils,
gawk,
gnugrep,
gnused,
patch,
perl,
unixtools,
}:
stdenv.mkDerivation rec {
pname = "quilt";
version = "0.69";
src = fetchurl {
url = "mirror://savannah/${pname}/${pname}-${version}.tar.gz";
sha256 = "sha256-VV3f/eIto8htHK9anB+4oVKsK4RzBDe9OcwIhJyfSFI=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
bash
coreutils
diffstat
diffutils
findutils
gawk
gnugrep
gnused
patch
perl
unixtools.column
unixtools.getopt
];
strictDeps = true;
configureFlags = [
# configure only looks in $PATH by default,
# which does not include buildInputs if strictDeps is true
"--with-perl=${lib.getExe perl}"
];
postInstall = ''
wrapProgram $out/bin/quilt --prefix PATH : ${lib.makeBinPath buildInputs}
'';
meta = with lib; {
homepage = "https://savannah.nongnu.org/projects/quilt";
description = "Easily manage large numbers of patches";
longDescription = ''
Quilt allows you to easily manage large numbers of
patches by keeping track of the changes each patch
makes. Patches can be applied, un-applied, refreshed,
and more.
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ smancill ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,119 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
nodejs,
nodejs_20,
makeWrapper,
jre,
fetchzip,
buildNpmPackage,
}:
let
version = "0.25.1";
apalacheVersion = "0.47.2";
evaluatorVersion = "0.2.0";
metaCommon = {
description = "Formal specification language with TLA+ semantics";
homepage = "https://quint-lang.org";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ bugarela ];
};
src = fetchFromGitHub {
owner = "informalsystems";
repo = "quint";
tag = "v${version}";
hash = "sha256-CYQesIoDlIGCKXIJ/hpZqOZBVd19Or5VEKVERchJz68=";
};
# Build the Quint CLI from source
quint-cli = buildNpmPackage {
pname = "quint-cli";
inherit version src;
nativeBuildInputs = [ nodejs_20 ];
sourceRoot = "${src.name}/quint";
npmDepsHash = "sha256-FYNSr5B0/oJ4PbU/HUVqSdPG8kFvq4vRFnYwwdMf+jQ=";
npmBuildScript = "compile";
dontNpmPrune = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/quint
cp -r node_modules $out/share/quint
cp -r dist $out/share/quint
runHook postInstall
'';
meta = metaCommon // {
description = "CLI for the Quint formal specification language";
};
};
# Build the Rust evaluator from source
quint-evaluator = rustPlatform.buildRustPackage {
pname = "quint-evaluator";
version = evaluatorVersion;
inherit src;
sourceRoot = "${src.name}/evaluator";
# Skip tests during build, as many rust tests rely on the Quint CLI
doCheck = false;
cargoHash = "sha256-beWqUDaWWCbGL+V1LNtf35wZrIqWCCbFLYo5HCZF7FI=";
meta = metaCommon // {
description = "Evaluator for the Quint formal specification language";
};
};
# Download Apalache. It runs on the JVM, so no need to build it from source.
apalacheDist = fetchzip {
url = "https://github.com/apalache-mc/apalache/releases/download/v${apalacheVersion}/apalache.tgz";
hash = "sha256-P0QOxB14OSlphqBALR1YL9WJ0XYaUYE/R52yZytVzds=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "quint";
inherit version src;
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
dontConfigure = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
makeWrapper ${nodejs}/bin/node $out/bin/quint \
--add-flags "${quint-cli}/share/quint/dist/src/cli.js" \
--set QUINT_HOME "$out/share/quint" \
--prefix PATH : ${lib.makeBinPath [ jre ]}
install -Dm755 ${quint-evaluator}/bin/quint_evaluator -t $out/share/quint/rust-evaluator-v${evaluatorVersion}/
mkdir -p $out/share/quint/apalache-dist-${apalacheVersion}
cp -r ${apalacheDist} $out/share/quint/apalache-dist-${apalacheVersion}/apalache
chmod +x $out/share/quint/apalache-dist-${apalacheVersion}/apalache/bin/apalache-mc
runHook postInstall
'';
meta = metaCommon // {
mainProgram = "quint";
};
})

View File

@@ -0,0 +1,35 @@
{
stdenvNoCC,
fetchFromGitLab,
lib,
}:
stdenvNoCC.mkDerivation {
pname = "quintom-cursor-theme";
version = "unstable-2019-10-24";
src = fetchFromGitLab {
owner = "Burning_Cube";
repo = "quintom-cursor-theme";
rev = "d23e57333e816033cf20481bdb47bb1245ed5d4d";
hash = "sha256-Sec2DSnWYal6wzYzP9W+DDuTKHsFHWdRYyMzliMU5bU=A";
};
installPhase = ''
mkdir -p $out/share/icons
for theme in "Quintom_Ink" "Quintom_Snow"; do
cp -r "$theme Cursors/$theme" $out/share/icons/
done
'';
meta = with lib; {
description = "Cursor theme designed to look decent";
homepage = "https://gitlab.com/Burning_Cube/quintom-cursor-theme";
platforms = platforms.unix;
license = with licenses; [
cc-by-sa-40
gpl3Only
];
maintainers = with maintainers; [ frogamic ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation {
name = "quinze";
version = "2018-09-22";
src = fetchzip {
url = "https://fontlibrary.org/assets/downloads/quinze/0271bb7be00ea75dcfa06ef7c7f1054e/quinze.zip";
hash = "sha256-6C6drbAHme38tF2PtY/YFDdHCbR0JURs4F/K+KZqKiQ=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype *.ttf
runHook postInstall
'';
meta = with lib; {
description = "Narrow monospaced font, designed to fit a fifteen pixel bitmap";
homepage = "https://fontlibrary.org/en/font/quinze";
license = licenses.ofl;
maintainers = with maintainers; [ phunehehe ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,42 @@
From 7435b2e12c2004cb0c497ff313288902f2a6f39a Mon Sep 17 00:00:00 2001
From: toonn <toonn@toonn.io>
Date: Fri, 19 Jul 2024 21:53:58 +0200
Subject: [PATCH] Don't build demos
---
Makefile | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 8327b4e..7901cc5 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ DEMO_UTIL_OBJ = \
OPENCV_CFLAGS := $(shell pkg-config --cflags opencv4 2>&1)
OPENCV_LIBS = $(shell pkg-config --libs opencv4)
-QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) $(OPENCV_CFLAGS) --std=c++17
+QUIRC_CXXFLAGS = $(QUIRC_CFLAGS) --std=c++17
.PHONY: all v4l sdl opencv install uninstall clean
@@ -93,15 +93,12 @@ libquirc.$(VERSIONED_LIB_SUFFIX): $(LIB_OBJ)
.cxx.o:
$(CXX) $(QUIRC_CXXFLAGS) -o $@ -c $<
-install: libquirc.a libquirc.$(LIB_SUFFIX) quirc-demo quirc-scanner
+install: libquirc.a libquirc.$(LIB_SUFFIX)
install -o root -g root -m 0644 lib/quirc.h $(DESTDIR)$(PREFIX)/include
install -o root -g root -m 0644 libquirc.a $(DESTDIR)$(PREFIX)/lib
install -o root -g root -m 0755 libquirc.$(VERSIONED_LIB_SUFFIX) \
$(DESTDIR)$(PREFIX)/lib
cp -d libquirc.$(LIB_SUFFIX) $(DESTDIR)$(PREFIX)/lib
- install -o root -g root -m 0755 quirc-demo $(DESTDIR)$(PREFIX)/bin
- # install -o root -g root -m 0755 quirc-demo-opencv $(DESTDIR)$(PREFIX)/bin
- install -o root -g root -m 0755 quirc-scanner $(DESTDIR)$(PREFIX)/bin
uninstall:
rm -f $(DESTDIR)$(PREFIX)/include/quirc.h
--
2.42.2

View File

@@ -0,0 +1,81 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
libjpeg,
libpng,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "quirc";
version = "1.2";
src = fetchFromGitHub {
owner = "dlbeer";
repo = "quirc";
rev = "v${finalAttrs.version}";
hash = "sha256-zdq/YKL33jJXa10RqmQIl06rRYnrthWG+umT4dipft0=";
};
postPatch = ''
# use correct pkg-config / ar / ranlib for cross
# don't try to change ownership
substituteInPlace Makefile \
--replace-fail "ar " "${stdenv.cc.targetPrefix}ar " \
--replace-fail "ranlib " "${stdenv.cc.targetPrefix}ranlib " \
--replace-fail "-o root" "" \
--replace-fail "-g root" ""
'';
buildInputs = [
libjpeg
libpng
];
makeFlags = [
"PREFIX=$(out)"
"SDL_CFLAGS="
"SDL_LIBS="
"-o inspect"
"-o quirc-demo"
];
patches = [
(fetchpatch2 {
url = "https://github.com/dlbeer/quirc/commit/2c350d8aaf37246e538a2c93b2cce8c78600d2fc.patch?full_index=1";
hash = "sha256-ZTcy/EoOBoyOjtXjmT+J/JcbX8lxGKmbWer23lymbWo=";
})
(fetchpatch2 {
url = "https://github.com/dlbeer/quirc/commit/257c6c94d99960819ecabf72199e5822f60a3bc5.patch?full_index=1";
hash = "sha256-WLQK7vy34VmgJzppTnRjAcZoSGWVaXQSaGq9An8W0rw=";
})
# Disable building of Demos to not pull in unwanted dependencies
./0001-Don-t-build-demos.patch
];
preInstall = ''
mkdir -p "$out"/{bin,lib,include}
# install all binaries
find -maxdepth 1 -type f -executable ! -name '*.so.*' ! -name '*.dylib' \
| xargs cp -t "$out"/bin
'';
postInstall = ''
# don't install static library
rm $out/lib/libquirc.a
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# Set absolute install name to avoid the need for DYLD_LIBRARY_PATH
dylib=$out/lib/libquirc.${finalAttrs.version}.dylib
${stdenv.cc.targetPrefix}install_name_tool -id "$dylib" "$dylib"
'';
meta = {
description = "Small QR code decoding library";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,62 @@
{
lib,
python3,
fetchPypi,
fftw,
alsa-lib,
pulseaudio,
}:
python3.pkgs.buildPythonApplication rec {
pname = "quisk";
version = "4.2.44";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-OSGrLbCS255e/btagD7RCVpLpyIX1jveeJnzIwyegH4=";
};
buildInputs = [
fftw
alsa-lib
pulseaudio
];
build-system = with python3.pkgs; [
setuptools
];
dependencies = with python3.pkgs; [
pyusb
wxpython
];
doCheck = false;
pythonImportsCheck = [ "quisk" ];
meta = with lib; {
description = "SDR transceiver for radios that use the Hermes protocol";
longDescription = ''
QUISK is a Software Defined Radio (SDR) transceiver. You supply radio
hardware that converts signals at the antenna to complex (I/Q) data at an
intermediate frequency (IF). Data can come from a sound card, Ethernet or
USB. Quisk then filters and demodulates the data and sends the audio to
your speakers or headphones. For transmit, Quisk takes the microphone
signal, converts it to I/Q data and sends it to the hardware.
Quisk can be used with SoftRock, Hermes Lite 2, HiQSDR, Odyssey and many
radios that use the Hermes protocol. Quisk can connect to digital
programs like Fldigi and WSJT-X. Quisk can be connected to other software
like N1MM+ and software that uses Hamlib.
'';
license = licenses.gpl2Plus;
homepage = "https://james.ahlstrom.name/quisk/";
maintainers = with maintainers; [
pulsation
kashw2
];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,30 @@
{ lib, fetchurl }:
let
pname = "quivira";
version = "4.1";
in
fetchurl {
name = "${pname}-${version}";
url = "http://www.quivira-font.com/files/Quivira.otf";
# Download the source file to a temporary directory so that $out can be a
# directory with the expected structure.
downloadToTemp = true;
# recursiveHash needs to be true because $out is going to be a directory.
recursiveHash = true;
postFetch = ''
install -D $downloadedFile $out/share/fonts/opentype/Quivira.otf
'';
sha256 = "Hhl+0Oc5DDohOpBbEARMunMYCpr6nn4X6RgpQeEksNo=";
meta = {
description = "Free Unicode font in the OpenType format which is supported by every usual office program or printer";
homepage = "http://www.quivira-font.com/";
license = lib.licenses.publicDomain;
maintainers = [ lib.maintainers.nosewings ];
# From the homepage: "If you try to install Quivira on a Mac,
# you will get an error message about the 'post table
# usability'."
platforms = lib.filter (platform: !lib.hasInfix "darwin" platform) lib.platforms.all;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
fetchFromGitHub,
buildGoModule,
nixosTests,
}:
buildGoModule rec {
pname = "quorum";
version = "24.4.1";
src = fetchFromGitHub {
owner = "Consensys";
repo = "quorum";
rev = "v${version}";
hash = "sha256-pW8I4ivcKo6dsa8rQVKU6nUZuKxaki/7cMDKwEsSzNw=";
};
vendorHash = "sha256-YK2zpQz4pAFyA+aHOn6Nx0htl5SJ2HNC+TDV1RdLQJk=";
subPackages = [
"cmd/geth"
"cmd/bootnode"
];
ldflags = [
"-s"
"-w"
];
passthru.tests = { inherit (nixosTests) quorum; };
meta = with lib; {
description = "Permissioned implementation of Ethereum supporting data privacy";
homepage = "https://consensys.net/quorum/";
license = licenses.lgpl3;
maintainers = with maintainers; [ mmahut ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,19 @@
diff --git a/quitter.py b/quitter.py
index a42b9d0..f544ccb 100644
--- a/qutebrowser/misc/quitter.py
+++ b/qutebrowser/misc/quitter.py
@@ -112,13 +112,7 @@ class Quitter(QObject):
Return:
The commandline as a list of strings.
"""
- if os.path.basename(sys.argv[0]) == 'qutebrowser':
- # Launched via launcher script
- args = [sys.argv[0]]
- elif hasattr(sys, 'frozen'):
- args = [sys.executable]
- else:
- args = [sys.executable, '-m', 'qutebrowser']
+ args = ['@qutebrowser@']
# Add all open pages so they get reopened.
page_args = [] # type: typing.MutableSequence[str]

View File

@@ -0,0 +1,171 @@
{
stdenv,
lib,
fetchurl,
fetchzip,
python3,
glib-networking,
asciidoc,
docbook_xml_dtd_45,
docbook_xsl,
desktopToDarwinBundle,
libxml2,
libxslt,
withPdfReader ? true,
pipewireSupport ? stdenv.hostPlatform.isLinux,
pipewire,
qt6Packages,
enableWideVine ? false,
widevine-cdm,
# can cause issues on some graphics chips
enableVulkan ? false,
vulkan-loader,
}:
let
isQt6 = lib.versions.major qt6Packages.qtbase.version == "6";
pdfjs =
let
version = "5.3.31";
in
fetchzip {
url = "https://github.com/mozilla/pdf.js/releases/download/v${version}/pdfjs-${version}-dist.zip";
hash = "sha256-8QNFCIRSaF0y98P1mmx0u+Uf0/Zd7nYlFGXp9SkURTc=";
stripRoot = false;
};
version = "3.5.1";
in
python3.pkgs.buildPythonApplication {
pname = "qutebrowser" + lib.optionalString (!isQt6) "-qt5";
inherit version;
pyproject = true;
src = fetchurl {
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/qutebrowser-${version}.tar.gz";
hash = "sha256-gmu6MooINXJI1eWob6qwpzZVSXQ5rVTSaeISBVkms44=";
};
# Needs tox
doCheck = false;
buildInputs = [
qt6Packages.qtbase
glib-networking
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qt6Packages.qtwayland
];
build-system = with python3.pkgs; [
setuptools
];
nativeBuildInputs = [
qt6Packages.wrapQtAppsHook
asciidoc
docbook_xml_dtd_45
docbook_xsl
libxml2
libxslt
]
++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;
dependencies = with python3.pkgs; [
colorama
pyyaml
(if isQt6 then pyqt6-webengine else pyqtwebengine)
jinja2
pygments
# scripts and userscripts libs
tldextract
beautifulsoup4
readability-lxml
pykeepass
stem
pynacl
# extensive ad blocking
adblock
# for the qute-bitwarden user script to be able to copy the TOTP token to clipboard
pyperclip
];
patches = [
./fix-restart.patch
];
dontWrapQtApps = true;
postPatch = ''
substituteInPlace qutebrowser/misc/quitter.py --subst-var-by qutebrowser "$out/bin/qutebrowser"
sed -i "s,/usr,$out,g" qutebrowser/utils/standarddir.py
''
+ lib.optionalString withPdfReader ''
sed -i "s,/usr/share/pdf.js,${pdfjs},g" qutebrowser/browser/pdfjs.py
'';
installPhase = ''
runHook preInstall
make -f misc/Makefile \
PYTHON=${(python3.pythonOnBuildForHost.withPackages (ps: with ps; [ setuptools ])).interpreter} \
PREFIX=. \
DESTDIR="$out" \
DATAROOTDIR=/share \
install
runHook postInstall
'';
postInstall = ''
# Patch python scripts
buildPythonPath "$out $propagatedBuildInputs"
scripts=$(grep -rl python "$out"/share/qutebrowser/{user,}scripts/)
for i in $scripts; do
patchPythonScript "$i"
done
'';
preFixup =
let
libPath = lib.makeLibraryPath [ pipewire ];
resourcesPath =
if (isQt6 && stdenv.hostPlatform.isDarwin) then
"${qt6Packages.qtwebengine}/lib/QtWebEngineCore.framework/Resources"
else
"${qt6Packages.qtwebengine}/resources";
in
''
makeWrapperArgs+=(
# Force the app to use QT_PLUGIN_PATH values from wrapper
--unset QT_PLUGIN_PATH
"''${qtWrapperArgs[@]}"
# avoid persistant warning on starup
--set QT_STYLE_OVERRIDE Fusion
${lib.optionalString pipewireSupport ''--prefix LD_LIBRARY_PATH : ${libPath}''}
${lib.optionalString enableVulkan ''
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]}
--set-default QSG_RHI_BACKEND vulkan
''}
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
--set QTWEBENGINE_RESOURCES_PATH "${resourcesPath}"
)
'';
meta = {
homepage = "https://github.com/qutebrowser/qutebrowser";
changelog = "https://github.com/qutebrowser/qutebrowser/blob/v${version}/doc/changelog.asciidoc";
description = "Keyboard-focused browser with a minimal GUI";
license = lib.licenses.gpl3Plus;
mainProgram = "qutebrowser";
platforms = if enableWideVine then [ "x86_64-linux" ] else qt6Packages.qtwebengine.meta.platforms;
maintainers = with lib.maintainers; [
jagajaga
rnhmjoj
ebzzry
dotlambda
];
};
}