Initial commit

This commit is contained in:
Přemysl Eric Janouch 2023-06-29 02:31:03 +02:00
commit badd347b22
Signed by: p
GPG Key ID: A0420B94F92B9493
13 changed files with 760 additions and 0 deletions

62
desktop-tools-master.nix Normal file
View File

@ -0,0 +1,62 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "desktop-tools";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
xorg.libX11
xorg.libXext
xorg.libXdmcp
libpulseaudio
dbus.dev
] ++ lib.optionals full [
gnome.gdm.dev
glib
pcre2
systemd.dev
] ++ lib.optionals (full && stdenv.isLinux) [
# To address pkg-config warnings for glib.
util-linux
libselinux
libsepol
pcre
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
# It's a weird mess, gdm.pc.in includes the subdirectory in includedir.
patchPhase = ''
sed -i 's|gdm-user-switching.h>|gdm/&|' gdm-switch-user.c
'';
cmakeFlags = [
"-DSYSTEMD_UNITDIR=${placeholder "out"}/lib/systemd/system"
];
doCheck = true;
meta = with pkgs.lib; {
description = "Desktop tools";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}

78
fiv-master.nix Normal file
View File

@ -0,0 +1,78 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "fiv";
version = "master";
nativeBuildInputs = with pkgs; [
meson
pkg-config
ninja
libxml2
jq
# Tests
desktop-file-utils
];
buildInputs = with pkgs; [
gtk3
libwebp
libraw
# WIP
libepoxy
] ++ lib.optionals full [
lcms2
#resvg
librsvg
libheif
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
# Up for consideration: don't rely on shebangs at all.
patchPhase = ''
patchShebangs .
'';
mesonFlags = [
# -Dauto_features=enabled & -Dwrap_mode=nodownload & no network
# together form a problem.
"-Dlibjpegqs=disabled"
"-Dlcms2fastfloat=disabled"
"-Dtools=enabled"
#"-Dresvg=enabled"
] ++ pkgs.lib.optionals (!full) [
"-Dlcms2=disabled"
"-Dlibraw=disabled"
"-Dresvg=disabled"
"-Dlibrsvg=disabled"
"-Dxcursor=disabled"
"-Dlibheif=disabled"
"-Dlibtiff=disabled"
"-Dgdk-pixbuf=disabled"
];
doCheck = true;
meta = with pkgs.lib; {
description = "Image browser and viewer";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = with licenses; [ bsd0 asl20 ];
};
}

61
hex-master.nix Normal file
View File

@ -0,0 +1,61 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "hex";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
# Tests
desktop-file-utils
];
buildInputs = with pkgs; [
ncurses
libunistring
# Termo demo-glib.c
#glib
#pcre2
#util-linux
#libselinux
#libsepol
#pcre
] ++ lib.optionals full [
lua5_3
xorg.libXft
xorg.libXau
xorg.libXdmcp
expat
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DBUILD_TESTING=ON"
];
doCheck = true;
meta = with pkgs.lib; {
description = "Interpreting hex viewer";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = with licenses; [ bsd0 mit ];
};
}

56
json-rpc-shell-master.nix Normal file
View File

@ -0,0 +1,56 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "json-rpc-shell";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
openssl
ncurses
libiconv
jansson
curl
libev
] ++ lib.optionals full [
readline
] ++ lib.optionals (!full) [
libedit
];
propagatedBuildInputs = with pkgs; [
perl
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = pkgs.lib.optionals (!full) [
"-DWANT_READLINE=OFF"
"-DWANT_LIBEDIT=ON"
];
doCheck = true;
meta = with pkgs.lib; {
description = "A shell for JSON-RPC 2.0";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = with licenses; [ bsd0 mit ];
};
}

54
liberty-master.nix Normal file
View File

@ -0,0 +1,54 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "liberty";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
go
nodejs
swift
];
buildInputs = with pkgs; [
openssl
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
doCheck = true;
# "go vet" creates a build cache within HOME.
checkPhase = ''
runHook preCheck
HOME=$(pwd) ctest --force-new-ctest-process
runHook postCheck
'';
# There is no installation target thus far, don't let nix-build fail.
installPhase = ''
mkdir -p $out
'';
meta = with pkgs.lib; {
description = "Core header libraries and utilities";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}

71
logdiag-master.nix Normal file
View File

@ -0,0 +1,71 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "logdiag";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
wrapGAppsHook
];
buildInputs = with pkgs; [
gtk3
json-glib
lua5_2
# To address pkg-config warnings, all the way down.
libthai
pcre2
libdatrie
libepoxy
] ++ lib.optionals (!stdenv.isDarwin) [
libxkbcommon
xorg.libXdmcp
xorg.libXtst
] ++ lib.optionals stdenv.isLinux [
util-linux
libselinux
libsepol
pcre
];
nativeCheckInputs = with pkgs; lib.optionals (!stdenv.isDarwin) [
xvfb-run
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DBUILD_TESTING=ON"
];
doCheck = true;
checkPhase = with pkgs; ''
runHook preCheck
${lib.optionalString (!stdenv.isDarwin) "xvfb-run"} \
ctest --force-new-ctest-process
runHook postCheck
'';
meta = with pkgs.lib; {
description = "Schematic editor";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}

47
neetdraw-master.nix Normal file
View File

@ -0,0 +1,47 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "neetdraw";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
ncurses
libev
# Termo demo-glib.c
#glib
#pcre2
#util-linux
#libselinux
#libsepol
#pcre
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
doCheck = true;
meta = with pkgs.lib; {
description = "Terminal drawing application";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}

64
nncmpp-master.nix Normal file
View File

@ -0,0 +1,64 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "nncmpp";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
# Tests
libxml2
desktop-file-utils
];
buildInputs = with pkgs; [
ncurses
libunistring
curl
# Termo demo-glib.c
#glib
#pcre2
#util-linux
#libselinux
#libsepol
#pcre
] ++ lib.optionals full [
fftw
fftwSinglePrec
libpulseaudio
xorg.libXft
xorg.libXau
xorg.libXdmcp
expat
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DBUILD_TESTING=ON"
];
doCheck = true;
meta = with pkgs.lib; {
description = "MPD client";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = with licenses; [ bsd0 mit ];
};
}

View File

@ -0,0 +1,59 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.buildGoModule rec {
pname = "pdf-simple-sign";
version = "master";
# The author recognizes that this is awful.
# gropdf-enabled groff build was broken as of writing.
nativeCheckInputs = with pkgs; [
ncurses
inkscape
#(groff.override { enableGhostscript = true; })
libreoffice
imagemagick
openssl
# certutil
nss.tools
# pdfsig
(poppler.override { utils = true; })
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
# vendorHash = pkgs.lib.fakeHash;
vendorHash = "sha256-05h2f22TPRwadHZfueO8lXKS3Js7d8QVSOrEkY7qUZ8=";
doCheck = true;
# libreoffice doesn't contain the lowriter script.
patchPhase = ''
sed -i 's/^lowriter/soffice --writer/' test.sh
'';
checkPhase = ''
runHook preCheck
./test.sh $GOPATH/bin/pdf-simple-sign
runHook postCheck
'';
meta = with pkgs.lib; {
description = "Simple PDF signer";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}

44
ponymap-master.nix Normal file
View File

@ -0,0 +1,44 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "ponymap";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
help2man
];
buildInputs = with pkgs; [
openssl
ncurses
libiconv
jansson
] ++ lib.optionals full [
lua5_3
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
doCheck = true;
meta = with pkgs.lib; {
description = "Experimental network scanner";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = with licenses; [ bsd0 mit ];
};
}

38
sdn-master.nix Normal file
View File

@ -0,0 +1,38 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "sdn";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
];
buildInputs = with pkgs; [
ncurses
acl
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
meta = with pkgs.lib; {
description = "Directory navigator";
homepage = "https://git.janouch.name/p/${pname}";
# libacl, __STDC_ISO_10646__
platforms = platforms.linux;
license = licenses.bsd0;
};
}

70
tdv-master.nix Normal file
View File

@ -0,0 +1,70 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "tdv";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
librsvg
# Tests
libxml2
desktop-file-utils
];
buildInputs = with pkgs; [
ncurses
icu
glib
pango
# To address pkg-config warnings for pango.
libthai
pcre2
libdatrie
] ++ lib.optionals full [
gtk3
# To address pkg-config warnings for gtk3.
libepoxy
] ++ lib.optionals (full && !stdenv.isDarwin) [
libxkbcommon
xorg.libXdmcp
xorg.libXtst
] ++ lib.optionals stdenv.isLinux [
# To address pkg-config warnings for glib.
util-linux
libselinux
libsepol
pcre
];
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DBUILD_TESTING=ON"
];
doCheck = true;
meta = with pkgs.lib; {
description = "Translation dictionary viewer";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = with licenses; [ bsd0 mit ];
};
}

56
xK-master.nix Normal file
View File

@ -0,0 +1,56 @@
{ pkgs ? import <nixpkgs> { }
, local ? false
, full ? true
}:
pkgs.stdenv.mkDerivation rec {
pname = "xK";
version = "master";
nativeBuildInputs = with pkgs; [
cmake
pkg-config
perl
];
buildInputs = with pkgs; [
openssl
libffi
ncurses
libiconv
] ++ lib.optionals full [
readline
lua5_3
] ++ lib.optionals (!full) [
libedit
];
# TODO: Try to integrate xP in the build.
# That might need a separate package. See https://nixos.wiki/wiki/Go.
src = if local then
builtins.path {
path = ../${pname}/git;
name = "${pname}";
}
else
fetchGit {
url = "https://git.janouch.name/p/${pname}.git";
submodules = true;
ref = "master";
};
cmakeFlags = [
"-DBUILD_TESTING=ON"
] ++ pkgs.lib.optionals (!full) [
"-DWANT_READLINE=OFF"
"-DWANT_LIBEDIT=ON"
];
doCheck = true;
meta = with pkgs.lib; {
description = "IRC daemon, bot, TUI client";
homepage = "https://git.janouch.name/p/${pname}";
platforms = platforms.all;
license = licenses.bsd0;
};
}