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,32 @@
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "afetch";
version = "2.2.0";
src = fetchFromGitHub {
owner = "13-CF";
repo = "afetch";
tag = "v${version}";
sha256 = "sha256-bHP3DJpgh89AaCX4c1tQGaZ/PiWjArED1rMdszFUq+U=";
};
makeFlags = [
"PREFIX=${placeholder "out"}"
];
meta = {
description = "Fetch program written in C";
homepage = "https://github.com/13-CF/afetch";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
jk
];
platforms = lib.platforms.linux;
mainProgram = "afetch";
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
python3Packages,
fetchPypi,
pkgs,
testers,
afew,
}:
python3Packages.buildPythonApplication rec {
pname = "afew";
version = "3.0.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "0wpfqbqjlfb9z0hafvdhkm7qw56cr9kfy6n8vb0q42dwlghpz1ff";
};
nativeBuildInputs = with python3Packages; [
sphinxHook
setuptools
setuptools-scm
];
sphinxBuilders = [
"html"
"man"
];
propagatedBuildInputs = with python3Packages; [
chardet
dkimpy
notmuch
setuptools
];
nativeCheckInputs = [
pkgs.notmuch
]
++ (with python3Packages; [
freezegun
pytestCheckHook
]);
makeWrapperArgs = [
''--prefix PATH ':' "${pkgs.notmuch}/bin"''
];
outputs = [
"out"
"doc"
"man"
];
passthru.tests = {
version = testers.testVersion {
package = afew;
};
};
meta = {
homepage = "https://github.com/afewmail/afew";
description = "Initial tagging script for notmuch mail";
mainProgram = "afew";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ flokli ];
};
}

View File

@@ -0,0 +1,136 @@
{
copyDesktopItems,
electron,
fetchFromGitHub,
fetchurl,
lib,
makeDesktopItem,
makeWrapper,
stdenvNoCC,
unzip,
buildType ? "stable",
commandLineArgs ? "",
}:
let
hostPlatform = stdenvNoCC.hostPlatform;
nodePlatform = hostPlatform.node.platform;
nodeArch = hostPlatform.node.arch;
in
stdenvNoCC.mkDerivation (
finalAttrs:
(
{
# https://github.com/toeverything/AFFiNE/releases/tag/v0.18.1
version = "0.18.1";
githubSourceCode = fetchFromGitHub {
owner = "toeverything";
repo = "AFFiNE";
rev = "8b066a4b398aace25a20508a8e3c1a381721971f";
hash = "sha256-TWwojG3lqQlQFX3BKoFjJ27a3T/SawXgNDO6fP6gW4k=";
};
productName = if buildType == "stable" then "AFFiNE" else "AFFiNE-" + buildType;
binName = lib.toLower finalAttrs.productName;
pname = "${finalAttrs.binName}-bin";
meta = {
description = "Workspace with fully merged docs, whiteboards and databases";
longDescription = ''
AFFiNE is an open-source, all-in-one workspace and an operating
system for all the building blocks that assemble your knowledge
base and much more -- wiki, knowledge management, presentation
and digital assets
'';
homepage = "https://affine.pro/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
richar
redyf
xiaoxiangmoe
];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
}
// lib.optionalAttrs hostPlatform.isLinux {
mainProgram = finalAttrs.binName;
};
src = (
let
inherit (finalAttrs) version;
affinePrebuiltBinariesHashes = {
darwin-arm64 = "I8lOO97MNLkha0utWPAP4EKv9HiPMWpLi2ibvXjzjhdl7abgSPmMKbv1dGHxMzgMzGbDzhzKqzhYtJI+0Asfzw==";
darwin-x64 = "LZdd7yHJx9Hx0Po8NQgeDp0BhIyXGr0QsbF6bWP5pS08c4fdtE9UzNPfJGfzz/snTkWfKMQZop0Ea4fYGosr1Q==";
linux-x64 = "+impaFLuvcfpj4QjHwjZ06+fUpsxxRlk4eWO6+E4xkBMrV43gwZGeSeAw2pMgXogRGb/Oy6XUoA7o8tTQt9J6A==";
};
platform = if hostPlatform.isLinux then "linux" else "macos";
in
fetchurl {
# example: https://github.com/toeverything/AFFiNE/releases/download/v0.18.1/affine-0.18.1-stable-darwin-arm64.zip
url = "https://github.com/toeverything/AFFiNE/releases/download/v${version}/affine-${version}-${buildType}-${platform}-${nodeArch}.zip";
sha512 = affinePrebuiltBinariesHashes."${nodePlatform}-${nodeArch}";
}
);
nativeBuildInputs = [
unzip
]
++ lib.optionals hostPlatform.isLinux [
copyDesktopItems
makeWrapper
];
installPhase =
let
inherit (finalAttrs) binName productName;
in
if hostPlatform.isDarwin then
''
runHook preInstall
mkdir -p $out/Applications
cd ..
mv ${productName}.app $out/Applications
runHook postInstall
''
else
''
runHook preInstall
mkdir --parents $out/lib/${binName}/
mv ./{resources,LICENSE*} $out/lib/${binName}/
install -Dm644 "${finalAttrs.githubSourceCode}/packages/frontend/apps/electron/resources/icons/icon_${buildType}_64x64.png" $out/share/icons/hicolor/64x64/apps/${binName}.png
makeWrapper "${electron}/bin/electron" $out/bin/${binName} \
--inherit-argv0 \
--add-flags $out/lib/${binName}/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags ${lib.escapeShellArg commandLineArgs}
runHook postInstall
'';
}
// lib.optionalAttrs hostPlatform.isLinux {
desktopItems =
let
inherit (finalAttrs) binName productName;
in
[
(makeDesktopItem {
name = binName;
desktopName = productName;
comment = "AFFiNE Desktop App";
exec = "${binName} %U";
terminal = false;
icon = binName;
startupWMClass = binName;
categories = [ "Utility" ];
mimeTypes = [ "x-scheme-handler/${binName}" ];
})
];
}
)
)

View File

@@ -0,0 +1,245 @@
{
lib,
stdenv,
stdenvNoCC,
fetchFromGitHub,
rustPlatform,
electron_35,
nodejs_22,
yarn-berry_4,
cacert,
writableTmpDirAsHomeHook,
cargo,
rustc,
findutils,
zip,
rsync,
jq,
copyDesktopItems,
makeWrapper,
llvmPackages,
apple-sdk_15,
makeDesktopItem,
nix-update-script,
buildType ? "stable",
commandLineArgs ? "",
}:
let
hostPlatform = stdenvNoCC.hostPlatform;
nodePlatform = hostPlatform.node.platform;
nodeArch = hostPlatform.node.arch;
electron = electron_35;
nodejs = nodejs_22;
yarn-berry = yarn-berry_4.override { inherit nodejs; };
productName = if buildType != "stable" then "AFFiNE-${buildType}" else "AFFiNE";
binName = lib.toLower productName;
in
stdenv.mkDerivation (finalAttrs: {
pname = binName;
version = "0.24.1";
src = fetchFromGitHub {
owner = "toeverything";
repo = "AFFiNE";
tag = "v${finalAttrs.version}";
hash = "sha256-Yq5TD5yInv+0d1S6M58I8CneCAGUwH0ThGrEJfLIrX0=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-tRDc7Rky59Rh08QTNiG3yopErHJzARxN8BZGrSUECLE=";
};
yarnOfflineCache = stdenvNoCC.mkDerivation {
name = "yarn-offline-cache";
inherit (finalAttrs) src;
nativeBuildInputs = [
yarn-berry
cacert
writableTmpDirAsHomeHook
];
# force yarn install run in CI mode
env.CI = "1";
buildPhase =
let
supportedArchitectures = builtins.toJSON {
os = [
"darwin"
"linux"
];
cpu = [
"x64"
"ia32"
"arm64"
];
libc = [
"glibc"
"musl"
];
};
in
''
runHook preBuild
mkdir -p $out
yarn config set enableTelemetry false
yarn config set cacheFolder $out
yarn config set enableGlobalCache false
yarn config set supportedArchitectures --json '${supportedArchitectures}'
yarn install --immutable --mode=skip-build
runHook postBuild
'';
dontInstall = true;
outputHashMode = "recursive";
outputHash = "sha256-U2FGvdtGiM97aXmbfNIfi87hvwDkd1dvlAABYiDgAGI=";
};
buildInputs = lib.optionals hostPlatform.isDarwin [
apple-sdk_15
];
nativeBuildInputs = [
nodejs
yarn-berry
cargo
rustc
findutils
zip
jq
rsync
writableTmpDirAsHomeHook
]
++ lib.optionals hostPlatform.isLinux [
copyDesktopItems
makeWrapper
]
++ lib.optionals hostPlatform.isDarwin [
# bindgenHook is needed to build `coreaudio-sys` on darwin
rustPlatform.bindgenHook
];
env = {
# force yarn install run in CI mode
CI = "1";
# `LIBCLANG_PATH` is needed to build `coreaudio-sys` on darwin
LIBCLANG_PATH = lib.optionalString hostPlatform.isDarwin "${lib.getLib llvmPackages.libclang}/lib";
};
# Remove code under The AFFiNE Enterprise Edition (EE) license.
# Keep file package.json for `yarn install --immutable` lockfile check.
postPatch = ''
BACKEND_SERVER_PACKAGE_JSON="$(jq 'del(.scripts.postinstall)' packages/backend/server/package.json)"
rm -rf packages/backend/server/{.*,*}
echo "$BACKEND_SERVER_PACKAGE_JSON" > packages/backend/server/package.json
'';
configurePhase = ''
runHook preConfigure
# cargo config
mkdir -p .cargo
cat $cargoDeps/.cargo/config.toml >> .cargo/config.toml
ln -s $cargoDeps @vendor@
# yarn config
yarn config set enableTelemetry false
yarn config set enableGlobalCache false
yarn config set cacheFolder $yarnOfflineCache
# electron config
ELECTRON_VERSION_IN_LOCKFILE=$(yarn why electron --json | tail --lines 1 | jq --raw-output '.children | to_entries | first | .key ' | cut -d : -f 2)
rsync --archive --chmod=u+w "${electron.dist}/" $HOME/.electron-prebuilt-zip-tmp
export ELECTRON_FORGE_ELECTRON_ZIP_DIR=$PWD/.electron_zip_dir
mkdir -p $ELECTRON_FORGE_ELECTRON_ZIP_DIR
(cd $HOME/.electron-prebuilt-zip-tmp && zip --recurse-paths - .) > $ELECTRON_FORGE_ELECTRON_ZIP_DIR/electron-v$ELECTRON_VERSION_IN_LOCKFILE-${nodePlatform}-${nodeArch}.zip
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
# first build
yarn install
CARGO_NET_OFFLINE=true yarn affine @affine/native build
GITHUB_SHA=ffffffffffffffffffffffffffffffffffffffff BUILD_TYPE=${buildType} SKIP_NX_CACHE=1 yarn affine @affine/electron generate-assets
# second build
yarn config set nmMode classic
yarn config set nmHoistingLimits workspaces
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
yarn install
BUILD_TYPE=${buildType} SKIP_WEB_BUILD=1 SKIP_BUNDLE=1 HOIST_NODE_MODULES=1 yarn affine @affine/electron make
runHook postBuild
'';
installPhase =
if hostPlatform.isDarwin then
''
runHook preInstall
mkdir -p $out/Applications
mv packages/frontend/apps/electron/out/${buildType}/${productName}-darwin-${nodeArch}/${productName}.app $out/Applications
runHook postInstall
''
else
''
runHook preInstall
mkdir --parents $out/lib/${binName}/
mv packages/frontend/apps/electron/out/${buildType}/${productName}-linux-${nodeArch}/{resources,LICENSE*} $out/lib/${binName}/
install -Dm644 packages/frontend/apps/electron/resources/icons/icon_${buildType}_64x64.png $out/share/icons/hicolor/64x64/apps/${binName}.png
makeWrapper "${lib.getExe electron}" $out/bin/${binName} \
--inherit-argv0 \
--add-flags $out/lib/${binName}/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags ${lib.escapeShellArg commandLineArgs}
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = binName;
desktopName = productName;
comment = "AFFiNE Desktop App";
exec = "${binName} %U";
terminal = false;
icon = binName;
startupWMClass = binName;
categories = [ "Utility" ];
mimeTypes = [ "x-scheme-handler/${binName}" ];
})
];
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex=^v(\\d+\\.\\d+\\.\\d+)$"
];
};
meta = {
description = "Workspace with fully merged docs, whiteboards and databases";
longDescription = ''
AFFiNE is an open-source, all-in-one workspace and an operating
system for all the building blocks that assemble your knowledge
base and much more -- wiki, knowledge management, presentation
and digital assets
'';
homepage = "https://affine.pro/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ xiaoxiangmoe ];
platforms = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
sourceProvenance = [ lib.sourceTypes.fromSource ];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
zlib,
curl,
expat,
fuse,
fuse3,
openssl,
autoreconfHook,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
version = "3.7.22";
pname = "afflib";
src = fetchFromGitHub {
owner = "sshock";
repo = "AFFLIBv3";
tag = "v${finalAttrs.version}";
sha256 = "sha256-pGInhJQBhFJhft/KfB3J3S9/BVp9D8TZ+uw2CUNVC+Q=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [
zlib
curl
expat
openssl
python3
]
++ lib.optionals stdenv.hostPlatform.isLinux [ fuse3 ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ fuse ];
meta = {
homepage = "http://afflib.sourceforge.net/";
description = "Advanced forensic format library";
platforms = lib.platforms.unix;
license = lib.licenses.bsdOriginal;
maintainers = [ lib.maintainers.raskin ];
downloadPage = "https://github.com/sshock/AFFLIBv3/tags";
};
})

View File

@@ -0,0 +1,45 @@
From 428c6e0eb604b63a67fda6af445c10c8ae3c1826 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg@phi-gamma.net>
Date: Sun, 27 Jan 2019 21:37:13 +0100
Subject: [PATCH] makefile: fix installation
- comment hard-coded $(CC)
- avoid full paths during install
- set proper permissions
---
Makefile | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 9268c6f..0797579 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ MW=-Wformat -Werror=format-security -Wall
CFLAGS1 = -Wall -Wstrict-prototypes -s -O2 -fomit-frame-pointer -Wno-unused-result $(LARGEFILEFLAGS) $(MW)
-CC=gcc
+#CC=gcc
# also using contents of usin CPPFLAGS, CFLAGS, LDFLAGS out of environment
# variables, if they exist
@@ -94,9 +94,14 @@ clean:
rm -f regtest/statsize regtest/statsize64
cd regtest; /bin/sh regtest.clean
+ifndef DESTDIR
+install:
+ $(error Please specify install prefix as $$DESTDIR)
+else
install: afio
- cp afio /usr/local/bin
- cp afio.1 /usr/share/man/man1
+ install -Dm755 afio $(DESTDIR)/bin/afio
+ install -Dm644 afio.1 $(DESTDIR)/share/man/man1/afio.1
+endif
# generate default list of -E extensions from manpage
# note: on sun, I had to change awk command below to nawk or gawk
--
2.18.1

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
}:
stdenv.mkDerivation rec {
version = "2.5.2";
pname = "afio";
src = fetchFromGitHub {
owner = "kholtman";
repo = "afio";
tag = "v${version}";
sha256 = "1vbxl66r5rp5a1qssjrkfsjqjjgld1cq57c871gd0m4qiq9rmcfy";
};
patches = [
/*
A patch to simplify the installation and for removing the
hard coded dependency on GCC.
*/
./0001-makefile-fix-installation.patch
# fix darwin build (include headers)
(fetchpatch {
url = "https://github.com/kholtman/afio/pull/18/commits/a726614f99913ced08f6ae74091c56969d5db210.patch";
name = "darwin-headers.patch";
hash = "sha256-pK8mN29fC2mL4B69Fv82dWFIQMGwquyl825OBDTxzpo=";
})
];
installFlags = [ "DESTDIR=$(out)" ];
meta = {
homepage = "https://github.com/kholtman/afio";
description = "Fault tolerant cpio archiver targeting backups";
platforms = lib.platforms.all;
/*
Licensing is complicated due to the age of the code base, but
generally free. See the file ``afio_license_issues_v5.txt`` for
a comprehensive discussion.
*/
license = lib.licenses.free;
mainProgram = "afio";
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
git,
zlib,
sparsehash,
}:
stdenv.mkDerivation rec {
pname = "afsctool";
version = "1.7.3";
src = fetchFromGitHub {
owner = "RJVB";
repo = "afsctool";
tag = "v${version}";
hash = "sha256-cZ0P9cygj+5GgkDRpQk7P9z8zh087fpVfrYXMRRVUAI=";
};
nativeBuildInputs = [
pkg-config
cmake
git
];
buildInputs = [
zlib
sparsehash
];
meta = {
description = "Utility that allows end-users to leverage HFS+/APFS compression";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ viraptor ];
platforms = lib.platforms.darwin;
homepage = "https://github.com/RJVB/afsctool";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
cmake,
}:
stdenv.mkDerivation rec {
pname = "aften";
version = "0.0.8";
src = fetchurl {
url = "mirror://sourceforge/aften/${pname}-${version}.tar.bz2";
sha256 = "02hc5x9vkgng1v9bzvza9985ifrjd7fjr7nlpvazp4mv6dr89k47";
};
patches = [
# Add fallback for missing SIMD functions on ARM
# Source https://github.com/Homebrew/homebrew-core/blob/cad412c7fb4b64925f821fcc9ac5f16a2c40f32d/Formula/aften.rb
./simd-fallback.patch
];
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DSHARED=ON" ];
# Fix the build with CMake 4.
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail \
'CMAKE_MINIMUM_REQUIRED(VERSION 2.4)' \
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10)'
'';
meta = {
description = "Audio encoder which generates compressed audio streams based on ATSC A/52 specification";
homepage = "https://aften.sourceforge.net/";
license = lib.licenses.lgpl21Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ emilytrau ];
};
}

View File

@@ -0,0 +1,25 @@
From dca9c03930d669233258c114e914a01f7c0aeb05 Mon Sep 17 00:00:00 2001
From: jbr79 <jbr79@ef0d8562-5c19-0410-972e-841db63a069c>
Date: Wed, 24 Sep 2008 22:02:59 +0000
Subject: [PATCH] add fallback function for apply_simd_restrictions() on
non-x86/ppc
git-svn-id: https://aften.svn.sourceforge.net/svnroot/aften@766 ef0d8562-5c19-0410-972e-841db63a069c
---
libaften/cpu_caps.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libaften/cpu_caps.h b/libaften/cpu_caps.h
index b7c6159..4db11f7 100644
--- a/libaften/cpu_caps.h
+++ b/libaften/cpu_caps.h
@@ -26,6 +26,7 @@
#include "ppc_cpu_caps.h"
#else
static inline void cpu_caps_detect(void){}
+static inline void apply_simd_restrictions(AftenSimdInstructions *simd_instructions){}
#endif
#endif /* CPU_CAPS_H */
--
2.24.3 (Apple Git-128)

View File

@@ -0,0 +1,46 @@
{
lib,
openssl,
pkg-config,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "afterburn";
version = "5.10.0";
src = fetchFromGitHub {
owner = "coreos";
repo = "afterburn";
tag = "v${version}";
sha256 = "sha256-APVbrR4V2Go7ba+1AFZKi0eBxRnT2bm+Fy2/KmvhsjE=";
};
cargoHash = "sha256-WHfC9RPW/FXXZTfU2LEdkKvkJBt/9TemNpBOyv5/Wfo=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
postPatch = ''
substituteInPlace \
./systemd/afterburn-checkin.service \
./systemd/afterburn-firstboot-checkin.service \
./systemd/afterburn-sshkeys@.service.in \
./systemd/afterburn.service \
--replace-fail /usr/bin "$out/bin"
'';
postInstall = ''
DEFAULT_INSTANCE=root PREFIX= DESTDIR=$out make install-units
'';
meta = {
homepage = "https://github.com/coreos/afterburn";
description = "One-shot cloud provider agent";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ arianvp ];
platforms = lib.platforms.linux;
mainProgram = "afterburn";
};
}

View File

@@ -0,0 +1,143 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
themeVariants ? [ ],
catppuccinColorVariants ? [ ],
draculaColorVariants ? [ ],
gruvboxColorVariants ? [ ],
originalColorVariants ? [ ],
}:
let
pname = "afterglow-cursors-recolored";
availableThemeVariants = [
"Catppuccin"
"Dracula"
"Gruvbox"
"Original"
];
availableColorVariants = {
Catppuccin = [
"Blue"
"Flamingo"
"Green"
"Macchiato"
"Maroon"
"Mauve"
"Peach"
"Pink"
"Red"
"Rosewater"
"Sapphire"
"Sky"
"Teal"
"Yellow"
];
Dracula = [
"Cyan"
"Green"
"Orange"
"Pink"
"Purple"
"Red"
"Teddy"
"Yellow"
];
Gruvbox = [
"Aqua"
"Black"
"Blue"
"Gray"
"Green"
"Mojas84"
"Orange"
"Purple"
"White"
];
Original = [
"Blue"
"Purple"
"joris"
"joris2"
"joris3"
"joris4"
];
};
in
lib.checkListOfEnum "${pname}: theme variants" availableThemeVariants themeVariants
lib.checkListOfEnum
"${pname}: catppuccin color variants"
availableColorVariants.Catppuccin
catppuccinColorVariants
lib.checkListOfEnum
"${pname}: dracula color variants"
availableColorVariants.Dracula
draculaColorVariants
lib.checkListOfEnum
"${pname}: gruvbox color variants"
availableColorVariants.Gruvbox
gruvboxColorVariants
lib.checkListOfEnum
"${pname}: original color variants"
availableColorVariants.Original
originalColorVariants
stdenvNoCC.mkDerivation
{
inherit pname;
version = "0-unstable-2023-10-04";
src = fetchFromGitHub {
owner = "TeddyBearKilla";
repo = "Afterglow-Cursors-Recolored";
rev = "940a5d30e52f8c827fa249d2bbcc4af889534888";
hash = "sha256-GR+d+jrbeIGpqal5krx83PxuQto2PQTO3unQ+jaJf6s=";
};
installPhase =
let
dist = {
Catppuccin = "cat";
Dracula = "dracula";
Gruvbox = "gruvbox";
};
withAlternate = xs: xs': if xs != [ ] then xs else xs';
themeVariants' = withAlternate themeVariants availableThemeVariants;
colorVariants = {
Catppuccin = withAlternate catppuccinColorVariants availableColorVariants.Catppuccin;
Dracula = withAlternate draculaColorVariants availableColorVariants.Dracula;
Gruvbox = withAlternate gruvboxColorVariants availableColorVariants.Gruvbox;
Original = withAlternate originalColorVariants availableColorVariants.Original;
};
in
''
runHook preInstall
mkdir -p $out/share/icons
${lib.concatMapStringsSep "\n" (
theme:
lib.concatMapStringsSep "\n" (color: ''
ln -s \
"$src/colors/${theme}/${color}/dist-${
lib.optionalString (theme != "Original") (dist.${theme} + "-")
}${lib.toLower color}" \
"$out/share/icons/Afterglow-Recolored-${theme}-${color}"
'') colorVariants.${theme}
) themeVariants'}
runHook postInstall
'';
meta = with lib; {
description = "Recoloring of the Afterglow Cursors x-cursor theme";
homepage = "https://github.com/TeddyBearKilla/Afterglow-Cursors-Recolored";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = platforms.all;
license = licenses.gpl3Plus;
};
}

View File

@@ -0,0 +1,107 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
dbus,
fltk13,
gtk2,
libICE,
libSM,
libtiff,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "afterstep";
version = "2.2.12";
src = fetchFromGitHub {
owner = "afterstep";
repo = "afterstep";
rev = finalAttrs.version;
hash = "sha256-j1ADTRZ3Mxv9VNZWhWCFMnM/CJfkphdrgbw9Ca3bBw0=";
};
patches = [
(fetchpatch {
url = "https://salsa.debian.org/debian/afterstep/raw/master/debian/patches/44-Fix-build-with-gcc-5.patch";
hash = "sha256-RNLB6PuFVA1PsYt2VwLyLyvY2OO3oIl1xk+0/6nwN+4=";
})
# Fix pending upstream inclusion for binutils-2.36 support:
# https://github.com/afterstep/afterstep/pull/7
(fetchpatch {
name = "binutils-2.36.patch";
url = "https://github.com/afterstep/afterstep/commit/5e9e897cf8c455390dd6f5b27fec49707f6b9088.patch";
hash = "sha256-aGMTyojzXEHGjO9lMT6dwLl01Fd333BUuCIX0FU9ac4=";
})
];
postPatch = ''
# Causes fatal ldconfig cache generation attempt on non-NixOS Linux
for mkfile in autoconf/Makefile.common.lib.in libAfter{Base,Image}/Makefile.in; do
substituteInPlace $mkfile \
--replace 'test -w /etc' 'false'
done
'';
nativeBuildInputs = [
pkg-config
];
buildInputs = [
dbus
fltk13
gtk2
libICE
libSM
libtiff
];
outputs = [
"out"
"man"
];
strictDeps = true;
# A strange type of bug: dbus is not immediately found by pkg-config
preConfigure = ''
# binutils 2.37 fix
# https://github.com/afterstep/afterstep/issues/2
fixupList=(
"autoconf/Makefile.defines.in"
"libAfterImage/aftershow/Makefile.in"
"libAfterImage/apps/Makefile.in"
"libAfterBase/Makefile.in"
"libAfterImage/Makefile.in"
)
for toFix in "''${fixupList[@]}"; do
substituteInPlace "$toFix" --replace "clq" "cq"
done
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE $(pkg-config dbus-1 --cflags)"
'';
# Parallel build fails due to missing dependencies between private libraries:
# ld: cannot find ../libAfterConf/libAfterConf.a: No such file or directory
# Let's disable parallel builds until it's fixed upstream:
# https://github.com/afterstep/afterstep/issues/8
enableParallelBuilding = false;
meta = {
homepage = "http://www.afterstep.org/";
description = "NEXTStep-inspired window manager";
longDescription = ''
AfterStep is a window manager for the Unix X Window System. Originally
based on the look and feel of the NeXTStep interface, it provides end
users with a consistent, clean, and elegant desktop. The goal of AfterStep
development is to provide for flexibility of desktop configuration,
improving aestetics, and efficient use of system resources.
'';
license = lib.licenses.gpl2Plus;
maintainers = [ ];
mainProgram = "afterstep";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,15 @@
diff --git a/configure.ac b/configure.ac
index ef07d70..2da26aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,9 +27,9 @@ if test "$have_fuse_opt_parse" = no; then
fi
AM_CONDITIONAL(FUSE_OPT_COMPAT, test "$have_fuse_opt_parse" = no)
-AC_CHECK_FUNCS([setxattr fdatasync getline fgetln])
+AC_CHECK_FUNCS([setxattr getline fgetln])
AC_CONFIG_FILES([Makefile
src/Makefile
compat/Makefile])

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
autoreconfHook,
fuse,
}:
stdenv.mkDerivation rec {
pname = "afuse";
version = "0.5.0";
src = fetchFromGitHub {
owner = "pcarrier";
repo = "afuse";
tag = "v${version}";
sha256 = "sha256-KpysJRvDx+12BSl9pIGRqbJAM4W1NbzxMgDycGCr2RM=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [ fuse ];
patches = [ ./001-darwin-fdatasync.patch ];
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Fix the build on macOS with macFUSE installed
substituteInPlace configure.ac --replace-fail \
'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH' \
""
'';
meta = {
description = "Automounter in userspace";
homepage = "https://github.com/pcarrier/afuse";
license = lib.licenses.gpl2Only;
maintainers = [ lib.maintainers.marcweber ];
platforms = lib.platforms.unix;
};
}