From 1650f05a8bcc6f1335af1e3955668fd632dfde5d Mon Sep 17 00:00:00 2001 From: Niten Date: Mon, 30 Aug 2021 09:45:43 -0700 Subject: [PATCH] Initial checkin --- default.nix | 149 +++++++++++++ pkgs/archiva.nix | 30 +++ pkgs/backplane-dns-client.nix | 35 +++ pkgs/backplane-dns-server.nix | 33 +++ pkgs/cl-gemini.nix | 65 ++++++ pkgs/flatpak/bubblewrap-paths.patch | 15 ++ pkgs/flatpak/default.nix | 165 ++++++++++++++ pkgs/flatpak/fix-paths.patch | 22 ++ pkgs/flatpak/fix-test-paths.patch | 205 ++++++++++++++++++ .../respect-xml-catalog-files-var.patch | 15 ++ pkgs/flatpak/unset-env-vars.patch | 12 + pkgs/flatpak/use-flatpak-from-path.patch | 50 +++++ pkgs/flatpak/validate-icon-pixbuf.patch | 13 ++ pkgs/google-photos-uploader.nix | 24 ++ pkgs/hll2380dw-cups.nix | 44 ++++ pkgs/hll2380dw-lp.nix | 44 ++++ pkgs/letsencrypt-ca.nix | 28 +++ pkgs/lisp/agnostic-lizard.nix | 20 ++ pkgs/lisp/arrows.nix | 20 ++ pkgs/lisp/backplane-dns.nix | 29 +++ pkgs/lisp/backplane-server.nix | 20 ++ pkgs/lisp/cl-gemini.nix | 46 ++++ pkgs/lisp/cl-sasl.nix | 22 ++ pkgs/lisp/cl-xmpp.nix | 35 +++ pkgs/lisp/default.nix | 22 ++ pkgs/lisp/fare-mop.nix | 23 ++ pkgs/lisp/file-types.nix | 20 ++ pkgs/lisp/inferior-shell.nix | 28 +++ pkgs/lisp/ip-utils.nix | 24 ++ pkgs/lisp/osicat.nix | 24 ++ pkgs/lisp/slynk-asdf.nix | 22 ++ pkgs/lisp/slynk-macrostep.nix | 22 ++ pkgs/lisp/slynk-stepper.nix | 23 ++ pkgs/lisp/slynk.nix | 32 +++ pkgs/lisp/usocket-server.nix | 23 ++ pkgs/lisp/xml-emitter.nix | 22 ++ pkgs/vanilla-forum.nix | 29 +++ 37 files changed, 1455 insertions(+) create mode 100644 default.nix create mode 100644 pkgs/archiva.nix create mode 100644 pkgs/backplane-dns-client.nix create mode 100644 pkgs/backplane-dns-server.nix create mode 100644 pkgs/cl-gemini.nix create mode 100644 pkgs/flatpak/bubblewrap-paths.patch create mode 100644 pkgs/flatpak/default.nix create mode 100644 pkgs/flatpak/fix-paths.patch create mode 100644 pkgs/flatpak/fix-test-paths.patch create mode 100644 pkgs/flatpak/respect-xml-catalog-files-var.patch create mode 100644 pkgs/flatpak/unset-env-vars.patch create mode 100644 pkgs/flatpak/use-flatpak-from-path.patch create mode 100644 pkgs/flatpak/validate-icon-pixbuf.patch create mode 100644 pkgs/google-photos-uploader.nix create mode 100644 pkgs/hll2380dw-cups.nix create mode 100644 pkgs/hll2380dw-lp.nix create mode 100644 pkgs/letsencrypt-ca.nix create mode 100644 pkgs/lisp/agnostic-lizard.nix create mode 100644 pkgs/lisp/arrows.nix create mode 100644 pkgs/lisp/backplane-dns.nix create mode 100644 pkgs/lisp/backplane-server.nix create mode 100644 pkgs/lisp/cl-gemini.nix create mode 100644 pkgs/lisp/cl-sasl.nix create mode 100644 pkgs/lisp/cl-xmpp.nix create mode 100644 pkgs/lisp/default.nix create mode 100644 pkgs/lisp/fare-mop.nix create mode 100644 pkgs/lisp/file-types.nix create mode 100644 pkgs/lisp/inferior-shell.nix create mode 100644 pkgs/lisp/ip-utils.nix create mode 100644 pkgs/lisp/osicat.nix create mode 100644 pkgs/lisp/slynk-asdf.nix create mode 100644 pkgs/lisp/slynk-macrostep.nix create mode 100644 pkgs/lisp/slynk-stepper.nix create mode 100644 pkgs/lisp/slynk.nix create mode 100644 pkgs/lisp/usocket-server.nix create mode 100644 pkgs/lisp/xml-emitter.nix create mode 100644 pkgs/vanilla-forum.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..12b8ad8 --- /dev/null +++ b/default.nix @@ -0,0 +1,149 @@ +{ pkgs, lib, ... }: + +let + callPackage = pkgs.callPackage; + +in { + nixpkgs.config.packageOverrides = pkgs: rec { + + letsencrypt-ca = callPackage ./pkgs/letsencrypt-ca.nix { }; + + minecraft-current = pkgs.minecraft-server_1_16_4; + + minecraft-server_1_15_1 = pkgs.minecraft-server.overrideAttrs + (oldAttrs: rec { + version = "1.15.1"; + src = builtins.fetchurl { + url = + "https://launcher.mojang.com/v1/objects/4d1826eebac84847c71a77f9349cc22afd0cf0a1/server.jar"; + sha256 = + "a0c062686bee5a92d60802ca74d198548481802193a70dda6d5fe7ecb7207993"; + }; + }); + + minecraft-server_1_16_1 = let + version = "1.16.1"; + url = + "https://launcher.mojang.com/v1/objects/a412fd69db1f81db3f511c1463fd304675244077/server.jar"; + sha256 = "0nwkdig6yw4cnm2ld78z4j4xzhbm1rwv55vfxz0gzhsbf93xb0i7"; + in (pkgs.minecraft-server.overrideAttrs (oldAttrs: rec { + name = "minecraft-server-${version}"; + inherit version; + src = pkgs.fetchurl { inherit url sha256; }; + })); + + minecraft-server_1_16_2 = let + version = "1.16.2"; + url = + "https://launcher.mojang.com/v1/objects/c5f6fb23c3876461d46ec380421e42b289789530/server.jar"; + sha256 = "0fbghwrj9b2y9lkn2b17id4ghglwvyvcc8065h582ksfz0zys0i9"; + in (pkgs.minecraft-server.overrideAttrs (oldAttrs: rec { + name = "minecraft-server-${version}"; + inherit version; + src = pkgs.fetchurl { inherit url sha256; }; + })); + + minecraft-server_1_16_4 = pkgs.minecraft-server.overrideAttrs + (oldAttrs: rec { + version = "1.15.1"; + src = builtins.fetchurl { + url = + "https://launcher.mojang.com/v1/objects/35139deedbd5182953cf1caa23835da59ca3d7cd/server.jar"; + sha256 = "01i5nd03sbnffbyni1fa6hsg5yll2h19vfrpcydlivx10gck0ka4"; + }; + }); + + postgresql_11_gssapi = pkgs.postgresql_11.overrideAttrs (oldAttrs: rec { + configureFlags = oldAttrs.configureFlags ++ [ "--with-gssapi" ]; + buildInputs = oldAttrs.buildInputs ++ [ pkgs.krb5 ]; + }); + + postgresql_12_gssapi = pkgs.postgresql_12.overrideAttrs (oldAttrs: rec { + configureFlags = oldAttrs.configureFlags ++ [ "--with-gssapi" ]; + buildInputs = oldAttrs.buildInputs ++ [ pkgs.krb5 ]; + }); + + opencv-java = pkgs.opencv.overrideAttrs (oldAttrs: rec { + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.ant ]; + pname = "opencv-java"; + nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.jdk11 pkgs.ant ]; + cmakeFlags = oldAttrs.cmakeFlags ++ [ "-DWITH_JAVA=ON" ]; + }); + + hll2380dw-cups = callPackage ./pkgs/hll2380dw-cups.nix { }; + + hll2380dw-lpr = callPackage ./pkgs/hll2380dw-lp.nix { }; + + backplane-dns-client = callPackage ./pkgs/backplane-dns-client.nix { }; + + cl-gemini = callPackage ./pkgs/cl-gemini.nix { inherit localLispPackages; }; + + fudo-service = callPackage ./pkgs/fudo-service.nix { }; + + google-photos-uploader = callPackage ./pkgs/google-photo-uploader.nix { }; + + ## + ## Check this in once, then delete it + ## + # doomEmacsInit = pkgs.writeShellScriptBin "doom-emacs-init.sh" '' + # DOOMDIR=$HOME/.emacs.d + + # function clone_into() { + # ${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs.git $1 + # } + + # if [ ! -d "$DOOMDIR" ]; then + # clone_into $DOOMDIR + # $DOOMDIR/bin/doom -y install + # fi + + # if [ ! -f $DOOMDIR/bin/doom ]; then + # # legacy...move to a backup + # mv $HOME/.emacs.d $HOME/.emacs.d.bak + # mv $HOME/.emacs $HOME/.emacs.bak + # clone_into $DOOMDIR + # $DOOMDIR/bin/doom -y install + # fi + + # $DOOMDIR/bin/doom sync + + # #if ${pkgs.emacs}/bin/emacsclient -ca false -e '(delete-frame)'; then + # # # emacs is running + # # ${pkgs.emacs}/bin/emacsclient -e '(doom/reload)' + # #fi + # ''; + + localLispPackages = (callPackage ./pkgs/lisp { inherit localLispPackages; }) + // pkgs.lispPackages; + + backplane-dns-server = callPackage ./backplane-dns-server.nix { + inherit localLispPackages; + }; + + doom-emacs-config = builtins.fetchGit { + url = "https://git.fudo.org/niten/doom-emacs.git"; + }; + + vanilla-forum = callPackage ./vanilla-forum.nix { }; + + openttd-data = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/openttd-data.git"; + rev = "5b7dd0ca9014e642e1f2d0aa3154b5da869911d3"; + sha256 = "061k0f0jgm5k81djslb172xk0wkis0m878izgisyj2qgg3wf1awh"; + }; + + textfiles = pkgs.fetchgit { + url = "https://git.informis.land/informis/textfiles.git"; + rev = "278a90f7ce219e36e5de0a80b540e469a9bce912"; + sha256 = "06qns3ayc84mamdgn0jw652rvx60wy9km1vxm2361mzmx2zk89iw"; + }; + + clj2nix = pkgs.callPackage (pkgs.fetchgit { + url = "https://github.com/hlolli/clj2nix.git"; + rev = "e6d09dd8c5cda68eb0534bd8501f2d5dcd7b2e95"; + sha256 = "0v0q6iglr0lx13j1snzd8mjxids1af1p2h7bkvmsyk2bfp36naqx"; + }) { }; + + flatpak = pkgs.callPackage ./flatpak { }; + }; +} diff --git a/pkgs/archiva.nix b/pkgs/archiva.nix new file mode 100644 index 0000000..7545d44 --- /dev/null +++ b/pkgs/archiva.nix @@ -0,0 +1,30 @@ +{ pkgs, lib, fetchurl, ... }: + +let + version = "2.2.5"; + url = + "https://mirrors.sonic.net/apache/archiva/${version}/binaries/apache-archiva-${version}-bin.tar.gz"; + sha256 = "01119af2d9950eacbcce0b7f8db5067b166ad26c1e1701bef829105441bb6e29"; + +in pkgs.stdenv.mkDerivation { + name = "archiva-${version}"; + + src = builtins.fetchurl { + url = url; + sha256 = sha256; + }; + + phases = [ "installPhase" ]; + + buildInputs = with pkgs; [ stdenv procps makeWrapper ]; + + installPhase = '' + mkdir $out + tar -xzf $src + cd apache-archiva-${version} + mv {LICENSE,NOTICE,apps,bin,conf,contexts,lib,logs,temp} $out + makeWrapper $out/bin/archiva $out/bin/archivaWrapped --set PATH ${ + lib.makeBinPath [ pkgs.procps ] + } + ''; +} diff --git a/pkgs/backplane-dns-client.nix b/pkgs/backplane-dns-client.nix new file mode 100644 index 0000000..ab9dfdc --- /dev/null +++ b/pkgs/backplane-dns-client.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchgit, pkgs, bundlerEnv }: + +let + url = "https://git.fudo.org/fudo-public/backplane-dns-client.git"; + version = "0.1"; + srcdir = ../static/backplane-dns-client; + gems = bundlerEnv { + name = "backplane-dns-client-env"; + ruby = pkgs.ruby; + gemdir = srcdir; + }; + +in stdenv.mkDerivation { + name = "backplane-dns-client-${version}"; + + src = srcdir; + + buildInputs = [gems pkgs.ruby]; + + phases = ["installPhase"]; + + installPhase = '' + mkdir -p "$out/bin" "$out/lib" + + cp "$src/dns-client.rb" "$out/lib" + + BIN="$out/bin/backplane-dns-client" + + cat > $BIN < bwrap-result 2>&1; then ++ --ro-bind / / @coreutils@/bin/true > bwrap-result 2>&1; then + _flatpak_bwrap_works=false + else + _flatpak_bwrap_works=true +@@ -504,7 +504,7 @@ dbus-daemon --fork --config-file=session.conf --print-address=3 --print-pid=4 \ + export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)" + DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)" + +-if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then ++if ! @coreutils@/bin/kill -0 "$DBUS_SESSION_BUS_PID"; then + assert_not_reached "Failed to start dbus-daemon" + fi + +@@ -519,7 +519,7 @@ commit_to_path () { + } + + cleanup () { +- /bin/kill -9 $DBUS_SESSION_BUS_PID ++ @coreutils@/bin/kill -9 $DBUS_SESSION_BUS_PID + gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true + fusermount -u $XDG_RUNTIME_DIR/doc || : + kill $(jobs -p) &> /dev/null || true +diff --git a/tests/make-test-app.sh b/tests/make-test-app.sh +index 612f914f..4b890da2 100755 +--- a/tests/make-test-app.sh ++++ b/tests/make-test-app.sh +@@ -151,13 +151,13 @@ msgid "Hello world" + msgstr "Hallo Welt" + EOF + mkdir -p ${DIR}/files/de/share/de/LC_MESSAGES +-msgfmt --output-file ${DIR}/files/de/share/de/LC_MESSAGES/helloworld.mo de.po ++@gettext@/bin/msgfmt --output-file ${DIR}/files/de/share/de/LC_MESSAGES/helloworld.mo de.po + cat > fr.po <> $BINS +- +- # Add library dependencies +- (ldd "${f}" | sed "s/.* => //" | awk '{ print $1}' | grep ^/ | sort -u -o $LIBS $LIBS -) || true +- +- local shebang=$(sed -n '1s/^#!\([^ ]*\).*/\1/p' "${f}") +- if [ x$shebang != x ]; then +- add_bin "$shebang" +- fi +-} +- + for i in $@ bash ls cat echo readlink socat; do +- I=`which $i` +- add_bin $I +-done +-for i in `cat $BINS`; do +- #echo Adding binary $i 1>&2 +- cp "$i" ${DIR}/usr/bin/ +-done +-for i in `cat $LIBS`; do +- #echo Adding library $i 1>&2 +- cp "$i" ${DIR}/usr/lib/ ++ I=$(readlink -f $(which $i)) ++ [ -e ${DIR}/usr/bin/$i ] && continue ++ requisites=$(nix-store --query --requisites "$I") ++ for r in $requisites; do ++ # a single store item can be needed by multiple paths, no need to copy it again ++ if [ ! -e ${DIR}/$r ]; then ++ cp -r $r ${DIR}/$r ++ fi ++ done ++ ln -s $I ${DIR}/usr/bin/$i + done + ln -s bash ${DIR}/usr/bin/sh + +@@ -84,11 +62,13 @@ echo "Hello world, from a runtime$EXTRA" + EOF + chmod a+x ${DIR}/usr/bin/runtime_hello.sh + +-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but +-# the real en_US locale is often not available, because its in the +-# local archive. +-mkdir -p ${DIR}/usr/lib/locale/ +-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US ++# We do not copy C.UTF8 locale because it is in locale archive and ++# that is already copied with glibc. ++ ++mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store ++chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed ++find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths ++find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets + + if [ x$COLLECTION_ID != x ]; then + collection_args=--collection-id=${COLLECTION_ID} +diff --git a/tests/testlibrary.c b/tests/testlibrary.c +index 509ce6cc..6a333c9c 100644 +--- a/tests/testlibrary.c ++++ b/tests/testlibrary.c +@@ -1399,7 +1399,7 @@ check_bwrap_support (void) + { + gint exit_code = 0; + char *argv[] = { (char *) bwrap, "--unshare-ipc", "--unshare-net", +- "--unshare-pid", "--ro-bind", "/", "/", "/bin/true", NULL }; ++ "--unshare-pid", "--ro-bind", "/", "/", "@coreutils@/bin/true", NULL }; + g_autofree char *argv_str = g_strjoinv (" ", argv); + g_test_message ("Spawning %s", argv_str); + g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &exit_code, &error); +diff --git a/triggers/desktop-database.trigger b/triggers/desktop-database.trigger +index 2188f535..d8283061 100755 +--- a/triggers/desktop-database.trigger ++++ b/triggers/desktop-database.trigger +@@ -1,5 +1,5 @@ + #!/bin/sh + +-if test \( -x "$(which update-desktop-database 2>/dev/null)" \) -a \( -d $1/exports/share/applications \); then +- exec update-desktop-database -q $1/exports/share/applications ++if test \( -d $1/exports/share/applications \); then ++ exec @dfu@/bin/update-desktop-database -q $1/exports/share/applications + fi +diff --git a/triggers/gtk-icon-cache.trigger b/triggers/gtk-icon-cache.trigger +index 711cfab2..07baa2ac 100755 +--- a/triggers/gtk-icon-cache.trigger ++++ b/triggers/gtk-icon-cache.trigger +@@ -1,10 +1,10 @@ + #!/bin/sh + +-if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d $1/exports/share/icons/hicolor \); then +- cp /usr/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/ ++if test \( -d $1/exports/share/icons/hicolor \); then ++ cp @hicolorIconTheme@/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/ + for dir in $1/exports/share/icons/*; do + if test -f $dir/index.theme; then +- if ! gtk-update-icon-cache --quiet $dir; then ++ if ! @gtk3@/bin/gtk-update-icon-cache --quiet $dir; then + echo "Failed to run gtk-update-icon-cache for $dir" + exit 1 + fi +diff --git a/triggers/mime-database.trigger b/triggers/mime-database.trigger +index 2067d8ec..a49a8777 100755 +--- a/triggers/mime-database.trigger ++++ b/triggers/mime-database.trigger +@@ -1,5 +1,5 @@ + #!/bin/sh + +-if test \( -x "$(which update-mime-database 2>/dev/null)" \) -a \( -d $1/exports/share/mime/packages \); then +- exec update-mime-database $1/exports/share/mime ++if test \( -d $1/exports/share/mime/packages \); then ++ exec @smi@/bin/update-mime-database $1/exports/share/mime + fi diff --git a/pkgs/flatpak/respect-xml-catalog-files-var.patch b/pkgs/flatpak/respect-xml-catalog-files-var.patch new file mode 100644 index 0000000..4cee60b --- /dev/null +++ b/pkgs/flatpak/respect-xml-catalog-files-var.patch @@ -0,0 +1,15 @@ +diff --git a/acinclude.m4 b/acinclude.m4 +index 92ec3985..b3fccf1d 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -40,8 +40,8 @@ AC_DEFUN([JH_CHECK_XML_CATALOG], + [ + AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl + AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) +- if $jh_found_xmlcatalog && \ +- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then ++ # empty argument forces libxml to use XML_CATALOG_FILES variable ++ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then + AC_MSG_RESULT([found]) + ifelse([$3],,,[$3 + ])dnl diff --git a/pkgs/flatpak/unset-env-vars.patch b/pkgs/flatpak/unset-env-vars.patch new file mode 100644 index 0000000..63ce0d1 --- /dev/null +++ b/pkgs/flatpak/unset-env-vars.patch @@ -0,0 +1,12 @@ +diff --git a/common/flatpak-run.c b/common/flatpak-run.c +index 8d52d3a5..81700183 100644 +--- a/common/flatpak-run.c ++++ b/common/flatpak-run.c +@@ -1232,6 +1232,7 @@ static const ExportData default_exports[] = { + {"PERLLIB", NULL}, + {"PERL5LIB", NULL}, + {"XCURSOR_PATH", NULL}, ++ {"GDK_PIXBUF_MODULE_FILE", NULL}, + }; + + static const ExportData no_ld_so_cache_exports[] = { diff --git a/pkgs/flatpak/use-flatpak-from-path.patch b/pkgs/flatpak/use-flatpak-from-path.patch new file mode 100644 index 0000000..84534b7 --- /dev/null +++ b/pkgs/flatpak/use-flatpak-from-path.patch @@ -0,0 +1,50 @@ +diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c +index 52b222ea..9489441f 100644 +--- a/common/flatpak-dir.c ++++ b/common/flatpak-dir.c +@@ -6956,7 +6956,7 @@ export_desktop_file (const char *app, + + new_exec = g_string_new (""); + g_string_append_printf (new_exec, +- FLATPAK_BINDIR "/flatpak run --branch=%s --arch=%s", ++ "flatpak run --branch=%s --arch=%s", + escaped_branch, + escaped_arch); + +@@ -8290,8 +8290,8 @@ flatpak_dir_deploy (FlatpakDir *self, + error)) + return FALSE; + +- bin_data = g_strdup_printf ("#!/bin/sh\nexec %s/flatpak run --branch=%s --arch=%s %s \"$@\"\n", +- FLATPAK_BINDIR, escaped_branch, escaped_arch, escaped_app); ++ bin_data = g_strdup_printf ("#!/bin/sh\nexec flatpak run --branch=%s --arch=%s %s \"$@\"\n", ++ escaped_branch, escaped_arch, escaped_app); + if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE, + G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error)) + return FALSE; +diff --git a/tests/test-bundle.sh b/tests/test-bundle.sh +index d1682344..5e2b9a97 100755 +--- a/tests/test-bundle.sh ++++ b/tests/test-bundle.sh +@@ -67,7 +67,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files + assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/export + assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop + # Ensure Exec key is rewritten +-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello\.sh org\.test\.Hello$" ++assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=master --arch=$ARCH --command=hello\.sh org\.test\.Hello$" + assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png + assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png + +diff --git a/tests/test-run.sh b/tests/test-run.sh +index fecb756e..64043281 100644 +--- a/tests/test-run.sh ++++ b/tests/test-run.sh +@@ -45,7 +45,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/files + assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/export + assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop + # Ensure Exec key is rewritten +-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$" ++assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$" + assert_has_file $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini + assert_file_has_content $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini "^DefaultDisabled=true$" + assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png diff --git a/pkgs/flatpak/validate-icon-pixbuf.patch b/pkgs/flatpak/validate-icon-pixbuf.patch new file mode 100644 index 0000000..086114e --- /dev/null +++ b/pkgs/flatpak/validate-icon-pixbuf.patch @@ -0,0 +1,13 @@ +diff --git a/icon-validator/validate-icon.c b/icon-validator/validate-icon.c +index 9e885070..44fea035 100644 +--- a/icon-validator/validate-icon.c ++++ b/icon-validator/validate-icon.c +@@ -200,6 +200,8 @@ rerun_in_sandbox (const char *arg_width, + add_args (args, "--setenv", "G_MESSAGES_DEBUG", g_getenv ("G_MESSAGES_DEBUG"), NULL); + if (g_getenv ("G_MESSAGES_PREFIXED")) + add_args (args, "--setenv", "G_MESSAGES_PREFIXED", g_getenv ("G_MESSAGES_PREFIXED"), NULL); ++ if (g_getenv ("GDK_PIXBUF_MODULE_FILE")) ++ add_args (args, "--setenv", "GDK_PIXBUF_MODULE_FILE", g_getenv ("GDK_PIXBUF_MODULE_FILE"), NULL); + + add_args (args, validate_icon, arg_width, arg_height, filename, NULL); + g_ptr_array_add (args, NULL); diff --git a/pkgs/google-photos-uploader.nix b/pkgs/google-photos-uploader.nix new file mode 100644 index 0000000..322cdab --- /dev/null +++ b/pkgs/google-photos-uploader.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +pkgs.buildGoModule rec { + pname = "google-photos-uploader"; + version = "1.6.1"; + + src = pkgs.fetchFromGitHub { + owner = "int128"; + repo = "gpup"; + rev = "${version}"; + sha256 = "0zdkd5iwkp270p0810dijg25djkzrsdyqiqaqv6rzzgzj5d5pwhm"; + }; + + modSha256 = "15ndc6jq51f9mz1v089416x2lxrifp3wglbxpff8b055jj07hbkw"; + + subPackages = [ "." ]; + + meta = with pkgs.lib; { + description = "Google photos uploader, written in Go."; + homepage = "https://github.com/int128/gpup"; + license = licenses.asl20; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/hll2380dw-cups.nix b/pkgs/hll2380dw-cups.nix new file mode 100644 index 0000000..0a73dd9 --- /dev/null +++ b/pkgs/hll2380dw-cups.nix @@ -0,0 +1,44 @@ +{ stdenv, lib, fetchurl, makeWrapper, cups, dpkg, a2ps, ghostscript, gnugrep +, gnused, coreutils, file, perl, which }: + +stdenv.mkDerivation rec { + pname = "hll2380dw-cups"; + version = "3.2.0-1"; + platform = "i386"; + + src = fetchurl { + url = + "https://download.brother.com/welcome/dlf101772/hll2380dwcupswrapper-${version}.i386.deb"; + sha256 = "08g3kx5lgwzb3f9ypj8knmpkkj0h3kv1i4gd20rzjxrx6vx1wbpl"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ cups ghostscript dpkg a2ps ]; + + dontUnpack = true; + + installPhase = '' + dpkg-deb -x $src $out + wrapProgram $out/opt/brother/Printers/HLL2380DW/cupswrapper/paperconfigml1 \ + --prefix PATH : ${ + lib.makeBinPath [ coreutils ghostscript gnugrep gnused ] + } + mkdir -p $out/lib/cups/filter/ + ln -s $out/opt/brother/Printers/HLL2380DW/cupswrapper/brother_lpdwrapper_HLL2380DW \ + $out/lib/cups/filter/brother_lpdwrapper_HLL2380DW + ln -s $out/opt/brother/Printers/HLL2380DW/paperconfigml1 \ + $out/lib/cups/filter/ + mkdir -p $out/share/cups/model + ln -s $out/opt/brother/Printers/HLL2380DW/cupswrapper/brother-HLL2380DW-cups-en.ppd $out/share/cups/model/ + touch $out/HI + ''; + + meta = with lib; { + homepage = "http://www.brother.com/"; + description = "Brother HL-L2380DW combined print driver"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + downloadPage = + "http://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2380dw_us&os=128"; + }; +} diff --git a/pkgs/hll2380dw-lp.nix b/pkgs/hll2380dw-lp.nix new file mode 100644 index 0000000..06e4fce --- /dev/null +++ b/pkgs/hll2380dw-lp.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, fetchurl, makeWrapper, cups, dpkg, a2ps, ghostscript, gnugrep +, gnused, coreutils, file, perl, which }: + +let + model = "hll2380dw"; + version = "3.2.0-1"; + src = fetchurl { + url = + "https://download.brother.com/welcome/dlf101771/hll2380dwlpr-${version}.i386.deb"; + sha256 = "08g3kx5lgwzb3f9ypj8knmpkkj0h3kv1i4gd20rzjxrx6vx1wbpx"; + }; + reldir = "opt/brother/Printers/${model}/"; + +in stdenv.mkDerivation rec { + inherit src version; + pname = "${model}-lpr"; + + nativeBuildInputs = [ dpkg makeWrapper ]; + + unpackPhase = "dpkg-deb -x $src $out"; + + installPhase = '' + DIR="$out/${reldir}" + substituteInPlace $dir/lpd/filter_${model} \ + --replace /usr/bin/perl ${perl}/bin/perl \ + --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$dir\"; #" \ + --replace "PRINTER =~" "PRINTER = \"${model}\"; #" + wrapProgram $dir/lpd/filter_${model} \ + --prefix PATH : ${ + lib.makeBinPath [ coreutils ghostscript gnugrep gnused which ] + } + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + $dir/lpd/${model}filter + ''; + + meta = { + homepage = "http://www.brother.com/"; + description = "Brother ${lib.toUpper model} LPR print driver"; + license = lib.licenses.unfree; + platforms = [ "i386" "x86_64-linux" ]; + downloadPage = + "http://support.brother.com/g/b/downloadlist.aspx?c=us_ot&lang=en&prod=hll2380dw_us&os=128"; + }; +} diff --git a/pkgs/letsencrypt-ca.nix b/pkgs/letsencrypt-ca.nix new file mode 100644 index 0000000..c0957e5 --- /dev/null +++ b/pkgs/letsencrypt-ca.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl }: + +let + url = "https://letsencrypt.org/certs/letsencryptauthorityx3.pem.txt"; + sha256 = "b6dd03f7fb8508e4f7ffe82ca8a3f98dde163e0bd44897e112a0850a5b606acf"; + +in stdenv.mkDerivation { + + name = "letsencrypt-ca"; + + src = fetchurl { + name = "isrgrootx1.pem.txt"; + url = url; + sha256 = sha256; + }; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -pv $out/etc/ssl/letsencrypt + cp -v $src $out/etc/ssl/letsencrypt/ca.pem + ''; + + meta = { + homepage = https://letsencrypt.com; + description = "Certificate Authority (CA) certificate for LetsEncrypt"; + }; +} diff --git a/pkgs/lisp/agnostic-lizard.nix b/pkgs/lisp/agnostic-lizard.nix new file mode 100644 index 0000000..490f6ef --- /dev/null +++ b/pkgs/lisp/agnostic-lizard.nix @@ -0,0 +1,20 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "agnostic-lizard"; + packageName = "agnostic-lizard"; + description = "Agnostic Lizard is a portable implementation of a code walker and in particular of the macroexpand-all function (and macro) that makes a best effort to be correct while not expecting much beyond what the Common Lisp standard requires."; + + buildSystems = [ "agnostic-lizard" ]; + + deps = with localLispPackages; []; + + src = pkgs.fetchgit { + url = "https://gitlab.common-lisp.net/mraskin/agnostic-lizard.git"; + rev = "fe3a73719f05901c8819f8995a3ebae738257952"; + sha256 = "0ax78y8w4zlp5dcwyhz2nq7j3shi49qn31dkfg8lv2jlg7mkwh2d"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "agnostic-lizard.asd" ]; +} diff --git a/pkgs/lisp/arrows.nix b/pkgs/lisp/arrows.nix new file mode 100644 index 0000000..c29d2b3 --- /dev/null +++ b/pkgs/lisp/arrows.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "arrows"; + packageName = "arrows"; + description = "Clojure-style arrows for Common Lisp"; + + buildSystems = [ "arrows" ]; + + deps = []; + + src = pkgs.fetchgit { + url = "https://gitlab.com/Harleqin/arrows.git"; + rev = "df7cf0067e0132d9697ac8b1a4f1b9c88d4f5382"; + sha256 = "042k9vkssrqx9nhp14wdzm942zgdxvp35mba0p2syz98i75im2yy"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "arrows.asd" ]; +} diff --git a/pkgs/lisp/backplane-dns.nix b/pkgs/lisp/backplane-dns.nix new file mode 100644 index 0000000..b2e7d5f --- /dev/null +++ b/pkgs/lisp/backplane-dns.nix @@ -0,0 +1,29 @@ +{ pkgs, backplane-server, arrows, ip-utils, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "backplane-dns"; + packageName = "backplane-dns"; + description = "XMPP Backplane DNS Server"; + + buildSystems = [ "backplane-dns" ]; + + deps = with pkgs.lispPackages; [ + arrows + alexandria + backplane-server + cl-ppcre + ip-utils + postmodern + prove + trivia + ]; + + src = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/backplane-dns.git"; + rev = "3075453a8ccc8bf285bfc83d84317044590ae060"; + sha256 = "1sdgr9zxqam4c8f7nlkgm77si45j0qvvgj6rav9kd6jz6vqgcbi5"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "backplane-dns.asd" ]; +} diff --git a/pkgs/lisp/backplane-server.nix b/pkgs/lisp/backplane-server.nix new file mode 100644 index 0000000..096ea7e --- /dev/null +++ b/pkgs/lisp/backplane-server.nix @@ -0,0 +1,20 @@ +{ pkgs, lib, arrows, cl-xmpp, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "backplane-server"; + packageName = "backplane-server"; + description = "XMPP Backplane Server"; + + buildSystems = [ "backplane-server" ]; + + deps = with pkgs.lispPackages; [ alexandria arrows cl-json cl-xmpp prove ]; + + src = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/backplane-server.git"; + rev = "5b50dd8badf5b5460e9cc7e76e191d274712a3bd"; + sha256 = "18fysksmrbfk131fgazbw1cpaxz47015ashap9y4rswd904dzzss"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "backplane-server.asd" ]; +} diff --git a/pkgs/lisp/cl-gemini.nix b/pkgs/lisp/cl-gemini.nix new file mode 100644 index 0000000..33a8725 --- /dev/null +++ b/pkgs/lisp/cl-gemini.nix @@ -0,0 +1,46 @@ +{ pkgs, localLispPackages, ... }: + +let + url = "https://git.informis.land/informis/cl-gemini.git"; + rev = "1d5075c23237deec536f62ed5dc06f3845eacf6b"; + sha256 = "0j7gz3c83cgishsraqvm1dw42x5c1ydx26jrmkvykljyfhisyjpm"; + +in pkgs.lispPackages.buildLispPackage { + baseName = "cl-gemini"; + packageName = "cl-gemini"; + description = "Gemini server written in Common Lisp."; + + buildSystems = [ "cl-gemini" ]; + + src = pkgs.fetchgit { + url = url; + rev = rev; + sha256 = sha256; + fetchSubmodules = false; + }; + + deps = with localLispPackages; [ + alexandria + arrows + asdf-package-system + asdf-system-connections + cl_plus_ssl + cl-ppcre + fare-mop + file-types + inferior-shell + local-time + osicat + quicklisp + quri + slynk + # slynk-asdf + slynk-macrostep + slynk-stepper + uiop + usocket-server + xml-emitter + ]; + + asdFilesToKeep = [ "cl-gemini.asd" ]; +} diff --git a/pkgs/lisp/cl-sasl.nix b/pkgs/lisp/cl-sasl.nix new file mode 100644 index 0000000..be4af4f --- /dev/null +++ b/pkgs/lisp/cl-sasl.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + description = "SASL package for common lisp"; + baseName = "cl-sasl"; + packageName = "cl-sasl"; + + buildSystems = [ "cl-sasl" ]; + + deps = with pkgs.lispPackages; [ + ironclad + ]; + + src = pkgs.fetchFromGitHub { + owner = "legoscia"; + repo = "cl-sasl"; + rev = "64f195c0756cb80fa5961c072b62907be20a7380"; + sha256 = "0a05q8rls2hn46rbbk6w5km9kqvhsj365zlw6hp32724xy2nd98w"; + }; + + asdFilesToKeep = [ "cl-sasl.asd" ]; +} diff --git a/pkgs/lisp/cl-xmpp.nix b/pkgs/lisp/cl-xmpp.nix new file mode 100644 index 0000000..54fb5e5 --- /dev/null +++ b/pkgs/lisp/cl-xmpp.nix @@ -0,0 +1,35 @@ +{ pkgs, cl-sasl, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "cl-xmpp"; + packageName = "cl-xmpp"; + description = "XMPP library for Common Lisp"; + + buildSystems = [ + "cl-xmpp" + "cl-xmpp-sasl" + "cl-xmpp-tls" + ]; + + deps = with pkgs.lispPackages; [ + cl-base64 + cl_plus_ssl + cl-sasl + cxml + ironclad + usocket + ]; + + src = pkgs.fetchFromGitHub { + owner = "j4yk"; + repo = "cl-xmpp"; + rev = "a0f206e583c72d80523bdf108e7d507597555c6d"; + sha256 = "16qwm7yvwi73q07rsg0i5wrxbv44wm75m3710ph0vf1lzdkrsizk"; + }; + + asdFilesToKeep = [ + "cl-xmpp.asd" + "cl-xmpp-sasl.asd" + "cl-xmpp-tls.asd" + ]; +} diff --git a/pkgs/lisp/default.nix b/pkgs/lisp/default.nix new file mode 100644 index 0000000..0c71093 --- /dev/null +++ b/pkgs/lisp/default.nix @@ -0,0 +1,22 @@ +{ pkgs, localLispPackages, ... }: + +rec { + agnostic-lizard = import ./agnostic-lizard.nix { inherit pkgs localLispPackages; }; + arrows = import ./arrows.nix { inherit pkgs localLispPackages; }; + cl-gemini = import ./cl-gemini.nix { inherit pkgs localLispPackages; }; + cl-sasl = import ./cl-sasl.nix { inherit pkgs localLispPackages; }; + cl-xmpp = import ./cl-xmpp.nix { inherit pkgs localLispPackages; }; + backplane-dns = import ./backplane-dns.nix { inherit pkgs localLispPackages; }; + backplane-server = import ./backplane-server.nix { inherit pkgs localLispPackages; }; + fare-mop = import ./fare-mop.nix { inherit pkgs localLispPackages; }; + file-types = import ./file-types.nix { inherit pkgs localLispPackages; }; + inferior-shell = import ./inferior-shell.nix { inherit pkgs localLispPackages; }; + ip-utils = import ./ip-utils.nix { inherit pkgs localLispPackages; }; + osicat = import ./osicat.nix { inherit pkgs localLispPackages; }; + slynk = import ./slynk.nix { inherit pkgs localLispPackages; }; + slynk-asdf = import ./slynk-asdf.nix { inherit pkgs localLispPackages; }; + slynk-macrostep = import ./slynk-macrostep.nix { inherit pkgs localLispPackages; }; + slynk-stepper = import ./slynk-stepper.nix { inherit pkgs localLispPackages; }; + usocket-server = import ./usocket-server.nix { inherit pkgs localLispPackages; }; + xml-emitter = import ./xml-emitter.nix { inherit pkgs localLispPackages; }; +} diff --git a/pkgs/lisp/fare-mop.nix b/pkgs/lisp/fare-mop.nix new file mode 100644 index 0000000..7e552ad --- /dev/null +++ b/pkgs/lisp/fare-mop.nix @@ -0,0 +1,23 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "fare-mop"; + packageName = "fare-mop"; + description = "fare-mop has a few simple utilities relying on the MOP."; + + buildSystems = [ "fare-mop" ]; + + deps = with localLispPackages; [ + closer-mop + fare-utils + ]; + + src = pkgs.fetchgit { + url = "https://github.com/fare/fare-mop.git"; + rev = "538aa94590a0354f382eddd9238934763434af30"; + sha256 = "0maxs8392953fhnaa6zwnm2mdbhxjxipp4g4rvypm06ixr6pyv1c"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "fare-mop.asd" ]; +} diff --git a/pkgs/lisp/file-types.nix b/pkgs/lisp/file-types.nix new file mode 100644 index 0000000..fdf1dbf --- /dev/null +++ b/pkgs/lisp/file-types.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "file-types"; + packageName = "file-types"; + description = "Simple scheme to classify file types in a hierarchical fashion. Includes support for associating and querying MIME types."; + + buildSystems = [ "file-types" ]; + + deps = []; + + src = pkgs.fetchgit { + url = "https://github.com/eugeneia/file-types.git"; + rev = "6f5676b2781f617b6009ae4ce001496ea43b6fac"; + sha256 = "09l67gzjwx7kx237grm709dsj9rkmmm8s3ya6irmcw8nh587inbs"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "file-types.asd" ]; +} diff --git a/pkgs/lisp/inferior-shell.nix b/pkgs/lisp/inferior-shell.nix new file mode 100644 index 0000000..3ca617f --- /dev/null +++ b/pkgs/lisp/inferior-shell.nix @@ -0,0 +1,28 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "inferior-shell"; + packageName = "inferior-shell"; + description = "This CL library allows you to spawn local or remote processes and shell pipes."; + + buildSystems = [ "inferior-shell" ]; + + deps = with localLispPackages; [ + pkgs.asdf + alexandria + fare-mop + fare-quasiquote-extras + fare-utils + trivia + trivia_dot_quasiquote + ]; + + src = pkgs.fetchgit { + url = "https://github.com/fare/inferior-shell.git"; + rev = "15c2d04a7398db965ea1c3ba2d49efa7c851f2c2"; + sha256 = "02qx37zzk5j4xmwh77k2qa2wvnzvaj6qml5dh2q7b6b1ljvgcj4m"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "inferior-shell.asd" ]; +} diff --git a/pkgs/lisp/ip-utils.nix b/pkgs/lisp/ip-utils.nix new file mode 100644 index 0000000..bac706c --- /dev/null +++ b/pkgs/lisp/ip-utils.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "ip-utils"; + packageName = "ip-utils"; + description = "Simple Common Lisp utility functions for working with IPs"; + + buildSystems = [ "ip-utils" ]; + + deps = with pkgs.lispPackages; [ + cl-ppcre + split-sequence + trivia + ]; + + src = pkgs.fetchgit { + url = "https://git.fudo.org/fudo-public/ip-utils.git"; + rev = "bf590d0eeab9496bc47db43c997dfe9f0151163a"; + sha256 = "19n17pdzyl8j0fw82dr8lrjy6hkcagszm8kbyv8qbv2jl80176hp"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "ip-utils.asd" ]; +} diff --git a/pkgs/lisp/osicat.nix b/pkgs/lisp/osicat.nix new file mode 100644 index 0000000..5f298a8 --- /dev/null +++ b/pkgs/lisp/osicat.nix @@ -0,0 +1,24 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "osicat"; + packageName = "osicat"; + description = "Osicat is a lightweight operating system interface for Common Lisp on Unix-platforms."; + + buildSystems = [ "osicat" ]; + + deps = with localLispPackages; [ + alexandria + cffi-grovel + trivial-features + ]; + + src = pkgs.fetchgit { + url = "https://github.com/osicat/osicat.git"; + rev = "e635611710fe053b4bbb7e8cc950a524f6061562"; + sha256 = "1lib65qkwkywmnkgnnbqvfypv82rds7cdaygjmi32d337f82ljzg"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "osicat.asd" ]; +} diff --git a/pkgs/lisp/slynk-asdf.nix b/pkgs/lisp/slynk-asdf.nix new file mode 100644 index 0000000..379296a --- /dev/null +++ b/pkgs/lisp/slynk-asdf.nix @@ -0,0 +1,22 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "slynk-asdf"; + packageName = "slynk-asdf"; + description = "SLY-ASDF is a contrib for SLY that adds support for editing ASDF systems, exposing several utilities for working with and loading systems."; + + buildSystems = [ "slynk-asdf" ]; + + deps = with localLispPackages; [ + slynk + ]; + + src = pkgs.fetchgit { + url = "https://github.com/mmgeorge/sly-asdf.git"; + rev = "95ca71ddeb6132c413e1e4352b136f41ed9254f1"; + sha256 = "1dvjwdan3qd3x716zgziy5vbq2972rz8pdqi7b40haqg01f33qf4"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "slynk-asdf.asd" ]; +} diff --git a/pkgs/lisp/slynk-macrostep.nix b/pkgs/lisp/slynk-macrostep.nix new file mode 100644 index 0000000..107ffe4 --- /dev/null +++ b/pkgs/lisp/slynk-macrostep.nix @@ -0,0 +1,22 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "slynk-macrostep"; + packageName = "slynk-macrostep"; + description = "sly-macrostep is a SLY contrib for expanding CL macros right inside the source file."; + + buildSystems = [ "slynk-macrostep" ]; + + deps = with localLispPackages; [ + slynk + ]; + + src = pkgs.fetchgit { + url = "https://github.com/joaotavora/sly-macrostep.git"; + rev = "5113e4e926cd752b1d0bcc1508b3ebad5def5fad"; + sha256 = "1nxf28gn4f3n0wnv7nb5sgl36fz175y470zs9hig4kq8cp0yal0r"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "slynk-macrostep.asd" ]; +} diff --git a/pkgs/lisp/slynk-stepper.nix b/pkgs/lisp/slynk-stepper.nix new file mode 100644 index 0000000..e134885 --- /dev/null +++ b/pkgs/lisp/slynk-stepper.nix @@ -0,0 +1,23 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "slynk-stepper"; + packageName = "slynk-stepper"; + description = "A portable Common Lisp stepper interface."; + + buildSystems = [ "slynk-stepper" ]; + + deps = with localLispPackages; [ + agnostic-lizard + slynk + ]; + + src = pkgs.fetchgit { + url = "https://github.com/joaotavora/sly-stepper.git"; + rev = "ec3c0a7f3c8b82926882e5fcfdacf67b86d989f8"; + sha256 = "1hxniaxifdw3m4y4yssgy22xcmmf558wx7rpz66wy5hwybjslf7b"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "slynk-stepper.asd" ]; +} diff --git a/pkgs/lisp/slynk.nix b/pkgs/lisp/slynk.nix new file mode 100644 index 0000000..ab8e91f --- /dev/null +++ b/pkgs/lisp/slynk.nix @@ -0,0 +1,32 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "slynk"; + packageName = "slynk"; + description = "SLY is Sylvester the Cat's Common Lisp IDE for Emacs."; + + buildSystems = [ + "slynk" + "slynk/arglists" + "slynk/fancy-inspector" + "slynk/package-fu" + "slynk/mrepl" + "slynk/trace-dialog" + "slynk/profiler" + "slynk/stickers" + "slynk/stickers" + "slynk/indentation" + "slynk/retro" + ]; + + deps = with localLispPackages; []; + + src = pkgs.fetchgit { + url = "https://github.com/joaotavora/sly.git"; + rev = "1.0.43"; + sha256 = "11yclc8i6gpy26m1yj6bid6da22639zpil1qzj87m5gfvxiv4zg6"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "slynk/slynk.asd" ]; +} diff --git a/pkgs/lisp/usocket-server.nix b/pkgs/lisp/usocket-server.nix new file mode 100644 index 0000000..9ff3e46 --- /dev/null +++ b/pkgs/lisp/usocket-server.nix @@ -0,0 +1,23 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "usocket-server"; + packageName = "usocket-server"; + description = "This is the usocket Common Lisp sockets library: a library to bring sockets access to the broadest of common lisp implementations as possible."; + + buildSystems = [ "usocket" "usocket-server" ]; + + deps = with localLispPackages; [ + bordeaux-threads + split-sequence + ]; + + src = pkgs.fetchgit { + url = "https://github.com/usocket/usocket.git"; + rev = "0e2c23192a74bd654b43528f41b62ee69a06b821"; + sha256 = "18z49j9hdazvy1bf0hc4w4k9iavm1nagfbrbbp8ry1r3y7np6by6"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "usocket.asd" "usocket-server.asd" ]; +} diff --git a/pkgs/lisp/xml-emitter.nix b/pkgs/lisp/xml-emitter.nix new file mode 100644 index 0000000..c63f4b4 --- /dev/null +++ b/pkgs/lisp/xml-emitter.nix @@ -0,0 +1,22 @@ +{ pkgs, localLispPackages, ... }: + +pkgs.lispPackages.buildLispPackage { + baseName = "xml-emitter"; + packageName = "xml-emitter"; + description = "Map Lisp to XML."; + + buildSystems = [ "xml-emitter" ]; + + deps = with localLispPackages; [ + cl-utilities + ]; + + src = pkgs.fetchgit { + url = "https://github.com/VitoVan/xml-emitter.git"; + rev = "1a93a5ab084a10f3b527db3043bd0ba5868404bf"; + sha256 = "1w9yx8gc4imimvjqkhq8yzpg3kjrp2y37rjix5c1lnz4s7bxvhk9"; + fetchSubmodules = false; + }; + + asdFilesToKeep = [ "xml-emitter.asd" ]; +} diff --git a/pkgs/vanilla-forum.nix b/pkgs/vanilla-forum.nix new file mode 100644 index 0000000..bcab13c --- /dev/null +++ b/pkgs/vanilla-forum.nix @@ -0,0 +1,29 @@ +# NOT USED, CAN DELETE + +{ pkgs, ... }: + +let version = "3.3"; + +in pkgs.stdenv.mkDerivation { + pname = "vanilla-forum"; + version = version; + + src = builtins.fetchurl { + name = "vanilla-forum-${version}.zip"; + url = "https://us.v-cdn.net/5018160/uploads/addons/3JQXC5NIGUWR.zip"; + sha256 = "13062ar0mdaaihzj6jx9kjvfvsg3km8khvad1rm9cqxviim9rzv3"; + }; + + nativeBuildInputs = with pkgs; [ unzip ]; + + installPhase = '' + mkdir $out + cp -aR -t $out applications bootstrap.php dist js library locales plugins resources themes uploads vendor + ''; + + meta = { + homepage = "http://vanillaforums.com/"; + description = "Vanilla Web Forum"; + downloadPage = "https://open.vanillaforums.com/download"; + }; +}