Reorganized

This commit is contained in:
Jan-Bulthuis committed 2025-05-09 15:27:44 +02:00
1 parent c3c61ce654
commit 760815da50
145 files changed
-1444

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
{
...
}:
let
overlay = final: prev: {
dina-psfu = prev.callPackage ./fonts/dina-psfu.nix { };
ttf2psf = prev.callPackage ./fonts/ttf2psf.nix { };
wqy-zenhei = prev.callPackage ./fonts/wqy-zenhei.nix { };
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
wqy-bitmapsong = prev.callPackage ./fonts/wqy-bitmapsong.nix { };
wprs = prev.callPackage ./programs/wprs/default.nix { };
nixgreety = prev.callPackage ./programs/nixgreety.nix { };
carla_osc_bridge = prev.callPackage ./programs/carla_osc_bridge.nix { };
# ly = prev.callPackage ./programs/ly/default.nix { };
};
in
{
nixpkgs.overlays = [ overlay ];
}
+73
View File
@@ -0,0 +1,73 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "dina-psfu";
version = "1.0.0";
src = pkgs.fetchzip {
url = "https://www.dcmembers.com/jibsen/download/61/?wpdmdl=61";
hash = "sha256-JK+vnOyhAbwT825S+WKbQuWgRrfZZHfyhaMQ/6ljO8s=";
extension = "zip";
stripRoot = false;
};
buildInputs = with pkgs; [
bdf2psf
fontforge
];
buildPhase = ''
# Get the base Dina font
cp BDF/Dina_r400-9.bdf ./dina.bdf
# Set the AVERAGE_WIDTH property on the font
sed 's/STARTPROPERTIES 16/STARTPROPERTIES 17\
AVERAGE_WIDTH 70/' ./dina.bdf > ./dina-mod.bdf
# Reencode the font from code page CP1252 (Windows) to unicode
fontforge -lang=ff -c "Open(\"dina-mod.bdf\"); Reencode(\"win\", 1); Reencode(\"iso10646-1\"); Generate(\"dina-enc.bdf\")"
mv dina-enc-*.bdf dina-enc.bdf
# Move the artsy characters around
sed -i 's/STARTCHAR uni000E$/STARTCHAR uni2518/' ./dina-enc.bdf
sed -i 's/ENCODING 14$/ENCODING 9496/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni000F$/STARTCHAR uni2514/' ./dina-enc.bdf
sed -i 's/ENCODING 15$/ENCODING 9492/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0010$/STARTCHAR uni250C/' ./dina-enc.bdf
sed -i 's/ENCODING 16$/ENCODING 9484/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0011$/STARTCHAR uni2510/' ./dina-enc.bdf
sed -i 's/ENCODING 17$/ENCODING 9488/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0012$/STARTCHAR uni2500/' ./dina-enc.bdf
sed -i 's/ENCODING 18$/ENCODING 9472/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0013$/STARTCHAR uni2502/' ./dina-enc.bdf
sed -i 's/ENCODING 19$/ENCODING 9474/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0014$/STARTCHAR uni2524/' ./dina-enc.bdf
sed -i 's/ENCODING 20$/ENCODING 9508/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0015$/STARTCHAR uni2534/' ./dina-enc.bdf
sed -i 's/ENCODING 21$/ENCODING 9524/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0016$/STARTCHAR uni251C/' ./dina-enc.bdf
sed -i 's/ENCODING 22$/ENCODING 9500/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0017$/STARTCHAR uni252C/' ./dina-enc.bdf
sed -i 's/ENCODING 23$/ENCODING 9516/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0018$/STARTCHAR uni253C/' ./dina-enc.bdf
sed -i 's/ENCODING 24$/ENCODING 9532/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0019$/STARTCHAR uni2592/' ./dina-enc.bdf
sed -i 's/ENCODING 25$/ENCODING 9618/' ./dina-enc.bdf
# Create the equivalents file
touch empty.equivalents
# Convert the bdf to psf
bdf2psf --fb ./dina-enc.bdf \
./empty.equivalents \
${pkgs.bdf2psf}/share/bdf2psf/fontsets/Uni2.512 \
512 ./dina.psfu ./dina.sfm
'';
installPhase = ''
install -Dm644 -t $out/share/consolefonts dina.psfu
'';
}
+31
View File
@@ -0,0 +1,31 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "ttf2psf";
version = "1.0.0";
src = pkgs.fetchFromGitHub {
owner = "NateChoe1";
repo = "ttf2psf";
rev = "8db09d05385f595c320eccae4c48ff4393ca5bde";
sha256 = "v52TZp+GyXHBAMsIoHFA8ZIMPsDVls13WW29vpesCig=";
};
buildInputs = with pkgs; [
pkg-config
freetype
];
buildPhase = ''
make build/ttf2psf
'';
installPhase = ''
install -Dm 755 -t $out/bin build/ttf2psf
install -Dm 644 -t $out/share/ttf2psf data/*.*
install -Dm 644 -t $out/share/ttf2psf/fontsets data/fontsets/*
'';
}
+35
View File
@@ -0,0 +1,35 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-bitmapsong-pcf";
version = "1.0.0-RC1";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
};
buildInputs = [ pkgs.fontforge ];
buildPhase = ''
newName() {
test "''${1:5:1}" = i && _it=Italic || _it=
case ''${1:6:3} in
400) test -z $it && _weight=Medium ;;
700) _weight=Bold ;;
esac
_pt=''${1%.pcf}
_pt=''${_pt#*-}
echo "WenQuanYi_Bitmap_Song$_weight$_it$_pt"
}
for i in *.pcf; do
fontforge -lang=ff -c "Open(\"$i\"); Generate(\"$(newName $i).otb\")"
done
'';
installPhase = ''
install -Dm644 *.otb -t $out/share/fonts/
'';
}
+22
View File
@@ -0,0 +1,22 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-microhei";
version = "0.2.0-beta";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-KAKsgCOqNqZupudEWFTjoHjTd///QhaTQb0jeHH3IT4=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttc -t $out/share/fonts/
runHook postInstall
'';
}
+22
View File
@@ -0,0 +1,22 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation rec {
pname = "wqy-zenhei";
version = "0.9.45";
src = pkgs.fetchurl {
url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
hash = "sha256-5LfjBkdb+UJ9F1dXjw5FKJMMhMROqj8WfUxC8RDuddY=";
};
installPhase = ''
runHook preInstall
install -Dm644 *.ttc -t $out/share/fonts/
runHook postInstall
'';
}
@@ -0,0 +1,19 @@
{ pkgs, ... }:
with pkgs;
rustPlatform.buildRustPackage {
pname = "carla_osc_bridge";
version = "master";
src = fetchFromGitea {
domain = "git.bulthuis.dev";
owner = "Jan";
repo = "carla_osc_bridge";
rev = "c037e2d2a1b29b785d8acc10fa0cb761afdb3fcf";
hash = "sha256-Wvdfm+4dfygZwkvaUhO9w7DrrUl3ZYvtD7nYrPSD0eA=";
};
cargoHash = "sha256-s1ZKbhHudgPOy7613zbT8TkbM6B7oloLEuTYHoWjX5o=";
useFetchCargoVendor = true;
}
+47
View File
@@ -0,0 +1,47 @@
{
stdenv,
lib,
fetchFromGitHub,
linux-pam,
libxcb,
makeBinaryWrapper,
zig_0_12,
callPackage,
nixosTests,
}:
stdenv.mkDerivation {
pname = "ly";
version = "1.0.2";
src = fetchFromGitHub {
owner = "peterc-s";
repo = "ly";
rev = "e6d8bea236dd0097adb1c22e9a23d95102ebe9d9";
sha256 = "w9YdNVD+8UhrEbPJ7xqsd/WoxU2rlo2GXFtc9JpWHxo=";
};
nativeBuildInputs = [
makeBinaryWrapper
zig_0_12.hook
];
buildInputs = [
libxcb
linux-pam
];
postPatch = ''
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
passthru.tests = { inherit (nixosTests) ly; };
meta = with lib; {
description = "TUI display manager";
license = licenses.wtfpl;
homepage = "https://github.com/fairyglade/ly";
maintainers = [ maintainers.vidister ];
platforms = platforms.linux;
mainProgram = "ly";
};
}
+110
View File
@@ -0,0 +1,110 @@
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
{
lib,
linkFarm,
fetchurl,
fetchgit,
runCommandLocal,
zig,
name ? "zig-packages",
}:
let
unpackZigArtifact =
{ name, artifact }:
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
mv "$TMPDIR/p/$hash" "$out"
chmod 755 "$out"
'';
fetchZig =
{
name,
url,
hash,
}:
let
artifact = fetchurl { inherit url hash; };
in
unpackZigArtifact { inherit name artifact; };
fetchGitZig =
{
name,
url,
hash,
}:
let
parts = lib.splitString "#" url;
base = lib.elemAt parts 0;
rev = lib.elemAt parts 1;
in
fetchgit {
inherit name rev hash;
url = base;
deepClone = false;
};
fetchZigArtifact =
{
name,
url,
hash,
}:
let
parts = lib.splitString "://" url;
proto = lib.elemAt parts 0;
path = lib.elemAt parts 1;
fetcher = {
"git+http" = fetchGitZig {
inherit name hash;
url = "http://${path}";
};
"git+https" = fetchGitZig {
inherit name hash;
url = "https://${path}";
};
http = fetchZig {
inherit name hash;
url = "http://${path}";
};
https = fetchZig {
inherit name hash;
url = "https://${path}";
};
file = unpackZigArtifact {
inherit name;
artifact = /. + path;
};
};
in
fetcher.${proto};
in
linkFarm name [
{
name = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b";
path = fetchZigArtifact {
name = "clap";
url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.9.1.tar.gz";
hash = "sha256-7qxm/4xb+58MGG+iUzssUtR97OG2dRjAqyS0BAet4HY=";
};
}
{
name = "12209b971367b4066d40ecad4728e6fdffc4cc4f19356d424c2de57f5b69ac7a619a";
path = fetchZigArtifact {
name = "zigini";
url = "https://github.com/Kawaii-Ash/zigini/archive/0bba97a12582928e097f4074cc746c43351ba4c8.tar.gz";
hash = "sha256-OdaJ5tqmk2MPwaAbpK4HRD/CcQCN+Cjj8U63BqUcFMs=";
};
}
{
name = "1220b0979ea9891fa4aeb85748fc42bc4b24039d9c99a4d65d893fb1c83e921efad8";
path = fetchZigArtifact {
name = "ini";
url = "https://github.com/ziglibs/ini/archive/e18d36665905c1e7ba0c1ce3e8780076b33e3002.tar.gz";
hash = "sha256-RQ6OPJBqqH7PCL+xiI58JT7vnIo6zbwpLWn+byZO5iM=";
};
}
]
+19
View File
@@ -0,0 +1,19 @@
{ pkgs, ... }:
with pkgs;
rustPlatform.buildRustPackage {
pname = "nixgreety";
version = "master";
src = fetchFromGitea {
domain = "git.bulthuis.dev";
owner = "Jan";
repo = "nixgreety";
rev = "c7278a910a0238a53f23fe9a0ae881802a4bcb31";
hash = "sha256-kZB+iEFIDJ8pOJetu4Isu4oaktgIn14D4PcpDXLOXA8=";
};
cargoHash = "sha256-pklKVzYoChRqPZ/D3BsMGnaBFd615TKbvoAy7iU8UtA=";
useFetchCargoVendor = true;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,50 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
libxkbcommon,
python3,
runCommand,
wprs,
}:
rustPlatform.buildRustPackage {
pname = "wprs";
version = "0-unstable-2025-04-16";
src = fetchFromGitHub {
owner = "wayland-transpositor";
repo = "wprs";
rev = "dfc1385bcb73734cd0d05a7e353522983c236562";
hash = "sha256-MrfYrKAVFoT453B2zED6Ax2coZ/KZ7CWYdZCx469Q/4=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libxkbcommon
(python3.withPackages (pp: with pp; [ psutil ]))
];
useFetchCargoVendor = true;
cargoHash = "sha256-01PTfgDeagC72z8XADXEn5Aio6UWQAAYgDP4zKFTPpY=";
preFixup = ''
cp wprs "$out/bin/wprs"
'';
passthru.tests.sanity = runCommand "wprs-sanity" { nativeBuildInputs = [ wprs ]; } ''
${wprs}/bin/wprs -h > /dev/null && touch $out
'';
meta = with lib; {
description = "rootless remote desktop access for remote Wayland";
license = licenses.asl20;
maintainers = with maintainers; [ mksafavi ];
platforms = [ "x86_64-linux" ]; # The aarch64-linux support is not implemented in upstream yet. Also, the darwin platform is not supported as it requires wayland.
homepage = "https://github.com/wayland-transpositor/wprs";
mainProgram = "wprs";
};
}