about summary refs log tree commit diff
path: root/pkgs/by-name/ir
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ir')
-rw-r--r--pkgs/by-name/ir/iredis/package.nix2
-rw-r--r--pkgs/by-name/ir/ironbar/package.nix108
-rw-r--r--pkgs/by-name/ir/irrd/package.nix177
-rw-r--r--pkgs/by-name/ir/irust/package.nix56
4 files changed, 301 insertions, 42 deletions
diff --git a/pkgs/by-name/ir/iredis/package.nix b/pkgs/by-name/ir/iredis/package.nix
index 5694ed44bed39..b0c37d1183246 100644
--- a/pkgs/by-name/ir/iredis/package.nix
+++ b/pkgs/by-name/ir/iredis/package.nix
@@ -60,7 +60,7 @@ python3.pkgs.buildPythonApplication rec {
   pythonImportsCheck = [ "iredis" ];
 
   meta = with lib; {
-    description = "A Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
+    description = "Terminal Client for Redis with AutoCompletion and Syntax Highlighting";
     changelog = "https://github.com/laixintao/iredis/blob/${src.rev}/CHANGELOG.md";
     homepage = "https://iredis.xbin.io/";
     license = licenses.bsd3;
diff --git a/pkgs/by-name/ir/ironbar/package.nix b/pkgs/by-name/ir/ironbar/package.nix
index 6844a5ae26ec9..006eb004611d2 100644
--- a/pkgs/by-name/ir/ironbar/package.nix
+++ b/pkgs/by-name/ir/ironbar/package.nix
@@ -1,63 +1,76 @@
-{ gtk3
-, gdk-pixbuf
-, librsvg
-, webp-pixbuf-loader
-, gobject-introspection
-, glib-networking
-, glib
-, shared-mime-info
-, gsettings-desktop-schemas
-, wrapGAppsHook3
-, gtk-layer-shell
-, gnome
-, libxkbcommon
-, openssl
-, pkg-config
-, hicolor-icon-theme
-, rustPlatform
-, lib
-, fetchFromGitHub
+{
+  gtk3,
+  gdk-pixbuf,
+  librsvg,
+  webp-pixbuf-loader,
+  gobject-introspection,
+  glib-networking,
+  glib,
+  shared-mime-info,
+  gsettings-desktop-schemas,
+  wrapGAppsHook3,
+  gtk-layer-shell,
+  gnome,
+  libxkbcommon,
+  openssl,
+  pkg-config,
+  hicolor-icon-theme,
+  rustPlatform,
+  lib,
+  fetchFromGitHub,
+  luajit,
+  luajitPackages,
+  libpulseaudio,
+  features ? [ ],
 }:
 
+let
+  hasFeature = f: features == [ ] || builtins.elem f features;
+in
 rustPlatform.buildRustPackage rec {
   pname = "ironbar";
-  version = "0.14.1";
+  version = "0.15.1";
 
   src = fetchFromGitHub {
     owner = "JakeStanger";
     repo = "ironbar";
     rev = "v${version}";
-    hash = "sha256-y4w4i/IVe1+wjB2tsCPQH6c7XTl93u45Q0pXFi3TY1E=";
+    hash = "sha256-TPbvKQdoGfZMzp+fl72vy6MtRV1yGcOG/es67VOA0xw=";
   };
 
-  cargoHash = "sha256-h5yNJM+NvX/Hi86iSegHWevPcPZeDmJ4y/qNr3G20Qg=";
+  cargoHash = "sha256-+9R505xyEycv5Dav4ZCh1BiYRp3U1I9yBDqSPefo9uY=";
 
-  buildInputs = [
-    gtk3
-    gdk-pixbuf
-    glib
-    gtk-layer-shell
-    glib-networking
-    shared-mime-info
-    gnome.adwaita-icon-theme
-    hicolor-icon-theme
-    gsettings-desktop-schemas
-    libxkbcommon
-    openssl
-  ];
+  buildInputs =
+    [
+      gtk3
+      gdk-pixbuf
+      glib
+      gtk-layer-shell
+      glib-networking
+      shared-mime-info
+      gnome.adwaita-icon-theme
+      hicolor-icon-theme
+      gsettings-desktop-schemas
+      libxkbcommon
+    ]
+    ++ lib.optionals (hasFeature "http") [ openssl ]
+    ++ lib.optionals (hasFeature "volume") [ libpulseaudio ]
+    ++ lib.optionals (hasFeature "cairo") [ luajit ];
 
   nativeBuildInputs = [
     pkg-config
     wrapGAppsHook3
     gobject-introspection
   ];
+  propagatedBuildInputs = [ gtk3 ];
 
-  propagatedBuildInputs = [
-    gtk3
-  ];
+  runtimeDeps = [ luajitPackages.lgi ];
 
-  preFixup = ''
-    gappsWrapperArgs+=(
+  buildNoDefaultFeatures = features != [ ];
+  buildFeatures = features;
+
+  gappsWrapperArgs =
+    ''
       # Thumbnailers
       --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
       --prefix XDG_DATA_DIRS : "${librsvg}/share"
@@ -66,6 +79,15 @@ rustPlatform.buildRustPackage rec {
 
       # gtk-launch
       --suffix PATH : "${lib.makeBinPath [ gtk3 ]}"
+    ''
+    + lib.optionalString (hasFeature "cairo") ''
+      --prefix LUA_PATH : "./?.lua;${luajitPackages.lgi}/share/lua/5.1/?.lua;${luajitPackages.lgi}/share/lua/5.1/?/init.lua;${luajit}/share/lua/5.1/\?.lua;${luajit}/share/lua/5.1/?/init.lua"
+      --prefix LUA_CPATH : "./?.so;${luajitPackages.lgi}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/?.so;${luajit}/lib/lua/5.1/loadall.so"
+    '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      ${gappsWrapperArgs}
     )
   '';
 
@@ -74,7 +96,11 @@ rustPlatform.buildRustPackage rec {
     description = "Customizable gtk-layer-shell wlroots/sway bar written in Rust";
     license = licenses.mit;
     platforms = platforms.linux;
-    maintainers = with maintainers; [ yavko donovanglover jakestanger ];
+    maintainers = with maintainers; [
+      yavko
+      donovanglover
+      jakestanger
+    ];
     mainProgram = "ironbar";
   };
 }
diff --git a/pkgs/by-name/ir/irrd/package.nix b/pkgs/by-name/ir/irrd/package.nix
new file mode 100644
index 0000000000000..b6d323129abd9
--- /dev/null
+++ b/pkgs/by-name/ir/irrd/package.nix
@@ -0,0 +1,177 @@
+{ lib
+, python3
+, fetchPypi
+, fetchFromGitHub
+, fetchpatch
+, git
+, postgresql
+, postgresqlTestHook
+, redis
+}:
+
+let
+  py = python3.override {
+    packageOverrides = final: prev: {
+      # sqlalchemy 1.4.x or 2.x are not supported
+      sqlalchemy = prev.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
+        version = "1.3.24";
+        src = fetchPypi {
+          pname = "SQLAlchemy";
+          inherit version;
+          hash = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk=";
+        };
+        doCheck = false;
+      });
+      alembic = prev.alembic.overridePythonAttrs (lib.const {
+        doCheck = false;
+      });
+      factory-boy = prev.factory-boy.overridePythonAttrs (lib.const {
+        doCheck = false;
+      });
+      beautifultable = prev.beautifultable.overridePythonAttrs (oldAttrs: rec {
+        version = "0.8.0";
+        src = fetchPypi {
+          inherit (oldAttrs) pname;
+          inherit version;
+          hash = "sha256-1E2VUbvte/qIZ1Mk+E77mqhXOE1E6fsh61MPCgutuBU=";
+        };
+        doCheck = false;
+      });
+    };
+  };
+in
+
+py.pkgs.buildPythonPackage rec {
+  pname = "irrd";
+  version = "4.4.4";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "irrdnet";
+    repo = "irrd";
+    rev = "v${version}";
+    hash = "sha256-UIOKXU92JEOeVdpYLNmDBtLn0u3LMdKItcn9bFd9u8g=";
+  };
+
+  patches = [
+    # starlette 0.37.2 reverted the behaviour change which this adjusted to
+    (fetchpatch {
+      url = "https://github.com/irrdnet/irrd/commit/43e26647e18f8ff3459bbf89ffbff329a0f1eed5.patch";
+      revert = true;
+      hash = "sha256-G216rHfWMZIl9GuXBz6mjHCIm3zrfDDLSmHQK/HkkzQ=";
+    })
+    # Backport build fix for webauthn 2.1
+    (fetchpatch {
+      url = "https://github.com/irrdnet/irrd/commit/20b771e1ee564f38e739fdb0a2a79c10319f638f.patch";
+      hash = "sha256-PtNdhSoFPT1kt71kFsySp/VnUpUdO23Gu9FKknHLph8=";
+      includes = ["irrd/webui/auth/endpoints_mfa.py"];
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace-fail psycopg2-binary psycopg2
+  '';
+  pythonRelaxDeps = true;
+
+  nativeBuildInputs = with python3.pkgs; [
+    poetry-core
+  ];
+
+  nativeCheckInputs = [
+    git
+    redis
+    postgresql
+    postgresqlTestHook
+  ] ++ (with py.pkgs; [
+    pytest-asyncio
+    pytest-freezegun
+    pytestCheckHook
+    smtpdfix
+    httpx
+  ]);
+
+  propagatedBuildInputs = with py.pkgs; [
+    python-gnupg
+    passlib
+    bcrypt
+    ipy
+    ordered-set
+    beautifultable
+    pyyaml
+    datrie
+    setproctitle
+    python-daemon
+    pid
+    py.pkgs.redis
+    hiredis
+    coredis
+    requests
+    pytz
+    ariadne
+    uvicorn
+    starlette
+    psutil
+    asgiref
+    pydantic
+    typing-extensions
+    py-radix-sr
+    psycopg2
+    sqlalchemy
+    alembic
+    ujson
+    wheel
+    websockets
+    limits
+    factory-boy
+    webauthn
+    wtforms
+    imia
+    starlette-wtf
+    zxcvbn
+    pyotp
+    asgi-logger
+    wtforms-bootstrap5
+    email-validator
+    jinja2
+  ] ++ py.pkgs.uvicorn.optional-dependencies.standard;
+
+  preCheck = ''
+    redis-server &
+    REDIS_PID=$!
+
+    while ! redis-cli --scan ; do
+      echo waiting for redis
+      sleep 1
+    done
+
+    export SMTPD_HOST=127.0.0.1
+    export IRRD_DATABASE_URL="postgres:///$PGDATABASE"
+    export IRRD_REDIS_URL="redis://localhost/1"
+  '';
+
+  # required for test_object_writing_and_status_checking
+  postgresqlTestSetupPost = ''
+    echo "track_commit_timestamp=on" >> $PGDATA/postgresql.conf
+    pg_ctl restart
+  '';
+
+  postCheck = ''
+    kill $REDIS_PID
+  '';
+
+  # skip tests that require internet access
+  disabledTests = [
+    "test_020_dash_o_noop"
+    "test_050_non_json_response"
+  ];
+
+  meta = with lib; {
+    changelog = "https://irrd.readthedocs.io/en/v${version}/releases/";
+    description = "Internet Routing Registry database server, processing IRR objects in the RPSL format";
+    license = licenses.mit;
+    homepage = "https://github.com/irrdnet/irrd";
+    maintainers = teams.wdz.members;
+  };
+}
+
diff --git a/pkgs/by-name/ir/irust/package.nix b/pkgs/by-name/ir/irust/package.nix
new file mode 100644
index 0000000000000..f2e4b2f5103c8
--- /dev/null
+++ b/pkgs/by-name/ir/irust/package.nix
@@ -0,0 +1,56 @@
+{
+  lib,
+  fetchFromGitHub,
+  rustPlatform,
+  makeWrapper,
+  cargo,
+  rustfmt,
+  cargo-show-asm,
+  cargo-expand,
+  clang,
+  # Workaround to allow easily overriding runtime inputs
+  runtimeInputs ? [
+    cargo
+    rustfmt
+    cargo-show-asm
+    cargo-expand
+    clang
+  ],
+  nix-update-script,
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "irust";
+  version = "1.71.23";
+
+  src = fetchFromGitHub {
+    owner = "sigmaSd";
+    repo = "IRust";
+    rev = "irust@${version}";
+    hash = "sha256-+kl22m2Is8CdLlqGSFOglw4/fM1exayaMH05YSuTsbw=";
+  };
+
+  cargoHash = "sha256-4aQ1IOTcUAkgiQucUG8cg9pVShtlu2IJeqNCGO+6VYY=";
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postFixup = ''
+    wrapProgram $out/bin/irust \
+      --suffix PATH : ${lib.makeBinPath runtimeInputs}
+  '';
+
+  checkFlags = [
+    "--skip=repl"
+    "--skip=printer::tests"
+  ];
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    description = "Cross Platform Rust Repl";
+    homepage = "https://github.com/sigmaSd/IRust";
+    license = licenses.mit;
+    maintainers = with maintainers; [ lelgenio ];
+    mainProgram = "irust";
+  };
+}