commit badd347b228555601e4c8ee2910dacb7cdd80936
Author: Přemysl Eric Janouch
Date: Thu Jun 29 02:31:03 2023 +0200
Initial commit
diff --git a/desktop-tools-master.nix b/desktop-tools-master.nix
new file mode 100644
index 0000000..4f1d661
--- /dev/null
+++ b/desktop-tools-master.nix
@@ -0,0 +1,62 @@
+{ pkgs ? import { }
+, 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;
+ };
+}
diff --git a/fiv-master.nix b/fiv-master.nix
new file mode 100644
index 0000000..15605bc
--- /dev/null
+++ b/fiv-master.nix
@@ -0,0 +1,78 @@
+{ pkgs ? import { }
+, 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 ];
+ };
+}
diff --git a/hex-master.nix b/hex-master.nix
new file mode 100644
index 0000000..eed76ec
--- /dev/null
+++ b/hex-master.nix
@@ -0,0 +1,61 @@
+{ pkgs ? import { }
+, 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 ];
+ };
+}
diff --git a/json-rpc-shell-master.nix b/json-rpc-shell-master.nix
new file mode 100644
index 0000000..4aabafa
--- /dev/null
+++ b/json-rpc-shell-master.nix
@@ -0,0 +1,56 @@
+{ pkgs ? import { }
+, 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 ];
+ };
+}
diff --git a/liberty-master.nix b/liberty-master.nix
new file mode 100644
index 0000000..e7dd7ab
--- /dev/null
+++ b/liberty-master.nix
@@ -0,0 +1,54 @@
+{ pkgs ? import { }
+, 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;
+ };
+}
diff --git a/logdiag-master.nix b/logdiag-master.nix
new file mode 100644
index 0000000..fc978a1
--- /dev/null
+++ b/logdiag-master.nix
@@ -0,0 +1,71 @@
+{ pkgs ? import { }
+, 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;
+ };
+}
diff --git a/neetdraw-master.nix b/neetdraw-master.nix
new file mode 100644
index 0000000..929b8b4
--- /dev/null
+++ b/neetdraw-master.nix
@@ -0,0 +1,47 @@
+{ pkgs ? import { }
+, 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;
+ };
+}
diff --git a/nncmpp-master.nix b/nncmpp-master.nix
new file mode 100644
index 0000000..2eb2b05
--- /dev/null
+++ b/nncmpp-master.nix
@@ -0,0 +1,64 @@
+{ pkgs ? import { }
+, 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 ];
+ };
+}
diff --git a/pdf-simple-sign-master.nix b/pdf-simple-sign-master.nix
new file mode 100644
index 0000000..f2bab28
--- /dev/null
+++ b/pdf-simple-sign-master.nix
@@ -0,0 +1,59 @@
+{ pkgs ? import { }
+, 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;
+ };
+}
diff --git a/ponymap-master.nix b/ponymap-master.nix
new file mode 100644
index 0000000..44ef80e
--- /dev/null
+++ b/ponymap-master.nix
@@ -0,0 +1,44 @@
+{ pkgs ? import { }
+, 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 ];
+ };
+}
diff --git a/sdn-master.nix b/sdn-master.nix
new file mode 100644
index 0000000..90300fd
--- /dev/null
+++ b/sdn-master.nix
@@ -0,0 +1,38 @@
+{ pkgs ? import { }
+, 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;
+ };
+}
diff --git a/tdv-master.nix b/tdv-master.nix
new file mode 100644
index 0000000..8aa0c79
--- /dev/null
+++ b/tdv-master.nix
@@ -0,0 +1,70 @@
+{ pkgs ? import { }
+, 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 ];
+ };
+}
diff --git a/xK-master.nix b/xK-master.nix
new file mode 100644
index 0000000..487bd7e
--- /dev/null
+++ b/xK-master.nix
@@ -0,0 +1,56 @@
+{ pkgs ? import { }
+, 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;
+ };
+}